Maven-license-plugin-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
June 2010
- 1 participants
- 28 discussions
Author: tchemit
Date: 2010-06-26 14:43:41 +0200 (Sat, 26 Jun 2010)
New Revision: 1788
Url: http://nuiton.org/repositories/revision/maven-license-plugin/1788
Log:
improve doc
Modified:
trunk/src/site/apt/usage.apt
trunk/src/site/fr/apt/usage.apt
Modified: trunk/src/site/apt/usage.apt
===================================================================
--- trunk/src/site/apt/usage.apt 2010-06-26 12:08:42 UTC (rev 1787)
+++ trunk/src/site/apt/usage.apt 2010-06-26 12:43:41 UTC (rev 1788)
@@ -95,30 +95,35 @@
*** 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>commons-primitives</groupId>
+ <artifactId>commons-primitives</artifactId>
+ <version>1.0</version>
+ </dependency>
+
+ </dependencies>
+-------------------------------------------------------------------------------
+
Here is a <<THIRD-PARTY>> file with unamed licenses launched by
--------------------------------------------------------------------------------
mvn license:add-third-party -DuseMissingFile
-List of 18 third-party dependencies.
+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)
- (BSD) jxlayer (org.swinglabs:jxlayer:3.0.3 - http://www.swinglabs.org/)
- (Common Public License Version 1.0) JUnit (junit:junit:4.8.1 - http://junit.org)
- (Lesser General Public License (LGPL) v 3.0) I18n :: Api (org.nuiton.i18n:nuiton-i18n:1.2.2 - http://maven-site.nuiton.org/i18n/nuiton-i18n)
- (Lesser General Public License (LGPL) v 3.0) Nuiton Utils (org.nuiton:nuiton-utils:1.3.1 - http://maven-site.nuiton.org/nuiton-utils)
- (Lesser General Public License (LGPL)) Swing Layout Extensions (org.swinglabs:swing-worker:1.1 - https://swingworker.dev.java.net/)
- (Lesser General Public License (LGPL)) SwingX (org.swinglabs:swingx:1.6 - http://www.swinglabs.org/)
- (The Apache Software License, Version 2.0) Apache Log4j (log4j:log4j:1.2.16 - http://logging.apache.org/log4j/1.2/)
- (The Apache Software License, Version 2.0) Commons BeanUtils (commons-beanutils:commons-beanutils:1.8.2 - http://commons.apache.org/beanutils/)
- (The Apache Software License, Version 2.0) Commons Collections (commons-collections:commons-collections:3.2.1 - http://commons.apache.org/collections/)
- (The Apache Software License, Version 2.0) Commons IO (commons-io:commons-io:1.4 - http://commons.apache.org/io/)
- (The Apache Software License, Version 2.0) Commons JXPath (commons-jxpath:commons-jxpath:1.3 - http://commons.apache.org/jxpath/)
- (The Apache Software License, Version 2.0) Commons Lang (commons-lang:commons-lang:2.4 - http://commons.apache.org/lang/)
(The Apache Software License, Version 2.0) Commons Logging (commons-logging:commons-logging:1.1.1 - http://commons.apache.org/logging)
- (The OpenSymphony Software License 1.1) XWork (com.opensymphony:xwork:2.1.3 - http://www.opensymphony.com/xwork)
- (Unknown license) JavaHelp API (javax.help:javahelp:2.0.02 - http://java.sun.com/products/javahelp/index.jsp)
- (Unknown license) OGNL - Object Graph Navigation Library (opensymphony:ognl:2.6.11 - http://ognl.org)
(Unknown license) Unnamed - commons-primitives:commons-primitives:jar:1.0 (commons-primitives:commons-primitives:1.0 - no url defined)
--------------------------------------------------------------------------------
@@ -128,22 +133,13 @@
# Generated by org.nuiton.license.plugin.AddThirdPartyMojo
#-------------------------------------------------------------------------------
# Already used licenses in project :
-# - Apache License, Version 2.0
-# - BSD
-# - Common Public License Version 1.0
-# - Lesser General Public License (LGPL)
-# - Lesser General Public License (LGPL) v 3.0
-# - Sun Microsystems, Inc. Binary Code License Agreement for the JDK 5.0
# - The Apache Software License, Version 2.0
-# - The OpenSymphony Software License 1.1
#-------------------------------------------------------------------------------
# Please fill the missing licenses for dependencies :
#
#
#Fri Jun 25 10:56:39 CEST 2010
commons-primitives--commons-primitives--1.0=
-javax.help--javahelp--2.0.02=
-opensymphony--ognl--2.6.11=
--------------------------------------------------------------------------------
Fills the file :
@@ -152,47 +148,22 @@
# Generated by org.nuiton.license.plugin.AddThirdPartyMojo
#-------------------------------------------------------------------------------
# Already used licenses in project :
-# - Apache License, Version 2.0
-# - BSD
-# - Common Public License Version 1.0
-# - Lesser General Public License (LGPL)
-# - Lesser General Public License (LGPL) v 3.0
-# - Sun Microsystems, Inc. Binary Code License Agreement for the JDK 5.0
# - The Apache Software License, Version 2.0
-# - The OpenSymphony Software License 1.1
#-------------------------------------------------------------------------------
# Please fill the missing licenses for dependencies :
#
#
#Fri Jun 25 10:56:39 CEST 2010
commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
-javax.help--javahelp--2.0.02=Sun Microsystems, Inc. Binary Code License Agreement for the JDK 5.0
-opensymphony--ognl--2.6.11=The OpenSymphony Software License 1.1
--------------------------------------------------------------------------------
Finally, relaunch the goal to obtain new generated <<THIRD-PARTY.txt>> file :
-------------------------------------------------------------------------------
-List of 18 third-party dependencies.
+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)
- (BSD) jxlayer (org.swinglabs:jxlayer:3.0.3 - http://www.swinglabs.org/)
- (Common Public License Version 1.0) JUnit (junit:junit:4.8.1 - http://junit.org)
- (Lesser General Public License (LGPL) v 3.0) I18n :: Api (org.nuiton.i18n:nuiton-i18n:1.2.2 - http://maven-site.nuiton.org/i18n/nuiton-i18n)
- (Lesser General Public License (LGPL) v 3.0) Nuiton Utils (org.nuiton:nuiton-utils:1.3.1 - http://maven-site.nuiton.org/nuiton-utils)
- (Lesser General Public License (LGPL)) Swing Layout Extensions (org.swinglabs:swing-worker:1.1 - https://swingworker.dev.java.net/)
- (Lesser General Public License (LGPL)) SwingX (org.swinglabs:swingx:1.6 - http://www.swinglabs.org/)
- (Sun Microsystems, Inc. Binary Code License Agreement for the JDK 5.0) JavaHelp API (javax.help:javahelp:2.0.02 - http://java.sun.com/products/javahelp/index.jsp)
- (The Apache Software License, Version 2.0) Apache Log4j (log4j:log4j:1.2.16 - http://logging.apache.org/log4j/1.2/)
- (The Apache Software License, Version 2.0) Commons BeanUtils (commons-beanutils:commons-beanutils:1.8.2 - http://commons.apache.org/beanutils/)
- (The Apache Software License, Version 2.0) Commons Collections (commons-collections:commons-collections:3.2.1 - http://commons.apache.org/collections/)
- (The Apache Software License, Version 2.0) Commons IO (commons-io:commons-io:1.4 - http://commons.apache.org/io/)
- (The Apache Software License, Version 2.0) Commons JXPath (commons-jxpath:commons-jxpath:1.3 - http://commons.apache.org/jxpath/)
- (The Apache Software License, Version 2.0) Commons Lang (commons-lang:commons-lang:2.4 - http://commons.apache.org/lang/)
(The Apache Software License, Version 2.0) Commons Logging (commons-logging:commons-logging:1.1.1 - http://commons.apache.org/logging)
(The Apache Software License, Version 2.0) Unnamed - commons-primitives:commons-primitives:jar:1.0 (commons-primitives:commons-primitives:1.0 - no url defined)
- (The OpenSymphony Software License 1.1) OGNL - Object Graph Navigation Library (opensymphony:ognl:2.6.11 - http://ognl.org)
- (The OpenSymphony Software License 1.1) XWork (com.opensymphony:xwork:2.1.3 - http://www.opensymphony.com/xwork)
-------------------------------------------------------------------------------
** Merge licenses.
Modified: trunk/src/site/fr/apt/usage.apt
===================================================================
--- trunk/src/site/fr/apt/usage.apt 2010-06-26 12:08:42 UTC (rev 1787)
+++ trunk/src/site/fr/apt/usage.apt 2010-06-26 12:43:41 UTC (rev 1788)
@@ -100,31 +100,37 @@
*** Exemple
+
+ Soit le pom avec ces dépendences :
+
+-------------------------------------------------------------------------------
+
+ <dependencies>
+
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-primitives</groupId>
+ <artifactId>commons-primitives</artifactId>
+ <version>1.0</version>
+ </dependency>
+
+ </dependencies>
+-------------------------------------------------------------------------------
+
Voici un fichier <<THIRD-PARTY.properties>> contenant des dépendances sans license
généré en lançant la commande :
--------------------------------------------------------------------------------
mvn license:add-third-party -DuseMissingFile
-List of 18 third-party dependencies.
+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)
- (BSD) jxlayer (org.swinglabs:jxlayer:3.0.3 - http://www.swinglabs.org/)
- (Common Public License Version 1.0) JUnit (junit:junit:4.8.1 - http://junit.org)
- (Lesser General Public License (LGPL) v 3.0) I18n :: Api (org.nuiton.i18n:nuiton-i18n:1.2.2 - http://maven-site.nuiton.org/i18n/nuiton-i18n)
- (Lesser General Public License (LGPL) v 3.0) Nuiton Utils (org.nuiton:nuiton-utils:1.3.1 - http://maven-site.nuiton.org/nuiton-utils)
- (Lesser General Public License (LGPL)) Swing Layout Extensions (org.swinglabs:swing-worker:1.1 - https://swingworker.dev.java.net/)
- (Lesser General Public License (LGPL)) SwingX (org.swinglabs:swingx:1.6 - http://www.swinglabs.org/)
- (The Apache Software License, Version 2.0) Apache Log4j (log4j:log4j:1.2.16 - http://logging.apache.org/log4j/1.2/)
- (The Apache Software License, Version 2.0) Commons BeanUtils (commons-beanutils:commons-beanutils:1.8.2 - http://commons.apache.org/beanutils/)
- (The Apache Software License, Version 2.0) Commons Collections (commons-collections:commons-collections:3.2.1 - http://commons.apache.org/collections/)
- (The Apache Software License, Version 2.0) Commons IO (commons-io:commons-io:1.4 - http://commons.apache.org/io/)
- (The Apache Software License, Version 2.0) Commons JXPath (commons-jxpath:commons-jxpath:1.3 - http://commons.apache.org/jxpath/)
- (The Apache Software License, Version 2.0) Commons Lang (commons-lang:commons-lang:2.4 - http://commons.apache.org/lang/)
(The Apache Software License, Version 2.0) Commons Logging (commons-logging:commons-logging:1.1.1 - http://commons.apache.org/logging)
- (The OpenSymphony Software License 1.1) XWork (com.opensymphony:xwork:2.1.3 - http://www.opensymphony.com/xwork)
- (Unknown license) JavaHelp API (javax.help:javahelp:2.0.02 - http://java.sun.com/products/javahelp/index.jsp)
- (Unknown license) OGNL - Object Graph Navigation Library (opensymphony:ognl:2.6.11 - http://ognl.org)
(Unknown license) Unnamed - commons-primitives:commons-primitives:jar:1.0 (commons-primitives:commons-primitives:1.0 - no url defined)
--------------------------------------------------------------------------------
@@ -134,22 +140,13 @@
# Generated by org.nuiton.license.plugin.AddThirdPartyMojo
#-------------------------------------------------------------------------------
# Already used licenses in project :
-# - Apache License, Version 2.0
-# - BSD
-# - Common Public License Version 1.0
-# - Lesser General Public License (LGPL)
-# - Lesser General Public License (LGPL) v 3.0
-# - Sun Microsystems, Inc. Binary Code License Agreement for the JDK 5.0
# - The Apache Software License, Version 2.0
-# - The OpenSymphony Software License 1.1
#-------------------------------------------------------------------------------
# Please fill the missing licenses for dependencies :
#
#
#Fri Jun 25 10:56:39 CEST 2010
commons-primitives--commons-primitives--1.0=
-javax.help--javahelp--2.0.02=
-opensymphony--ognl--2.6.11=
--------------------------------------------------------------------------------
On renseigne le fichier :
@@ -158,47 +155,22 @@
# Generated by org.nuiton.license.plugin.AddThirdPartyMojo
#-------------------------------------------------------------------------------
# Already used licenses in project :
-# - Apache License, Version 2.0
-# - BSD
-# - Common Public License Version 1.0
-# - Lesser General Public License (LGPL)
-# - Lesser General Public License (LGPL) v 3.0
-# - Sun Microsystems, Inc. Binary Code License Agreement for the JDK 5.0
# - The Apache Software License, Version 2.0
-# - The OpenSymphony Software License 1.1
#-------------------------------------------------------------------------------
# Please fill the missing licenses for dependencies :
#
#
#Fri Jun 25 10:56:39 CEST 2010
commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
-javax.help--javahelp--2.0.02=Sun Microsystems, Inc. Binary Code License Agreement for the JDK 5.0
-opensymphony--ognl--2.6.11=The OpenSymphony Software License 1.1
--------------------------------------------------------------------------------
En relançant le goal on obtient le nouveau fichier <<THIRD-PARTY.txt>> suivant :
-------------------------------------------------------------------------------
-List of 18 third-party dependencies.
+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)
- (BSD) jxlayer (org.swinglabs:jxlayer:3.0.3 - http://www.swinglabs.org/)
- (Common Public License Version 1.0) JUnit (junit:junit:4.8.1 - http://junit.org)
- (Lesser General Public License (LGPL) v 3.0) I18n :: Api (org.nuiton.i18n:nuiton-i18n:1.2.2 - http://maven-site.nuiton.org/i18n/nuiton-i18n)
- (Lesser General Public License (LGPL) v 3.0) Nuiton Utils (org.nuiton:nuiton-utils:1.3.1 - http://maven-site.nuiton.org/nuiton-utils)
- (Lesser General Public License (LGPL)) Swing Layout Extensions (org.swinglabs:swing-worker:1.1 - https://swingworker.dev.java.net/)
- (Lesser General Public License (LGPL)) SwingX (org.swinglabs:swingx:1.6 - http://www.swinglabs.org/)
- (Sun Microsystems, Inc. Binary Code License Agreement for the JDK 5.0) JavaHelp API (javax.help:javahelp:2.0.02 - http://java.sun.com/products/javahelp/index.jsp)
- (The Apache Software License, Version 2.0) Apache Log4j (log4j:log4j:1.2.16 - http://logging.apache.org/log4j/1.2/)
- (The Apache Software License, Version 2.0) Commons BeanUtils (commons-beanutils:commons-beanutils:1.8.2 - http://commons.apache.org/beanutils/)
- (The Apache Software License, Version 2.0) Commons Collections (commons-collections:commons-collections:3.2.1 - http://commons.apache.org/collections/)
- (The Apache Software License, Version 2.0) Commons IO (commons-io:commons-io:1.4 - http://commons.apache.org/io/)
- (The Apache Software License, Version 2.0) Commons JXPath (commons-jxpath:commons-jxpath:1.3 - http://commons.apache.org/jxpath/)
- (The Apache Software License, Version 2.0) Commons Lang (commons-lang:commons-lang:2.4 - http://commons.apache.org/lang/)
(The Apache Software License, Version 2.0) Commons Logging (commons-logging:commons-logging:1.1.1 - http://commons.apache.org/logging)
(The Apache Software License, Version 2.0) Unnamed - commons-primitives:commons-primitives:jar:1.0 (commons-primitives:commons-primitives:1.0 - no url defined)
- (The OpenSymphony Software License 1.1) OGNL - Object Graph Navigation Library (opensymphony:ognl:2.6.11 - http://ognl.org)
- (The OpenSymphony Software License 1.1) XWork (com.opensymphony:xwork:2.1.3 - http://www.opensymphony.com/xwork)
-------------------------------------------------------------------------------
** Fusionner les licenses.
1
0
Author: tchemit
Date: 2010-06-26 14:08:42 +0200 (Sat, 26 Jun 2010)
New Revision: 1787
Url: http://nuiton.org/repositories/revision/maven-license-plugin/1787
Log:
add example for merge licenses
Modified:
trunk/src/site/apt/usage.apt
trunk/src/site/fr/apt/usage.apt
trunk/src/site/site_en.xml
trunk/src/site/site_fr.xml
Modified: trunk/src/site/apt/usage.apt
===================================================================
--- trunk/src/site/apt/usage.apt 2010-06-26 11:41:13 UTC (rev 1786)
+++ trunk/src/site/apt/usage.apt 2010-06-26 12:08:42 UTC (rev 1787)
@@ -93,6 +93,8 @@
Once the file filled, just relaunch the goal to integrate your modifications
in the generated <<THIRD-PARTY>> file.
+*** Example
+
Here is a <<THIRD-PARTY>> file with unamed licenses launched by
--------------------------------------------------------------------------------
@@ -198,18 +200,75 @@
to merge licenses added in <<THIRd-PARTY>> file, you have to add a <<licenseMerges>>
to the plugin this configuration :
+ Each entry of <<licenseMerges>> describe a merge, the first license is the one to keep.
+
+
+*** Example
+
+ Given a pom with these dependencies :
+
-------------------------------------------------------------------------------
- <configuration>
- <licenseMerges>
- <licenseMerge>
- Lesser General Public License (LGPL) v 3.0|Lesser General Public License (LGPL)
- </licenseMerge>
- </licenseMerges>
- </configuration>
+
+ <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>
-------------------------------------------------------------------------------
- Each entry of <<mergeLicenses>> describe a merge, the first license is the one to keep.
+ While executing <add-third-party> goal, 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)
+-------------------------------------------------------------------------------
+
+ Now, adds this configuration in your pom
+
+-------------------------------------------------------------------------------
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-license-plugin</artifactId>
+ <version>2.3</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>
+-------------------------------------------------------------------------------
+
+ and relaunch the goal, we now 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)
+ (The Apache Software 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
Modified: trunk/src/site/fr/apt/usage.apt
===================================================================
--- trunk/src/site/fr/apt/usage.apt 2010-06-26 11:41:13 UTC (rev 1786)
+++ trunk/src/site/fr/apt/usage.apt 2010-06-26 12:08:42 UTC (rev 1787)
@@ -98,6 +98,8 @@
Une fois le fichier complété, il suffit de relancer le goal, le nouveau
THIRD-PARTY généré intègrera les licenses complétées.
+*** Exemple
+
Voici un fichier <<THIRD-PARTY.properties>> contenant des dépendances sans license
généré en lançant la commande :
@@ -202,21 +204,77 @@
** Fusionner les licenses.
Pour fusionner des licenses dans le fichier THIRd-PARTY, il faut utiliser
- la configuration <<licenseMerges>>, comme dans l'exemple suivant :
+ la configuration <<licenseMerges>>.
+ Chaque entrée de <<licenseMerges>> décrit une fusion, la première license
+ étant celle à conserver.
+
+*** Exemple
+
+ Soit le pom avec ces dépendences :
+
-------------------------------------------------------------------------------
- <configuration>
- <licenseMerges>
- <licenseMerge>
- Lesser General Public License (LGPL) v 3.0|Lesser General Public License (LGPL)
- </licenseMerge>
- </licenseMerges>
- </configuration>
+
+ <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>
-------------------------------------------------------------------------------
- Chaque entrée de <<mergeLicenses>> décrit une fusion, la première license
- étant celle à conserver.
+ On obtient le fichier <<THIRD-PARTY>> suivant :
+-------------------------------------------------------------------------------
+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)
+-------------------------------------------------------------------------------
+
+ En ajoutant cela à la configuration du plugin
+
+-------------------------------------------------------------------------------
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-license-plugin</artifactId>
+ <version>2.3</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>
+-------------------------------------------------------------------------------
+
+ et en relançant le goal, on obtient le fichier <<THIRD-PARTY>> suivant :
+
+-------------------------------------------------------------------------------
+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)
+ (The Apache Software License, Version 2.0) JHLabs Image Processing Filters (com.jhlabs:filters:2.0.235 - http://www.jhlabs.com/ip/index.html)
+-------------------------------------------------------------------------------
+
Obtenir des informations
* license-list goal
Modified: trunk/src/site/site_en.xml
===================================================================
--- trunk/src/site/site_en.xml 2010-06-26 11:41:13 UTC (rev 1786)
+++ trunk/src/site/site_en.xml 2010-06-26 12:08:42 UTC (rev 1787)
@@ -59,11 +59,11 @@
<item name="File header model" href="header.html"/>
<item name="License project descriptor" href="descriptor.html"/>
<item name="Usage" href="usage.html">
- <item name="License" href="usage.html#license">
+ <item name="License" href="usage.html#License">
<item name="update-project-license" href="update-project-license-mojo.html"/>
<item name="update-file-header" href="update-file-header-mojo.html"/>
</item>
- <item name="Third-party" href="usage.html#third-party">
+ <item name="Third-party" href="usage.html#Third-party">
<item name="add-third-party" href="add-third-party-mojo.html"/>
<item name="aggregate-add-third-party" href="aggregate-add-third-party-mojo.html"/>
</item>
Modified: trunk/src/site/site_fr.xml
===================================================================
--- trunk/src/site/site_fr.xml 2010-06-26 11:41:13 UTC (rev 1786)
+++ trunk/src/site/site_fr.xml 2010-06-26 12:08:42 UTC (rev 1787)
@@ -58,11 +58,11 @@
<item name="Modèle de header de fichier" href="header.html"/>
<item name="Descripteur de license du projet" href="descriptor.html"/>
<item name="Usage" href="usage.html">
- <item name="License" href="usage.html#license">
+ <item name="License" href="usage.html#License">
<item name="update-project-license" href="update-project-license-mojo.html"/>
<item name="update-file-header" href="update-file-header-mojo.html"/>
</item>
- <item name="Third-party" href="usage.html#third-party">
+ <item name="Third-party" href="usage.html#Third-party">
<item name="add-third-party" href="add-third-party-mojo.html"/>
<item name="aggregate-add-third-party" href="aggregate-add-third-party-mojo.html"/>
</item>
1
0
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
by tchemit@users.nuiton.org 26 Jun '10
by tchemit@users.nuiton.org 26 Jun '10
26 Jun '10
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;
1
0
r1785 - in trunk: . src/main/java/org/nuiton/license/plugin src/site/apt src/site/fr/apt
by tchemit@users.nuiton.org 26 Jun '10
by tchemit@users.nuiton.org 26 Jun '10
26 Jun '10
Author: tchemit
Date: 2010-06-26 13:14:41 +0200 (Sat, 26 Jun 2010)
New Revision: 1785
Url: http://nuiton.org/repositories/revision/maven-license-plugin/1785
Log:
Evolution #718: Add merge licenses possible on THIRD-PARTY
Modified:
trunk/pom.xml
trunk/src/main/java/org/nuiton/license/plugin/AbstractAddThirdPartyMojo.java
trunk/src/main/java/org/nuiton/license/plugin/LicenseMap.java
trunk/src/site/apt/usage.apt
trunk/src/site/fr/apt/usage.apt
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-06-26 10:13:05 UTC (rev 1784)
+++ trunk/pom.xml 2010-06-26 11:14:41 UTC (rev 1785)
@@ -339,7 +339,7 @@
<!-- documentation is in english then french -->
<locales>en,fr</locales>
- <javadoc.version>2.6</javadoc.version>
+ <!--<javadoc.version>2.7</javadoc.version>-->
</properties>
@@ -432,7 +432,7 @@
<localRepositoryPath>${basedir}/target/local-repo</localRepositoryPath>
<settingsFile>src/it/settings.xml</settingsFile>
<cloneProjectsTo>${project.build.directory}/its</cloneProjectsTo>
- <!--<debug>true</debug>-->
+ <debug>true</debug>
</configuration>
<executions>
<execution>
Modified: trunk/src/main/java/org/nuiton/license/plugin/AbstractAddThirdPartyMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AbstractAddThirdPartyMojo.java 2010-06-26 10:13:05 UTC (rev 1784)
+++ trunk/src/main/java/org/nuiton/license/plugin/AbstractAddThirdPartyMojo.java 2010-06-26 11:14:41 UTC (rev 1785)
@@ -86,11 +86,29 @@
* The file where to fill the license for dependencies with unknwon license.
*
* @parameter expression="${license.missingFile}" default-value="src/license/THIRD-PARTY.properties"
- * @since 1.0.0
+ * @since 2.3
*/
protected File missingFile;
/**
+ * To merge licenses in final file.
+ * <p/>
+ * Each entry represents a merge (first license is main license to keep), licenses are separated by {@code |}.
+ * <p/>
+ * Example :
+ * <p/>
+ * <pre>
+ * <licenseMerges>
+ * <licenseMerge>The Apache Software License|Version 2.0,Apache License, Version 2.0</licenseMerge>
+ * </licenseMerges>
+ * </pre>
+ *
+ * @parameter
+ * @since 2.3
+ */
+ protected List<String> licenseMerges;
+
+ /**
* The path of the bundled third party file to produce when
* {@link #generateBundle} is on.
* <p/>
@@ -114,7 +132,7 @@
* Un flag pour forcer la generation.
*
* @parameter expression="${license.force}" default-value="false"
- * @since 1.0.0
+ * @since 2.3
*/
protected boolean force;
@@ -138,7 +156,6 @@
*/
protected boolean groupByLicense;
-
private LicenseMap licenseMap;
private SortedSet<MavenProject> unsafeDependencies;
@@ -208,22 +225,31 @@
}
licenseMap = createLicenseMap();
- licenseMap.setLog(log);
unsafeDependencies = licenseMap.getUnsafeDependencies();
- if (CollectionUtils.isEmpty(unsafeDependencies) ||
- !isUseMissingFile() ||
- !isDoGenerate()) {
+ if (!CollectionUtils.isEmpty(unsafeDependencies) &&
+ isUseMissingFile() &&
+ isDoGenerate()) {
- // no unsafe dependencies
- // or user does not ask to generate missing file
- // so no more thing to do
- return;
+ // load unsafeMapping
+ unsafeMappings = createUnsafeMapping();
}
- // load unsafeMapping
- unsafeMappings = createUnsafeMapping();
+ if (!CollectionUtils.isEmpty(licenseMerges)) {
+
+ // merge licenses in license map
+
+ for (String merge : licenseMerges) {
+ merge = merge.trim();
+ if (isVerbose()) {
+ getLog().info("Will merge [" + merge + "]");
+ }
+ String[] split = merge.split("\\|");
+
+ licenseMap.mergeLicenses(split);
+ }
+ }
}
protected boolean checkUnsafeDependencies() {
Modified: trunk/src/main/java/org/nuiton/license/plugin/LicenseMap.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/LicenseMap.java 2010-06-26 10:13:05 UTC (rev 1784)
+++ trunk/src/main/java/org/nuiton/license/plugin/LicenseMap.java 2010-06-26 11:14:41 UTC (rev 1785)
@@ -110,11 +110,15 @@
SortedSet<MavenProject> unsafeDependencies = get(getUnknownLicenseMessage());
if (log.isDebugEnabled()) {
- log.debug("There is " + unsafeDependencies.size() + " dependencies with no license from poms : ");
- for (MavenProject dep : unsafeDependencies) {
+ if (CollectionUtils.isEmpty(unsafeDependencies)) {
+ log.debug("There is no dependency with no license from poms.");
+ } else {
+ log.debug("There is " + unsafeDependencies.size() + " dependencies with no license from poms : ");
+ for (MavenProject dep : unsafeDependencies) {
- // no license found for the dependency
- log.debug(" - " + AbstractAddThirdPartyMojo.getArtifactId(dep.getArtifact()));
+ // no license found for the dependency
+ log.debug(" - " + AbstractAddThirdPartyMojo.getArtifactId(dep.getArtifact()));
+ }
}
}
@@ -131,8 +135,8 @@
// there is some unsafe dependencies
if (missingFile.exists()) {
- getLog().info("Load missing file "+missingFile);
-
+ getLog().info("Load missing file " + missingFile);
+
// load the missing file
unsafeMappings.load(missingFile);
}
@@ -244,4 +248,30 @@
}
return projectComparator;
}
+
+ public void mergeLicenses(String... licenses) {
+ if (licenses.length == 0) {
+ return;
+ }
+
+ String mainLicense = licenses[0].trim();
+ SortedSet<MavenProject> mainSet = get(mainLicense);
+ if (mainSet == null) {
+ getLog().warn("No license [" + mainLicense + "] found, can not merge.");
+ return;
+ }
+ int size = licenses.length;
+ for (int i = 1; i < size; i++) {
+ String license = licenses[i].trim();
+ SortedSet<MavenProject> set = get(license);
+ if (set == null) {
+ getLog().warn("No license [" + license + "] found, skip this merge.");
+ continue;
+ }
+ getLog().info("Merge license [" + license + "] (" + set.size() + " depedencies).");
+ mainSet.addAll(set);
+ set.clear();
+ remove(license);
+ }
+ }
}
Modified: trunk/src/site/apt/usage.apt
===================================================================
--- trunk/src/site/apt/usage.apt 2010-06-26 10:13:05 UTC (rev 1784)
+++ trunk/src/site/apt/usage.apt 2010-06-26 11:14:41 UTC (rev 1785)
@@ -93,9 +93,11 @@
Once the file filled, just relaunch the goal to integrate your modifications
in the generated <<THIRD-PARTY>> file.
- Here is a <<THIRD-PARTY>> file with unamed licenses :
+ Here is a <<THIRD-PARTY>> file with unamed licenses launched by
--------------------------------------------------------------------------------
+mvn license:add-third-party -DuseMissingFile
+
List of 18 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)
@@ -142,7 +144,7 @@
opensymphony--ognl--2.6.11=
--------------------------------------------------------------------------------
- Fills the file :
+ Fills the file :
--------------------------------------------------------------------------------
# Generated by org.nuiton.license.plugin.AddThirdPartyMojo
@@ -164,7 +166,7 @@
commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
javax.help--javahelp--2.0.02=Sun Microsystems, Inc. Binary Code License Agreement for the JDK 5.0
opensymphony--ognl--2.6.11=The OpenSymphony Software License 1.1
- --------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
Finally, relaunch the goal to obtain new generated <<THIRD-PARTY.txt>> file :
@@ -193,15 +195,16 @@
** Merge licenses.
- to merge licenses added in <<THIRd-PARTY>> file, you have to add this configuration :
+ to merge licenses added in <<THIRd-PARTY>> file, you have to add a <<licenseMerges>>
+ to the plugin this configuration :
-------------------------------------------------------------------------------
<configuration>
- <mergeLicenses>
- <mergeLicense>
+ <licenseMerges>
+ <licenseMerge>
Lesser General Public License (LGPL) v 3.0|Lesser General Public License (LGPL)
- </mergeLicense>
- </mergeLicenses>
+ </licenseMerge>
+ </licenseMerges>
</configuration>
-------------------------------------------------------------------------------
Modified: trunk/src/site/fr/apt/usage.apt
===================================================================
--- trunk/src/site/fr/apt/usage.apt 2010-06-26 10:13:05 UTC (rev 1784)
+++ trunk/src/site/fr/apt/usage.apt 2010-06-26 11:14:41 UTC (rev 1785)
@@ -99,9 +99,11 @@
THIRD-PARTY généré intègrera les licenses complétées.
Voici un fichier <<THIRD-PARTY.properties>> contenant des dépendances sans license
- généré
+ généré en lançant la commande :
--------------------------------------------------------------------------------
+mvn license:add-third-party -DuseMissingFile
+
List of 18 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)
@@ -148,7 +150,7 @@
opensymphony--ognl--2.6.11=
--------------------------------------------------------------------------------
- On renseigne le fichier :
+ On renseigne le fichier :
--------------------------------------------------------------------------------
# Generated by org.nuiton.license.plugin.AddThirdPartyMojo
@@ -170,7 +172,7 @@
commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
javax.help--javahelp--2.0.02=Sun Microsystems, Inc. Binary Code License Agreement for the JDK 5.0
opensymphony--ognl--2.6.11=The OpenSymphony Software License 1.1
- --------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
En relançant le goal on obtient le nouveau fichier <<THIRD-PARTY.txt>> suivant :
@@ -200,15 +202,15 @@
** Fusionner les licenses.
Pour fusionner des licenses dans le fichier THIRd-PARTY, il faut utiliser
- la configuration <<mergeLicenses>>, comme dans l'exemple suivant :
+ la configuration <<licenseMerges>>, comme dans l'exemple suivant :
-------------------------------------------------------------------------------
<configuration>
- <mergeLicenses>
- <mergeLicense>
+ <licenseMerges>
+ <licenseMerge>
Lesser General Public License (LGPL) v 3.0|Lesser General Public License (LGPL)
- </mergeLicense>
- </mergeLicenses>
+ </licenseMerge>
+ </licenseMerges>
</configuration>
-------------------------------------------------------------------------------
1
0
26 Jun '10
Author: tchemit
Date: 2010-06-26 12:13:05 +0200 (Sat, 26 Jun 2010)
New Revision: 1784
Url: http://nuiton.org/repositories/revision/maven-license-plugin/1784
Log:
improve logs
Modified:
trunk/src/main/java/org/nuiton/license/plugin/AbstractAddThirdPartyMojo.java
trunk/src/main/java/org/nuiton/license/plugin/AggregatorAddThirdPartyMojo.java
Modified: trunk/src/main/java/org/nuiton/license/plugin/AbstractAddThirdPartyMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AbstractAddThirdPartyMojo.java 2010-06-26 10:05:41 UTC (rev 1783)
+++ trunk/src/main/java/org/nuiton/license/plugin/AbstractAddThirdPartyMojo.java 2010-06-26 10:13:05 UTC (rev 1784)
@@ -328,7 +328,7 @@
}
String content = sb.toString();
- log.info("writing third-party file to " + target);
+ log.info("Writing third-party file to " + target);
if (isVerbose()) {
log.info(content);
}
@@ -341,7 +341,7 @@
// creates the bundled license file
File bundleTarget =
PluginHelper.getFile(getOutputDirectory(), getBundleThirdPartyPath());
- log.info("writing bundled third-party file to " + bundleTarget);
+ log.info("Writing bundled third-party file to " + bundleTarget);
copyFile(target, bundleTarget);
}
}
Modified: trunk/src/main/java/org/nuiton/license/plugin/AggregatorAddThirdPartyMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AggregatorAddThirdPartyMojo.java 2010-06-26 10:05:41 UTC (rev 1783)
+++ trunk/src/main/java/org/nuiton/license/plugin/AggregatorAddThirdPartyMojo.java 2010-06-26 10:13:05 UTC (rev 1784)
@@ -113,8 +113,6 @@
if (file.exists()) {
- getLog().info("Load missing file : " + file);
-
SortedProperties tmp = licenseMap.loadUnsafeMapping(getEncoding(), file);
unsafeMappings.putAll(tmp);
}
1
0
26 Jun '10
Author: tchemit
Date: 2010-06-26 12:05:41 +0200 (Sat, 26 Jun 2010)
New Revision: 1783
Url: http://nuiton.org/repositories/revision/maven-license-plugin/1783
Log:
improve when to generate missing file
Modified:
trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java
Modified: trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java 2010-06-26 09:53:04 UTC (rev 1782)
+++ trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java 2010-06-26 10:05:41 UTC (rev 1783)
@@ -129,9 +129,21 @@
SortedSet<MavenProject> unsafeDependencies = getUnsafeDependencies();
- setDoGenerateMissing(!CollectionUtils.isEmpty(unsafeDependencies) &&
- isUseMissingFile());
+ if (isVerbose()) {
+ getLog().info("found " + unsafeMappings.size() + " unsafe mappings");
+ }
+ if (isForce()) {
+
+ // use missingFile and found some unsafe dependencies
+ setDoGenerateMissing(isUseMissingFile() && !CollectionUtils.isEmpty(unsafeMappings.keySet()));
+ } else {
+
+ // use missingFile and still have some unsafe dependencies
+ setDoGenerateMissing(isUseMissingFile() && !CollectionUtils.isEmpty(unsafeDependencies));
+ }
+
+
return unsafeMappings;
}
@@ -173,9 +185,8 @@
File file = getMissingFile();
createDirectoryIfNecessary(file.getParentFile());
- if (isVerbose()) {
- log.info("regenerate missing license file " + file);
- }
+ log.info("Regenerate missing license file " + file);
+
FileWriter writer = new FileWriter(file);
try {
StringBuilder sb = new StringBuilder(" Generated by " + getClass().getName());
1
0
r1782 - in trunk: . src/it src/it/aggregate-add-third-party src/it/aggregate-add-third-party/child1 src/it/aggregate-add-third-party/child2
by tchemit@users.nuiton.org 26 Jun '10
by tchemit@users.nuiton.org 26 Jun '10
26 Jun '10
Author: tchemit
Date: 2010-06-26 11:53:04 +0200 (Sat, 26 Jun 2010)
New Revision: 1782
Url: http://nuiton.org/repositories/revision/maven-license-plugin/1782
Log:
add integration test for aggregate-add-third-party mojo
Added:
trunk/src/it/aggregate-add-third-party/
trunk/src/it/aggregate-add-third-party/child1/
trunk/src/it/aggregate-add-third-party/child1/pom.xml
trunk/src/it/aggregate-add-third-party/child2/
trunk/src/it/aggregate-add-third-party/child2/pom.xml
trunk/src/it/aggregate-add-third-party/invoker.properties
trunk/src/it/aggregate-add-third-party/pom.xml
trunk/src/it/aggregate-add-third-party/verify.groovy
Modified:
trunk/pom.xml
trunk/src/it/settings.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-06-26 09:32:52 UTC (rev 1781)
+++ trunk/pom.xml 2010-06-26 09:53:04 UTC (rev 1782)
@@ -421,6 +421,7 @@
<artifactId>maven-invoker-plugin</artifactId>
<configuration>
<pomIncludes>
+ <pomInclude>aggregate-add-third-party/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/aggregate-add-third-party/child1/pom.xml
===================================================================
--- trunk/src/it/aggregate-add-third-party/child1/pom.xml (rev 0)
+++ trunk/src/it/aggregate-add-third-party/child1/pom.xml 2010-06-26 09:53:04 UTC (rev 1782)
@@ -0,0 +1,31 @@
+<?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 *************************************** -->
+ <!-- ************************************************************* -->
+
+ <parent>
+ <groupId>org.nuiton.license.test</groupId>
+ <artifactId>test-aggregate-add-third-party</artifactId>
+ <version>@pom.version@</version>
+ </parent>
+ <artifactId>test-aggregate-add-third-party-child1</artifactId>
+
+ <name>License Test :: aggregate-add-third-party - child 1</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1.1</version>
+ </dependency>
+ </dependencies>
+
+</project>
+
+
Property changes on: trunk/src/it/aggregate-add-third-party/child1/pom.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/src/it/aggregate-add-third-party/child2/pom.xml
===================================================================
--- trunk/src/it/aggregate-add-third-party/child2/pom.xml (rev 0)
+++ trunk/src/it/aggregate-add-third-party/child2/pom.xml 2010-06-26 09:53:04 UTC (rev 1782)
@@ -0,0 +1,28 @@
+<?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>
+
+ <parent>
+ <groupId>org.nuiton.license.test</groupId>
+ <artifactId>test-aggregate-add-third-party</artifactId>
+ <version>@pom.version@</version>
+ </parent>
+ <artifactId>test-aggregate-add-third-party-child2</artifactId>
+
+ <name>License Test :: aggregate-add-third-party - child 2</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
+
+
Property changes on: trunk/src/it/aggregate-add-third-party/child2/pom.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/src/it/aggregate-add-third-party/invoker.properties
===================================================================
--- trunk/src/it/aggregate-add-third-party/invoker.properties (rev 0)
+++ trunk/src/it/aggregate-add-third-party/invoker.properties 2010-06-26 09:53:04 UTC (rev 1782)
@@ -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:aggregate-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/aggregate-add-third-party/invoker.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/src/it/aggregate-add-third-party/pom.xml
===================================================================
--- trunk/src/it/aggregate-add-third-party/pom.xml (rev 0)
+++ trunk/src/it/aggregate-add-third-party/pom.xml 2010-06-26 09:53:04 UTC (rev 1782)
@@ -0,0 +1,49 @@
+<?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>
+
+ <groupId>org.nuiton.license.test</groupId>
+ <artifactId>test-aggregate-add-third-party</artifactId>
+ <version>@pom.version@</version>
+
+ <modules>
+ <module>child1</module>
+ <module>child2</module>
+ </modules>
+
+ <name>License Test :: aggregate-add-third-party</name>
+
+ <packaging>pom</packaging>
+
+ <properties>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <license.generateBundle>true</license.generateBundle>
+ <license.verbose>true</license.verbose>
+ </properties>
+
+ <!--build>
+
+ <plugins>
+
+ <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>
+
+
Property changes on: trunk/src/it/aggregate-add-third-party/pom.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/src/it/aggregate-add-third-party/verify.groovy
===================================================================
--- trunk/src/it/aggregate-add-third-party/verify.groovy (rev 0)
+++ trunk/src/it/aggregate-add-third-party/verify.groovy 2010-06-26 09:53:04 UTC (rev 1782)
@@ -0,0 +1,44 @@
+
+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( '(Common Public License Version 1.0) JUnit (junit:junit:4.8.1 - http://junit.org)' );
+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/META-INF/test-aggregate-add-third-party-THIRD-PARTY.txt');
+assert file.exists();
+content = file.text;
+assert !content.contains( 'the project has no dependencies.' );
+assert content.contains( '(Common Public License Version 1.0) JUnit (junit:junit:4.8.1 - http://junit.org)' );
+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, 'child1/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( '(Common Public License Version 1.0) JUnit (junit:junit:4.8.1 - http://junit.org)' );
+
+file = new File(basedir, 'child1/target/generated-sources/license/META-INF/test-aggregate-add-third-party-child1-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( '(Common Public License Version 1.0) JUnit (junit:junit:4.8.1 - http://junit.org)' );
+
+file = new File(basedir, 'child2/target/generated-sources/license/THIRD-PARTY.txt');
+assert file.exists();
+content = file.text;
+assert !content.contains( 'the project has no dependencies.' );
+assert content.contains( '(Common Public License Version 1.0) JUnit (junit:junit:4.8.1 - http://junit.org)' );
+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, 'child2/target/generated-sources/license/META-INF/test-aggregate-add-third-party-child2-THIRD-PARTY.txt');
+assert file.exists();
+content = file.text;
+assert !content.contains( 'the project has no dependencies.' );
+assert content.contains( '(Common Public License Version 1.0) JUnit (junit:junit:4.8.1 - http://junit.org)' );
+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;
Property changes on: trunk/src/it/aggregate-add-third-party/verify.groovy
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/src/it/settings.xml
===================================================================
--- trunk/src/it/settings.xml 2010-06-26 09:32:52 UTC (rev 1781)
+++ trunk/src/it/settings.xml 2010-06-26 09:53:04 UTC (rev 1782)
@@ -53,4 +53,8 @@
</pluginRepositories>
</profile>
</profiles>
+
+ <pluginGroups>
+ <pluginGroup>org.nuiton</pluginGroup>
+ </pluginGroups>
</settings>
1
0
Author: tchemit
Date: 2010-06-26 11:32:52 +0200 (Sat, 26 Jun 2010)
New Revision: 1781
Url: http://nuiton.org/repositories/revision/maven-license-plugin/1781
Log:
improve documentation
Modified:
trunk/src/site/site_fr.xml
Modified: trunk/src/site/site_fr.xml
===================================================================
--- trunk/src/site/site_fr.xml 2010-06-26 09:27:52 UTC (rev 1780)
+++ trunk/src/site/site_fr.xml 2010-06-26 09:32:52 UTC (rev 1781)
@@ -58,9 +58,11 @@
<item name="Modèle de header de fichier" href="header.html"/>
<item name="Descripteur de license du projet" href="descriptor.html"/>
<item name="Usage" href="usage.html">
- <item name="Actions" href="usage.html#actions">
+ <item name="License" href="usage.html#license">
<item name="update-project-license" href="update-project-license-mojo.html"/>
<item name="update-file-header" href="update-file-header-mojo.html"/>
+ </item>
+ <item name="Third-party" href="usage.html#third-party">
<item name="add-third-party" href="add-third-party-mojo.html"/>
<item name="aggregate-add-third-party" href="aggregate-add-third-party-mojo.html"/>
</item>
1
0
r1780 - in trunk: . src/main/java/org/nuiton/license/plugin src/site src/site/apt src/site/fr/apt
by tchemit@users.nuiton.org 26 Jun '10
by tchemit@users.nuiton.org 26 Jun '10
26 Jun '10
Author: tchemit
Date: 2010-06-26 11:27:52 +0200 (Sat, 26 Jun 2010)
New Revision: 1780
Url: http://nuiton.org/repositories/revision/maven-license-plugin/1780
Log:
- Evolution #717: Use build timestamp to check if files are up to date for third-party goals
- improve documentation
Modified:
trunk/pom.xml
trunk/src/main/java/org/nuiton/license/plugin/AbstractAddThirdPartyMojo.java
trunk/src/main/java/org/nuiton/license/plugin/AbstractLicenseMojo.java
trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java
trunk/src/main/java/org/nuiton/license/plugin/AggregatorAddThirdPartyMojo.java
trunk/src/site/apt/usage.apt
trunk/src/site/fr/apt/usage.apt
trunk/src/site/site_en.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-06-25 17:57:39 UTC (rev 1779)
+++ trunk/pom.xml 2010-06-26 09:27:52 UTC (rev 1780)
@@ -137,6 +137,13 @@
<dependency>
<groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>${maven.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>${maven.version}</version>
<scope>provided</scope>
Modified: trunk/src/main/java/org/nuiton/license/plugin/AbstractAddThirdPartyMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AbstractAddThirdPartyMojo.java 2010-06-25 17:57:39 UTC (rev 1779)
+++ trunk/src/main/java/org/nuiton/license/plugin/AbstractAddThirdPartyMojo.java 2010-06-26 09:27:52 UTC (rev 1780)
@@ -167,17 +167,6 @@
protected abstract SortedProperties createUnsafeMapping() throws ProjectBuildingException, IOException;
@Override
- protected boolean checkSkip() {
- if (!isDoGenerate() &&
- !isDoGenerateBundle()) {
-
- getLog().info("All files are up to date, skip goal execution.");
- return false;
- }
- return super.checkSkip();
- }
-
- @Override
protected void init() throws Exception {
Log log = getLog();
@@ -192,17 +181,26 @@
setThirdPartyFile(file);
- setDoGenerate(isForce() || !file.exists() || !isFileNewerThanPomFile(file));
+ long buildTimestamp = getBuildTimestamp();
+ if (isVerbose()) {
+ log.info("Build start at : " + buildTimestamp);
+ log.info("third-party file : " + file.lastModified());
+ }
+
+ setDoGenerate(isForce() || !file.exists() || buildTimestamp > file.lastModified());
+
if (isGenerateBundle()) {
File bundleFile =
PluginHelper.getFile(getOutputDirectory(), getBundleThirdPartyPath());
+ if (isVerbose()) {
+ log.info("bundle third-party file : " + bundleFile.lastModified());
+ }
setDoGenerateBundle(isForce() ||
!bundleFile.exists() ||
- !isFileNewerThanPomFile(bundleFile) ||
- file.lastModified() > bundleFile.lastModified());
+ buildTimestamp > bundleFile.lastModified());
} else {
// not generating bundled file
Modified: trunk/src/main/java/org/nuiton/license/plugin/AbstractLicenseMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AbstractLicenseMojo.java 2010-06-25 17:57:39 UTC (rev 1779)
+++ trunk/src/main/java/org/nuiton/license/plugin/AbstractLicenseMojo.java 2010-06-26 09:27:52 UTC (rev 1780)
@@ -25,6 +25,7 @@
package org.nuiton.license.plugin;
+import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.project.MavenProject;
import org.nuiton.license.plugin.model.LicenseStore;
@@ -41,6 +42,16 @@
public abstract class AbstractLicenseMojo extends AbstractPlugin {
/**
+ * current maven session.
+ *
+ * @parameter expression="${session}"
+ * @required
+ * @readonly
+ * @since 2.3
+ */
+ private MavenSession session;
+
+ /**
* Dependance du projet.
*
* @parameter default-value="${project}"
@@ -94,6 +105,17 @@
this.encoding = encoding;
}
+ public final MavenSession getSession() {
+ return session;
+ }
+
+ public final void setSession(MavenSession session) {
+ this.session = session;
+ }
+
+ public final long getBuildTimestamp() {
+ return session.getStartTime().getTime();
+ }
protected LicenseStore createLicenseStore(String... extraResolver)
throws MojoExecutionException {
LicenseStore store;
Modified: trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java 2010-06-25 17:57:39 UTC (rev 1779)
+++ trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java 2010-06-26 09:27:52 UTC (rev 1780)
@@ -137,12 +137,14 @@
@Override
protected boolean checkSkip() {
- if (!isDoGenerateMissing()) {
+ if (!isDoGenerate() &&
+ !isDoGenerateBundle() &&
+ !isDoGenerateMissing()) {
getLog().info("All files are up to date, skip goal execution.");
return false;
}
- return super.checkSkip();
+ return true;
}
@Override
Modified: trunk/src/main/java/org/nuiton/license/plugin/AggregatorAddThirdPartyMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AggregatorAddThirdPartyMojo.java 2010-06-25 17:57:39 UTC (rev 1779)
+++ trunk/src/main/java/org/nuiton/license/plugin/AggregatorAddThirdPartyMojo.java 2010-06-26 09:27:52 UTC (rev 1780)
@@ -69,6 +69,17 @@
}
@Override
+ protected boolean checkSkip() {
+ if (!isDoGenerate() &&
+ !isDoGenerateBundle()) {
+
+ getLog().info("All files are up to date, skip goal execution.");
+ return false;
+ }
+ return super.checkSkip();
+ }
+
+ @Override
protected LicenseMap createLicenseMap() throws ProjectBuildingException {
Log log = getLog();
Modified: trunk/src/site/apt/usage.apt
===================================================================
--- trunk/src/site/apt/usage.apt 2010-06-25 17:57:39 UTC (rev 1779)
+++ trunk/src/site/apt/usage.apt 2010-06-26 09:27:52 UTC (rev 1780)
@@ -26,8 +26,10 @@
Usage
----
-Actions
+License
+ The projects offers some goals to deal with license in a project.
+
* update-project-license goal
This goal creates or updates the LICENSE.txt file and add it in build.
@@ -45,6 +47,10 @@
for full detail see {{{./update-file-header-mojo.html}detail page}}.
+Third-party
+
+ The project offers some goals to deal with THIRD-PARTY files in a project.
+
* add-third-party goal
This goal build the THIRD-PARTY.txt file and add it in build.
@@ -66,6 +72,141 @@
for full detail see {{{./aggregate-add-third-party-mojo.html}detail page}}.
+
+* How to consolidate the THIRD-PARTY file
+
+ It is possiblie to improve the THIRD-PARTY file :
+
+ - Fill back missing license for dependencies.
+
+ - Merge licenses (same license but named differently in dependencies poms).
+
+** Add missing licenses.
+
+ while using configuration's property <<useMissingfile>> on third-party goals,
+ it will create (or read for aggregate) a file located from property <<missingFfile>>
+ (by default <<src/license/THIRD-PARTY.properties>>).
+
+ In this file, we find dependencies with no license, you just have to fill
+ correct licenses.
+
+ Once the file filled, just relaunch the goal to integrate your modifications
+ in the generated <<THIRD-PARTY>> file.
+
+ Here is a <<THIRD-PARTY>> file with unamed licenses :
+
+--------------------------------------------------------------------------------
+List of 18 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)
+ (BSD) jxlayer (org.swinglabs:jxlayer:3.0.3 - http://www.swinglabs.org/)
+ (Common Public License Version 1.0) JUnit (junit:junit:4.8.1 - http://junit.org)
+ (Lesser General Public License (LGPL) v 3.0) I18n :: Api (org.nuiton.i18n:nuiton-i18n:1.2.2 - http://maven-site.nuiton.org/i18n/nuiton-i18n)
+ (Lesser General Public License (LGPL) v 3.0) Nuiton Utils (org.nuiton:nuiton-utils:1.3.1 - http://maven-site.nuiton.org/nuiton-utils)
+ (Lesser General Public License (LGPL)) Swing Layout Extensions (org.swinglabs:swing-worker:1.1 - https://swingworker.dev.java.net/)
+ (Lesser General Public License (LGPL)) SwingX (org.swinglabs:swingx:1.6 - http://www.swinglabs.org/)
+ (The Apache Software License, Version 2.0) Apache Log4j (log4j:log4j:1.2.16 - http://logging.apache.org/log4j/1.2/)
+ (The Apache Software License, Version 2.0) Commons BeanUtils (commons-beanutils:commons-beanutils:1.8.2 - http://commons.apache.org/beanutils/)
+ (The Apache Software License, Version 2.0) Commons Collections (commons-collections:commons-collections:3.2.1 - http://commons.apache.org/collections/)
+ (The Apache Software License, Version 2.0) Commons IO (commons-io:commons-io:1.4 - http://commons.apache.org/io/)
+ (The Apache Software License, Version 2.0) Commons JXPath (commons-jxpath:commons-jxpath:1.3 - http://commons.apache.org/jxpath/)
+ (The Apache Software License, Version 2.0) Commons Lang (commons-lang:commons-lang:2.4 - http://commons.apache.org/lang/)
+ (The Apache Software License, Version 2.0) Commons Logging (commons-logging:commons-logging:1.1.1 - http://commons.apache.org/logging)
+ (The OpenSymphony Software License 1.1) XWork (com.opensymphony:xwork:2.1.3 - http://www.opensymphony.com/xwork)
+ (Unknown license) JavaHelp API (javax.help:javahelp:2.0.02 - http://java.sun.com/products/javahelp/index.jsp)
+ (Unknown license) OGNL - Object Graph Navigation Library (opensymphony:ognl:2.6.11 - http://ognl.org)
+ (Unknown license) Unnamed - commons-primitives:commons-primitives:jar:1.0 (commons-primitives:commons-primitives:1.0 - no url defined)
+--------------------------------------------------------------------------------
+
+ And the generated <<THIRD-PARTY.properties>> file :
+
+--------------------------------------------------------------------------------
+# Generated by org.nuiton.license.plugin.AddThirdPartyMojo
+#-------------------------------------------------------------------------------
+# Already used licenses in project :
+# - Apache License, Version 2.0
+# - BSD
+# - Common Public License Version 1.0
+# - Lesser General Public License (LGPL)
+# - Lesser General Public License (LGPL) v 3.0
+# - Sun Microsystems, Inc. Binary Code License Agreement for the JDK 5.0
+# - The Apache Software License, Version 2.0
+# - The OpenSymphony Software License 1.1
+#-------------------------------------------------------------------------------
+# Please fill the missing licenses for dependencies :
+#
+#
+#Fri Jun 25 10:56:39 CEST 2010
+commons-primitives--commons-primitives--1.0=
+javax.help--javahelp--2.0.02=
+opensymphony--ognl--2.6.11=
+--------------------------------------------------------------------------------
+
+ Fills the file :
+
+--------------------------------------------------------------------------------
+# Generated by org.nuiton.license.plugin.AddThirdPartyMojo
+#-------------------------------------------------------------------------------
+# Already used licenses in project :
+# - Apache License, Version 2.0
+# - BSD
+# - Common Public License Version 1.0
+# - Lesser General Public License (LGPL)
+# - Lesser General Public License (LGPL) v 3.0
+# - Sun Microsystems, Inc. Binary Code License Agreement for the JDK 5.0
+# - The Apache Software License, Version 2.0
+# - The OpenSymphony Software License 1.1
+#-------------------------------------------------------------------------------
+# Please fill the missing licenses for dependencies :
+#
+#
+#Fri Jun 25 10:56:39 CEST 2010
+commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
+javax.help--javahelp--2.0.02=Sun Microsystems, Inc. Binary Code License Agreement for the JDK 5.0
+opensymphony--ognl--2.6.11=The OpenSymphony Software License 1.1
+ --------------------------------------------------------------------------------
+
+ Finally, relaunch the goal to obtain new generated <<THIRD-PARTY.txt>> file :
+
+-------------------------------------------------------------------------------
+List of 18 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)
+ (BSD) jxlayer (org.swinglabs:jxlayer:3.0.3 - http://www.swinglabs.org/)
+ (Common Public License Version 1.0) JUnit (junit:junit:4.8.1 - http://junit.org)
+ (Lesser General Public License (LGPL) v 3.0) I18n :: Api (org.nuiton.i18n:nuiton-i18n:1.2.2 - http://maven-site.nuiton.org/i18n/nuiton-i18n)
+ (Lesser General Public License (LGPL) v 3.0) Nuiton Utils (org.nuiton:nuiton-utils:1.3.1 - http://maven-site.nuiton.org/nuiton-utils)
+ (Lesser General Public License (LGPL)) Swing Layout Extensions (org.swinglabs:swing-worker:1.1 - https://swingworker.dev.java.net/)
+ (Lesser General Public License (LGPL)) SwingX (org.swinglabs:swingx:1.6 - http://www.swinglabs.org/)
+ (Sun Microsystems, Inc. Binary Code License Agreement for the JDK 5.0) JavaHelp API (javax.help:javahelp:2.0.02 - http://java.sun.com/products/javahelp/index.jsp)
+ (The Apache Software License, Version 2.0) Apache Log4j (log4j:log4j:1.2.16 - http://logging.apache.org/log4j/1.2/)
+ (The Apache Software License, Version 2.0) Commons BeanUtils (commons-beanutils:commons-beanutils:1.8.2 - http://commons.apache.org/beanutils/)
+ (The Apache Software License, Version 2.0) Commons Collections (commons-collections:commons-collections:3.2.1 - http://commons.apache.org/collections/)
+ (The Apache Software License, Version 2.0) Commons IO (commons-io:commons-io:1.4 - http://commons.apache.org/io/)
+ (The Apache Software License, Version 2.0) Commons JXPath (commons-jxpath:commons-jxpath:1.3 - http://commons.apache.org/jxpath/)
+ (The Apache Software License, Version 2.0) Commons Lang (commons-lang:commons-lang:2.4 - http://commons.apache.org/lang/)
+ (The Apache Software License, Version 2.0) Commons Logging (commons-logging:commons-logging:1.1.1 - http://commons.apache.org/logging)
+ (The Apache Software License, Version 2.0) Unnamed - commons-primitives:commons-primitives:jar:1.0 (commons-primitives:commons-primitives:1.0 - no url defined)
+ (The OpenSymphony Software License 1.1) OGNL - Object Graph Navigation Library (opensymphony:ognl:2.6.11 - http://ognl.org)
+ (The OpenSymphony Software License 1.1) XWork (com.opensymphony:xwork:2.1.3 - http://www.opensymphony.com/xwork)
+-------------------------------------------------------------------------------
+
+** Merge licenses.
+
+ to merge licenses added in <<THIRd-PARTY>> file, you have to add this configuration :
+
+-------------------------------------------------------------------------------
+ <configuration>
+ <mergeLicenses>
+ <mergeLicense>
+ Lesser General Public License (LGPL) v 3.0|Lesser General Public License (LGPL)
+ </mergeLicense>
+ </mergeLicenses>
+ </configuration>
+-------------------------------------------------------------------------------
+
+ Each entry of <<mergeLicenses>> describe a merge, the first license is the one to keep.
+
Get informations
* license-list goal
Modified: trunk/src/site/fr/apt/usage.apt
===================================================================
--- trunk/src/site/fr/apt/usage.apt 2010-06-25 17:57:39 UTC (rev 1779)
+++ trunk/src/site/fr/apt/usage.apt 2010-06-26 09:27:52 UTC (rev 1780)
@@ -26,8 +26,11 @@
Usage
----
-Actions
+License
+ Le projet offre des goals pour traiter les licenses d'un projet.
+
+
* update-project-license goal
Ce goal crée ou met à jour le fichier LICENSE.txt et l'ajoute au build.
@@ -47,6 +50,10 @@
Pour plus d'informations, référez-vous à
{{{./update-file-header-mojo.html}la page de détail}}.
+Third-party
+
+ Le projet offre des goals pour traiter les THIRD-PARTY d'un projet.
+
* add-third-party goal
Ce goal construit le fichier THIRD-PARTY.txt et l'ajoute au build.
@@ -69,6 +76,145 @@
Pour plus de détails, référez-vous à
{{{./aggregate-add-third-party-mojo.html}la page de détail}}.
+* Comment consolider le fichier THIRD-PARTY
+
+ Il est possible de consolider le fichier THIRD-PARTY :
+
+ - Renseigner les licenses manquantes pour une dépendence (si la license n'a
+ pas été renseignée dans le pom de la dépendance.
+
+ - Fusionner des licenses identiques mais nommées différemment dans le pom des
+ dépendances.
+
+** Ajouter les licenses manquantes.
+
+ En utilisant la propriété <<useMissingfile>> sur les deux goals, cela va
+ créée si nécessaire un fichier localisé par la propriété <<missingFfile>>
+ (par défaut <<src/license/THIRD-PARTY.properties>>).
+
+ Dans ce fichier on y retrouve la liste des dépendances du projet sans license.
+ Il suffit alors de renseigner le fichier avec les bonnes licenses.
+
+ Une fois le fichier complété, il suffit de relancer le goal, le nouveau
+ THIRD-PARTY généré intègrera les licenses complétées.
+
+ Voici un fichier <<THIRD-PARTY.properties>> contenant des dépendances sans license
+ généré
+
+--------------------------------------------------------------------------------
+List of 18 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)
+ (BSD) jxlayer (org.swinglabs:jxlayer:3.0.3 - http://www.swinglabs.org/)
+ (Common Public License Version 1.0) JUnit (junit:junit:4.8.1 - http://junit.org)
+ (Lesser General Public License (LGPL) v 3.0) I18n :: Api (org.nuiton.i18n:nuiton-i18n:1.2.2 - http://maven-site.nuiton.org/i18n/nuiton-i18n)
+ (Lesser General Public License (LGPL) v 3.0) Nuiton Utils (org.nuiton:nuiton-utils:1.3.1 - http://maven-site.nuiton.org/nuiton-utils)
+ (Lesser General Public License (LGPL)) Swing Layout Extensions (org.swinglabs:swing-worker:1.1 - https://swingworker.dev.java.net/)
+ (Lesser General Public License (LGPL)) SwingX (org.swinglabs:swingx:1.6 - http://www.swinglabs.org/)
+ (The Apache Software License, Version 2.0) Apache Log4j (log4j:log4j:1.2.16 - http://logging.apache.org/log4j/1.2/)
+ (The Apache Software License, Version 2.0) Commons BeanUtils (commons-beanutils:commons-beanutils:1.8.2 - http://commons.apache.org/beanutils/)
+ (The Apache Software License, Version 2.0) Commons Collections (commons-collections:commons-collections:3.2.1 - http://commons.apache.org/collections/)
+ (The Apache Software License, Version 2.0) Commons IO (commons-io:commons-io:1.4 - http://commons.apache.org/io/)
+ (The Apache Software License, Version 2.0) Commons JXPath (commons-jxpath:commons-jxpath:1.3 - http://commons.apache.org/jxpath/)
+ (The Apache Software License, Version 2.0) Commons Lang (commons-lang:commons-lang:2.4 - http://commons.apache.org/lang/)
+ (The Apache Software License, Version 2.0) Commons Logging (commons-logging:commons-logging:1.1.1 - http://commons.apache.org/logging)
+ (The OpenSymphony Software License 1.1) XWork (com.opensymphony:xwork:2.1.3 - http://www.opensymphony.com/xwork)
+ (Unknown license) JavaHelp API (javax.help:javahelp:2.0.02 - http://java.sun.com/products/javahelp/index.jsp)
+ (Unknown license) OGNL - Object Graph Navigation Library (opensymphony:ognl:2.6.11 - http://ognl.org)
+ (Unknown license) Unnamed - commons-primitives:commons-primitives:jar:1.0 (commons-primitives:commons-primitives:1.0 - no url defined)
+--------------------------------------------------------------------------------
+
+ Et le fichier <<THIRD-PARTY.properties>> généré :
+
+--------------------------------------------------------------------------------
+# Generated by org.nuiton.license.plugin.AddThirdPartyMojo
+#-------------------------------------------------------------------------------
+# Already used licenses in project :
+# - Apache License, Version 2.0
+# - BSD
+# - Common Public License Version 1.0
+# - Lesser General Public License (LGPL)
+# - Lesser General Public License (LGPL) v 3.0
+# - Sun Microsystems, Inc. Binary Code License Agreement for the JDK 5.0
+# - The Apache Software License, Version 2.0
+# - The OpenSymphony Software License 1.1
+#-------------------------------------------------------------------------------
+# Please fill the missing licenses for dependencies :
+#
+#
+#Fri Jun 25 10:56:39 CEST 2010
+commons-primitives--commons-primitives--1.0=
+javax.help--javahelp--2.0.02=
+opensymphony--ognl--2.6.11=
+--------------------------------------------------------------------------------
+
+ On renseigne le fichier :
+
+--------------------------------------------------------------------------------
+# Generated by org.nuiton.license.plugin.AddThirdPartyMojo
+#-------------------------------------------------------------------------------
+# Already used licenses in project :
+# - Apache License, Version 2.0
+# - BSD
+# - Common Public License Version 1.0
+# - Lesser General Public License (LGPL)
+# - Lesser General Public License (LGPL) v 3.0
+# - Sun Microsystems, Inc. Binary Code License Agreement for the JDK 5.0
+# - The Apache Software License, Version 2.0
+# - The OpenSymphony Software License 1.1
+#-------------------------------------------------------------------------------
+# Please fill the missing licenses for dependencies :
+#
+#
+#Fri Jun 25 10:56:39 CEST 2010
+commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
+javax.help--javahelp--2.0.02=Sun Microsystems, Inc. Binary Code License Agreement for the JDK 5.0
+opensymphony--ognl--2.6.11=The OpenSymphony Software License 1.1
+ --------------------------------------------------------------------------------
+
+ En relançant le goal on obtient le nouveau fichier <<THIRD-PARTY.txt>> suivant :
+
+-------------------------------------------------------------------------------
+List of 18 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)
+ (BSD) jxlayer (org.swinglabs:jxlayer:3.0.3 - http://www.swinglabs.org/)
+ (Common Public License Version 1.0) JUnit (junit:junit:4.8.1 - http://junit.org)
+ (Lesser General Public License (LGPL) v 3.0) I18n :: Api (org.nuiton.i18n:nuiton-i18n:1.2.2 - http://maven-site.nuiton.org/i18n/nuiton-i18n)
+ (Lesser General Public License (LGPL) v 3.0) Nuiton Utils (org.nuiton:nuiton-utils:1.3.1 - http://maven-site.nuiton.org/nuiton-utils)
+ (Lesser General Public License (LGPL)) Swing Layout Extensions (org.swinglabs:swing-worker:1.1 - https://swingworker.dev.java.net/)
+ (Lesser General Public License (LGPL)) SwingX (org.swinglabs:swingx:1.6 - http://www.swinglabs.org/)
+ (Sun Microsystems, Inc. Binary Code License Agreement for the JDK 5.0) JavaHelp API (javax.help:javahelp:2.0.02 - http://java.sun.com/products/javahelp/index.jsp)
+ (The Apache Software License, Version 2.0) Apache Log4j (log4j:log4j:1.2.16 - http://logging.apache.org/log4j/1.2/)
+ (The Apache Software License, Version 2.0) Commons BeanUtils (commons-beanutils:commons-beanutils:1.8.2 - http://commons.apache.org/beanutils/)
+ (The Apache Software License, Version 2.0) Commons Collections (commons-collections:commons-collections:3.2.1 - http://commons.apache.org/collections/)
+ (The Apache Software License, Version 2.0) Commons IO (commons-io:commons-io:1.4 - http://commons.apache.org/io/)
+ (The Apache Software License, Version 2.0) Commons JXPath (commons-jxpath:commons-jxpath:1.3 - http://commons.apache.org/jxpath/)
+ (The Apache Software License, Version 2.0) Commons Lang (commons-lang:commons-lang:2.4 - http://commons.apache.org/lang/)
+ (The Apache Software License, Version 2.0) Commons Logging (commons-logging:commons-logging:1.1.1 - http://commons.apache.org/logging)
+ (The Apache Software License, Version 2.0) Unnamed - commons-primitives:commons-primitives:jar:1.0 (commons-primitives:commons-primitives:1.0 - no url defined)
+ (The OpenSymphony Software License 1.1) OGNL - Object Graph Navigation Library (opensymphony:ognl:2.6.11 - http://ognl.org)
+ (The OpenSymphony Software License 1.1) XWork (com.opensymphony:xwork:2.1.3 - http://www.opensymphony.com/xwork)
+-------------------------------------------------------------------------------
+
+** Fusionner les licenses.
+
+ Pour fusionner des licenses dans le fichier THIRd-PARTY, il faut utiliser
+ la configuration <<mergeLicenses>>, comme dans l'exemple suivant :
+
+-------------------------------------------------------------------------------
+ <configuration>
+ <mergeLicenses>
+ <mergeLicense>
+ Lesser General Public License (LGPL) v 3.0|Lesser General Public License (LGPL)
+ </mergeLicense>
+ </mergeLicenses>
+ </configuration>
+-------------------------------------------------------------------------------
+
+ Chaque entrée de <<mergeLicenses>> décrit une fusion, la première license
+ étant celle à conserver.
+
Obtenir des informations
* license-list goal
Modified: trunk/src/site/site_en.xml
===================================================================
--- trunk/src/site/site_en.xml 2010-06-25 17:57:39 UTC (rev 1779)
+++ trunk/src/site/site_en.xml 2010-06-26 09:27:52 UTC (rev 1780)
@@ -59,9 +59,11 @@
<item name="File header model" href="header.html"/>
<item name="License project descriptor" href="descriptor.html"/>
<item name="Usage" href="usage.html">
- <item name="Actions" href="usage.html#actions">
+ <item name="License" href="usage.html#license">
<item name="update-project-license" href="update-project-license-mojo.html"/>
<item name="update-file-header" href="update-file-header-mojo.html"/>
+ </item>
+ <item name="Third-party" href="usage.html#third-party">
<item name="add-third-party" href="add-third-party-mojo.html"/>
<item name="aggregate-add-third-party" href="aggregate-add-third-party-mojo.html"/>
</item>
1
0
r1779 - trunk/src/main/java/org/nuiton/license/plugin/header/transformer
by tchemit@users.nuiton.org 25 Jun '10
by tchemit@users.nuiton.org 25 Jun '10
25 Jun '10
Author: tchemit
Date: 2010-06-25 19:57:39 +0200 (Fri, 25 Jun 2010)
New Revision: 1779
Url: http://nuiton.org/repositories/revision/maven-license-plugin/1779
Log:
javadoc
Modified:
trunk/src/main/java/org/nuiton/license/plugin/header/transformer/FileHeaderTransformer.java
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/transformer/FileHeaderTransformer.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/transformer/FileHeaderTransformer.java 2010-06-25 13:30:21 UTC (rev 1778)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/transformer/FileHeaderTransformer.java 2010-06-25 17:57:39 UTC (rev 1779)
@@ -37,7 +37,7 @@
* or create a file header from the file header model).
* </ul>
* <p/>
- * Moreover the contract offers tow method to box and unbox a String
+ * Moreover the contract offers two methods to box and unbox a String
* representation of a header content :
* <ul>
* <li>{@link #boxComment(String, boolean)}</li>
1
0