Author: ymartel Date: 2010-09-24 17:37:52 +0200 (Fri, 24 Sep 2010) New Revision: 1825 Url: http://nuiton.org/repositories/revision/maven-license-plugin/1825 Log: Update maven doc about filters for THIRD-PARTY Modified: trunk/src/site/apt/usage.apt Modified: trunk/src/site/apt/usage.apt =================================================================== --- trunk/src/site/apt/usage.apt 2010-09-24 14:14:01 UTC (rev 1824) +++ trunk/src/site/apt/usage.apt 2010-09-24 15:37:52 UTC (rev 1825) @@ -240,6 +240,205 @@ (The Apache Software License, Version 2.0) JHLabs Image Processing Filters (com.jhlabs:filters:2.0.235 - http://www.jhlabs.com/ip/index.html) ------------------------------------------------------------------------------- +* Filter the dependencies + + <Since version 2.3>, we can consolidate the THIRD-PARTY file with filters on + artifacts and groups, in excluding or only including some of them. + + * Include ArtifactIds or GroupIds + + Include property is useful to refer in THIRD-PARTY file only some artifacts, + given by their artifactIds and those that are in the given groupIds. + + * Exclude ArtifactIds or GroupIds + + Exclude property is useful to not refer in THIRD-PARTY file only some artifacts, + given by their artifactIds and those that are in the given groupIds. + + * Include - Exclude : priority + + Note that the exclude filter is predominant on include filter. So, if we include + an artifact but exclude its groupId, it will not be referred in THIRD-PARTY file. + +** exclude groupIds + + While using configuration's property <<excludeGroupIds>> on third-party goals, + it will remove all the dependencies came from the given groupIds fom the + THIRD-PARTY file. + +*** Example + + Given a pom with these dependencies : + +------------------------------------------------------------------------------- + + <dependencies> + + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.1.1</version> + </dependency> + + <dependency> + <groupId>com.jhlabs</groupId> + <artifactId>filters</artifactId> + <version>2.0.235</version> + </dependency> + + <dependency> + <groupId>com.jhlabs</groupId> + <artifactId>javaproj</artifactId> + <version>1.0</version> + </dependency< + + </dependencies> +------------------------------------------------------------------------------- + + While executing <mvn add-third-party -Dlicense.excludedGroups=com\.jhla.*>, + we obtain the following <<THIRD-PARTY>> file : + +------------------------------------------------------------------------------- +List of 2 third-party dependencies. + + (The Apache Software License, Version 2.0) Commons Logging (commons-logging:commons-logging:1.1.1 - http://commons.apache.org/logging) +------------------------------------------------------------------------------- + +** exclude artifactIds + + While using configuration's property <<excludeArtifactIds>> on third-party goals, + it will remove all the dependencies came from the given artifactsIds fom the + THIRD-PARTY file. + +*** Example + + Given a pom with these dependencies : + +------------------------------------------------------------------------------- + + <dependencies> + + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.1.1</version> + </dependency> + + <dependency> + <groupId>com.jhlabs</groupId> + <artifactId>filters</artifactId> + <version>2.0.235</version> + </dependency> + + <dependency> + <groupId>com.jhlabs</groupId> + <artifactId>javaproj</artifactId> + <version>1.0</version> + </dependency< + + </dependencies> +------------------------------------------------------------------------------- + + While executing <mvn add-third-party -Dlicense.excludedArtifacts=javaproj>, + we obtain the following <<THIRD-PARTY>> file : + +------------------------------------------------------------------------------- +List of 2 third-party dependencies. + + (Apache License, Version 2.0) JHLabs Image Processing Filters (com.jhlabs:filters:2.0.235 - http://www.jhlabs.com/ip/index.html) + (The Apache Software License, Version 2.0) Commons Logging (commons-logging:commons-logging:1.1.1 - http://commons.apache.org/logging) +------------------------------------------------------------------------------- + +** include groupIds + + While using configuration's property <<includeGroupIds>> on third-party goals, + it will include only the dependencies came from the given groupIds fom the + THIRD-PARTY file. + +*** Example + + Given a pom with these dependencies : + +------------------------------------------------------------------------------- + + <dependencies> + + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.1.1</version> + </dependency> + + <dependency> + <groupId>com.jhlabs</groupId> + <artifactId>filters</artifactId> + <version>2.0.235</version> + </dependency> + + <dependency> + <groupId>com.jhlabs</groupId> + <artifactId>javaproj</artifactId> + <version>1.0</version> + </dependency< + + </dependencies> +------------------------------------------------------------------------------- + + While executing <mvn add-third-party -Dlicense.includedGroups=com\.jhlabs>, + we obtain the following <<THIRD-PARTY>> file : + +------------------------------------------------------------------------------- +List of 2 third-party dependencies. + + (Apache License, Version 2.0) JHLabs Image Processing Filters (com.jhlabs:filters:2.0.235 - http://www.jhlabs.com/ip/index.html) + (The Apache Software License, Version 2.0) JHlabs Java Projection Library (com.jhlabs:javaproj:1.0 - http://www.jhlabs.com/java/maps/proj/index.html) +------------------------------------------------------------------------------- + +** include artifactIds + + While using configuration's property <<excludeArtifactIds>> on third-party goals, + it will remove include onlu the dependencies came from the given artifactIds fom the + THIRD-PARTY file. + +*** Example + + Given a pom with these dependencies : + +------------------------------------------------------------------------------- + + <dependencies> + + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.1.1</version> + </dependency> + + <dependency> + <groupId>com.jhlabs</groupId> + <artifactId>filters</artifactId> + <version>2.0.235</version> + </dependency> + + <dependency> + <groupId>com.jhlabs</groupId> + <artifactId>javaproj</artifactId> + <version>1.0</version> + </dependency< + + </dependencies> +------------------------------------------------------------------------------- + + While executing <mvn add-third-party -Dlicense.includedArtifacts=filters>, + we obtain the following <<THIRD-PARTY>> file : + +------------------------------------------------------------------------------- +List of 2 third-party dependencies. + + (Apache License, Version 2.0) JHLabs Image Processing Filters (com.jhlabs:filters:2.0.235 - http://www.jhlabs.com/ip/index.html) +------------------------------------------------------------------------------- + + Get informations * license-list goal