r1786 - in trunk: . src/it/add-third-party src/it/add-third-party/merge-licenses src/it/add-third-party/no-deps src/it/add-third-party/with-deps src/it/aggregate-add-third-party src/it/aggregate-add-third-party/child1 src/it/update-file-header src/it/update-project-license
Author: tchemit Date: 2010-06-26 13:41:13 +0200 (Sat, 26 Jun 2010) New Revision: 1786 Url: http://nuiton.org/repositories/revision/maven-license-plugin/1786 Log: add its for merge license + improve its Added: trunk/src/it/add-third-party/merge-licenses/ trunk/src/it/add-third-party/merge-licenses/invoker.properties trunk/src/it/add-third-party/merge-licenses/pom.xml trunk/src/it/add-third-party/merge-licenses/verify.groovy Modified: trunk/pom.xml trunk/src/it/add-third-party/no-deps/invoker.properties trunk/src/it/add-third-party/no-deps/pom.xml trunk/src/it/add-third-party/no-deps/verify.groovy trunk/src/it/add-third-party/with-deps/invoker.properties trunk/src/it/add-third-party/with-deps/pom.xml trunk/src/it/add-third-party/with-deps/verify.groovy trunk/src/it/aggregate-add-third-party/child1/pom.xml trunk/src/it/aggregate-add-third-party/pom.xml trunk/src/it/update-file-header/pom.xml trunk/src/it/update-project-license/invoker.properties trunk/src/it/update-project-license/pom.xml trunk/src/it/update-project-license/verify.groovy Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-06-26 11:14:41 UTC (rev 1785) +++ trunk/pom.xml 2010-06-26 11:41:13 UTC (rev 1786) @@ -422,6 +422,7 @@ <configuration> <pomIncludes> <pomInclude>aggregate-add-third-party/pom.xml</pomInclude> + <pomInclude>add-third-party/merge-licenses/pom.xml</pomInclude> <pomInclude>add-third-party/no-deps/pom.xml</pomInclude> <pomInclude>add-third-party/with-deps/pom.xml</pomInclude> <pomInclude>update-file-header/pom.xml</pomInclude> Added: trunk/src/it/add-third-party/merge-licenses/invoker.properties =================================================================== --- trunk/src/it/add-third-party/merge-licenses/invoker.properties (rev 0) +++ trunk/src/it/add-third-party/merge-licenses/invoker.properties 2010-06-26 11:41:13 UTC (rev 1786) @@ -0,0 +1,21 @@ +# A comma or space separated list of goals/phases to execute, may +# specify an empty list to execute the default goal of the IT project +invoker.goals=license:add-third-party + +# Optionally, a list of goals to run during further invocations of Maven +#invoker.goals.2=${project.groupId}:${project.artifactId}:${project.version}:run + +# A comma or space separated list of profiles to activate +#invoker.profiles=run-all run-once + +# The value for the environment variable MAVEN_OPTS +#invoker.mavenOpts=-Dfile.encoding=UTF-16 -Xms32m -Xmx256m + +# Possible values are "fail-fast" (default), "fail-at-end" and "fail-never" +invoker.failureBehavior=fail-at-end + +# The expected result of the build, possible values are "success" (default) and "failure" +#invoker.buildResult=success + +# A boolean value controlling the -N flag, defaults to "false" +#invoker.nonRecursive=false Property changes on: trunk/src/it/add-third-party/merge-licenses/invoker.properties ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: trunk/src/it/add-third-party/merge-licenses/pom.xml =================================================================== --- trunk/src/it/add-third-party/merge-licenses/pom.xml (rev 0) +++ trunk/src/it/add-third-party/merge-licenses/pom.xml 2010-06-26 11:41:13 UTC (rev 1786) @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <!-- ************************************************************* --> + <!-- *** POM Relationships *************************************** --> + <!-- ************************************************************* --> + + <groupId>org.nuiton.license.test</groupId> + <artifactId>test-add-third-party-merge-license</artifactId> + <version>@pom.version@</version> + + <!-- ************************************************************* --> + <!-- *** Project Information ************************************* --> + <!-- ************************************************************* --> + + <name>License Test :: add-third-party</name> + + <!-- ************************************************************* --> + <!-- *** Build Settings ****************************************** --> + <!-- ************************************************************* --> + + <packaging>jar</packaging> + + <properties> + + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <license.generateBundle>true</license.generateBundle> + <license.verbose>true</license.verbose> + </properties> + + <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> + + </dependencies> + <build> + + <pluginManagement> + <plugins> + <plugin> + <groupId>org.nuiton</groupId> + <artifactId>maven-license-plugin</artifactId> + <version>@pom.version@</version> + <executions> + <execution> + <id>default-cli</id> + <configuration> + <licenseMerges> + <licenseMerge>The Apache Software License, Version 2.0|Apache License, Version 2.0 + </licenseMerge> + </licenseMerges> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </pluginManagement> + </build> + +</project> + + Property changes on: trunk/src/it/add-third-party/merge-licenses/pom.xml ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: trunk/src/it/add-third-party/merge-licenses/verify.groovy =================================================================== --- trunk/src/it/add-third-party/merge-licenses/verify.groovy (rev 0) +++ trunk/src/it/add-third-party/merge-licenses/verify.groovy 2010-06-26 11:41:13 UTC (rev 1786) @@ -0,0 +1,18 @@ + +file = new File(basedir, 'target/generated-sources/license/THIRD-PARTY.txt'); +assert file.exists(); +content = file.text; +assert !content.contains( 'the project has no dependencies.' ); +assert content.contains( '(The Apache Software License, Version 2.0) Commons Logging (commons-logging:commons-logging:1.1.1 - http://commons.apache.org/logging)' ); +assert !content.contains( '(Apache License, Version 2.0) JHLabs Image Processing Filters (com.jhlabs:filters:2.0.235 - http://www.jhlabs.com/ip/index.html)' ); +assert content.contains( '(The Apache Software License, Version 2.0) JHLabs Image Processing Filters (com.jhlabs:filters:2.0.235 - http://www.jhlabs.com/ip/index.html)' ); + +file = new File(basedir, 'target/generated-sources/license/META-INF/test-add-third-party-merge-license-THIRD-PARTY.txt'); +assert file.exists(); +content = file.text; +assert !content.contains( 'the project has no dependencies.' ); +assert content.contains( '(The Apache Software License, Version 2.0) Commons Logging (commons-logging:commons-logging:1.1.1 - http://commons.apache.org/logging)' ); +assert !content.contains( '(Apache License, Version 2.0) JHLabs Image Processing Filters (com.jhlabs:filters:2.0.235 - http://www.jhlabs.com/ip/index.html)' ); +assert content.contains( '(The Apache Software License, Version 2.0) JHLabs Image Processing Filters (com.jhlabs:filters:2.0.235 - http://www.jhlabs.com/ip/index.html)' ); + +return true; Property changes on: trunk/src/it/add-third-party/merge-licenses/verify.groovy ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Modified: trunk/src/it/add-third-party/no-deps/invoker.properties =================================================================== --- trunk/src/it/add-third-party/no-deps/invoker.properties 2010-06-26 11:14:41 UTC (rev 1785) +++ trunk/src/it/add-third-party/no-deps/invoker.properties 2010-06-26 11:41:13 UTC (rev 1786) @@ -1,6 +1,6 @@ # A comma or space separated list of goals/phases to execute, may # specify an empty list to execute the default goal of the IT project -invoker.goals=clean generate-resources +invoker.goals=license:add-third-party # Optionally, a list of goals to run during further invocations of Maven #invoker.goals.2=${project.groupId}:${project.artifactId}:${project.version}:run Modified: trunk/src/it/add-third-party/no-deps/pom.xml =================================================================== --- trunk/src/it/add-third-party/no-deps/pom.xml 2010-06-26 11:14:41 UTC (rev 1785) +++ trunk/src/it/add-third-party/no-deps/pom.xml 2010-06-26 11:41:13 UTC (rev 1786) @@ -5,26 +5,12 @@ <modelVersion>4.0.0</modelVersion> - <!-- ************************************************************* --> - <!-- *** POM Relationships *************************************** --> - <!-- ************************************************************* --> - <groupId>org.nuiton.license.test</groupId> - <artifactId>test-add-third-party</artifactId> + <artifactId>test-add-third-party-no-deps</artifactId> <version>@pom.version@</version> - <!-- ************************************************************* --> - <!-- *** Project Information ************************************* --> - <!-- ************************************************************* --> + <name>License Test :: add-third-party-no-deps</name> - <name>License Test :: add-third-party</name> - - <!-- ************************************************************* --> - <!-- *** Build Settings ****************************************** --> - <!-- ************************************************************* --> - - <packaging>jar</packaging> - <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <license.generateBundle>true</license.generateBundle> @@ -32,21 +18,16 @@ </properties> <build> - <plugins> + <pluginManagement> + <plugins> - <plugin> - <groupId>org.nuiton</groupId> - <artifactId>maven-license-plugin</artifactId> - <version>@pom.version@</version> - <executions> - <execution> - <goals> - <goal>add-third-party</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> + <plugin> + <groupId>org.nuiton</groupId> + <artifactId>maven-license-plugin</artifactId> + <version>@pom.version@</version> + </plugin> + </plugins> + </pluginManagement> </build> </project> Modified: trunk/src/it/add-third-party/no-deps/verify.groovy =================================================================== --- trunk/src/it/add-third-party/no-deps/verify.groovy 2010-06-26 11:14:41 UTC (rev 1785) +++ trunk/src/it/add-third-party/no-deps/verify.groovy 2010-06-26 11:41:13 UTC (rev 1786) @@ -4,7 +4,7 @@ content = file.text; assert content.contains( 'the project has no dependencies.' ); -file = new File(basedir, 'target/generated-sources/license/META-INF/test-add-third-party-THIRD-PARTY.txt'); +file = new File(basedir, 'target/generated-sources/license/META-INF/test-add-third-party-no-deps-THIRD-PARTY.txt'); assert file.exists(); content = file.text; assert content.contains( 'the project has no dependencies.' ); Modified: trunk/src/it/add-third-party/with-deps/invoker.properties =================================================================== --- trunk/src/it/add-third-party/with-deps/invoker.properties 2010-06-26 11:14:41 UTC (rev 1785) +++ trunk/src/it/add-third-party/with-deps/invoker.properties 2010-06-26 11:41:13 UTC (rev 1786) @@ -1,6 +1,6 @@ # A comma or space separated list of goals/phases to execute, may # specify an empty list to execute the default goal of the IT project -invoker.goals=clean generate-resources +invoker.goals=license:add-third-party # Optionally, a list of goals to run during further invocations of Maven #invoker.goals.2=${project.groupId}:${project.artifactId}:${project.version}:run Modified: trunk/src/it/add-third-party/with-deps/pom.xml =================================================================== --- trunk/src/it/add-third-party/with-deps/pom.xml 2010-06-26 11:14:41 UTC (rev 1785) +++ trunk/src/it/add-third-party/with-deps/pom.xml 2010-06-26 11:41:13 UTC (rev 1786) @@ -5,26 +5,12 @@ <modelVersion>4.0.0</modelVersion> - <!-- ************************************************************* --> - <!-- *** POM Relationships *************************************** --> - <!-- ************************************************************* --> - <groupId>org.nuiton.license.test</groupId> - <artifactId>test-add-third-party</artifactId> + <artifactId>test-add-third-party-with-deps</artifactId> <version>@pom.version@</version> - <!-- ************************************************************* --> - <!-- *** Project Information ************************************* --> - <!-- ************************************************************* --> + <name>License Test :: add-third-party-with-deps</name> - <name>License Test :: add-third-party</name> - - <!-- ************************************************************* --> - <!-- *** Build Settings ****************************************** --> - <!-- ************************************************************* --> - - <packaging>jar</packaging> - <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> @@ -43,21 +29,16 @@ </dependencies> <build> - <plugins> + <pluginManagement> + <plugins> - <plugin> - <groupId>org.nuiton</groupId> - <artifactId>maven-license-plugin</artifactId> - <version>@pom.version@</version> - <executions> - <execution> - <goals> - <goal>add-third-party</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> + <plugin> + <groupId>org.nuiton</groupId> + <artifactId>maven-license-plugin</artifactId> + <version>@pom.version@</version> + </plugin> + </plugins> + </pluginManagement> </build> </project> Modified: trunk/src/it/add-third-party/with-deps/verify.groovy =================================================================== --- trunk/src/it/add-third-party/with-deps/verify.groovy 2010-06-26 11:14:41 UTC (rev 1785) +++ trunk/src/it/add-third-party/with-deps/verify.groovy 2010-06-26 11:41:13 UTC (rev 1786) @@ -3,10 +3,12 @@ assert file.exists(); content = file.text; assert !content.contains( 'the project has no dependencies.' ); +assert content.contains( '(The Apache Software License, Version 2.0) Commons Logging (commons-logging:commons-logging:1.1.1 - http://commons.apache.org/logging)' ); file = new File(basedir, 'target/generated-sources/license/test/third.txt'); assert file.exists(); content = file.text; assert !content.contains( 'the project has no dependencies.' ); +assert content.contains( '(The Apache Software License, Version 2.0) Commons Logging (commons-logging:commons-logging:1.1.1 - http://commons.apache.org/logging)' ); return true; Modified: trunk/src/it/aggregate-add-third-party/child1/pom.xml =================================================================== --- trunk/src/it/aggregate-add-third-party/child1/pom.xml 2010-06-26 11:14:41 UTC (rev 1785) +++ trunk/src/it/aggregate-add-third-party/child1/pom.xml 2010-06-26 11:41:13 UTC (rev 1786) @@ -5,10 +5,6 @@ <modelVersion>4.0.0</modelVersion> - <!-- ************************************************************* --> - <!-- *** POM Relationships *************************************** --> - <!-- ************************************************************* --> - <parent> <groupId>org.nuiton.license.test</groupId> <artifactId>test-aggregate-add-third-party</artifactId> Modified: trunk/src/it/aggregate-add-third-party/pom.xml =================================================================== --- trunk/src/it/aggregate-add-third-party/pom.xml 2010-06-26 11:14:41 UTC (rev 1785) +++ trunk/src/it/aggregate-add-third-party/pom.xml 2010-06-26 11:41:13 UTC (rev 1786) @@ -25,25 +25,19 @@ <license.verbose>true</license.verbose> </properties> - <!--build> + <build> - <plugins> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.nuiton</groupId> + <artifactId>maven-license-plugin</artifactId> + <version>@pom.version@</version> + </plugin> + </plugins> + </pluginManagement> + </build> - <plugin> - <groupId>org.nuiton</groupId> - <artifactId>maven-license-plugin</artifactId> - <version>@pom.version@</version> - <executions> - <execution> - <goals> - <goal>aggregate-add-third-party</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build--> - </project> Modified: trunk/src/it/update-file-header/pom.xml =================================================================== --- trunk/src/it/update-file-header/pom.xml 2010-06-26 11:14:41 UTC (rev 1785) +++ trunk/src/it/update-file-header/pom.xml 2010-06-26 11:41:13 UTC (rev 1786) @@ -5,26 +5,12 @@ <modelVersion>4.0.0</modelVersion> - <!-- ************************************************************* --> - <!-- *** POM Relationships *************************************** --> - <!-- ************************************************************* --> - <groupId>org.nuiton.license.test</groupId> <artifactId>test-update-file-header</artifactId> <version>@pom.version@</version> - <!-- ************************************************************* --> - <!-- *** Project Information ************************************* --> - <!-- ************************************************************* --> - <name>License Test :: update-file-header</name> - <!-- ************************************************************* --> - <!-- *** Build Settings ****************************************** --> - <!-- ************************************************************* --> - - <packaging>jar</packaging> - <inceptionYear>2012</inceptionYear> <organization> Modified: trunk/src/it/update-project-license/invoker.properties =================================================================== --- trunk/src/it/update-project-license/invoker.properties 2010-06-26 11:14:41 UTC (rev 1785) +++ trunk/src/it/update-project-license/invoker.properties 2010-06-26 11:41:13 UTC (rev 1786) @@ -1,6 +1,6 @@ # A comma or space separated list of goals/phases to execute, may # specify an empty list to execute the default goal of the IT project -invoker.goals=clean process-resources +invoker.goals=license:update-project-license # Optionally, a list of goals to run during further invocations of Maven #invoker.goals.2=${project.groupId}:${project.artifactId}:${project.version}:run Modified: trunk/src/it/update-project-license/pom.xml =================================================================== --- trunk/src/it/update-project-license/pom.xml 2010-06-26 11:14:41 UTC (rev 1785) +++ trunk/src/it/update-project-license/pom.xml 2010-06-26 11:41:13 UTC (rev 1786) @@ -5,24 +5,12 @@ <modelVersion>4.0.0</modelVersion> - <!-- ************************************************************* --> - <!-- *** POM Relationships *************************************** --> - <!-- ************************************************************* --> - <groupId>org.nuiton.license.test</groupId> <artifactId>test-update-project-license</artifactId> <version>@pom.version@</version> - <!-- ************************************************************* --> - <!-- *** Project Information ************************************* --> - <!-- ************************************************************* --> - <name>License Test :: update-project-license</name> - <!-- ************************************************************* --> - <!-- *** Build Settings ****************************************** --> - <!-- ************************************************************* --> - <packaging>jar</packaging> <inceptionYear>2012</inceptionYear> @@ -32,30 +20,23 @@ </organization> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <license.generateBundle>true</license.generateBundle> + <license.bundleLicensePath>META-INF/bundleLicense.txt</license.bundleLicensePath> + <license.verbose>true</license.verbose> </properties> + <build> - <plugins> + <pluginManagement> + <plugins> - <plugin> - <groupId>org.nuiton</groupId> - <artifactId>maven-license-plugin</artifactId> - <version>@pom.version@</version> - <configuration> - <verbose>true</verbose> - <generateBundle>true</generateBundle> - <bundleLicensePath>META-INF/bundleLicense.txt</bundleLicensePath> - </configuration> - <executions> - <execution> - <id>first</id> - <goals> - <goal>update-project-license</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> + <plugin> + <groupId>org.nuiton</groupId> + <artifactId>maven-license-plugin</artifactId> + <version>@pom.version@</version> + </plugin> + </plugins> + </pluginManagement> </build> </project> Modified: trunk/src/it/update-project-license/verify.groovy =================================================================== --- trunk/src/it/update-project-license/verify.groovy 2010-06-26 11:14:41 UTC (rev 1785) +++ trunk/src/it/update-project-license/verify.groovy 2010-06-26 11:41:13 UTC (rev 1786) @@ -23,21 +23,4 @@ assert !content.contains( 'GNU LESSER GENERAL PUBLIC LICENSE' ); assert content.contains( 'GNU GENERAL PUBLIC LICENSE' ); -file = new File(basedir, 'target/classes/LICENSE.txt'); -assert file.exists(); - -content = file.text; -assert !content.contains( ';; This line will be removed!' ); -assert !content.contains( 'GNU LESSER GENERAL PUBLIC LICENSE' ); -assert content.contains( 'GNU GENERAL PUBLIC LICENSE' ); - - -file = new File(basedir, 'target/classes/META-INF/bundleLicense.txt'); -assert file.exists(); - -content = file.text; -assert !content.contains( ';; This line will be removed!' ); -assert !content.contains( 'GNU LESSER GENERAL PUBLIC LICENSE' ); -assert content.contains( 'GNU GENERAL PUBLIC LICENSE' ); - return true;
participants (1)
-
tchemit@users.nuiton.org