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
November 2010
- 3 participants
- 22 discussions
Author: tchemit
Date: 2010-11-18 21:49:28 +0100 (Thu, 18 Nov 2010)
New Revision: 1881
Url: http://nuiton.org/repositories/revision/maven-license-plugin/1881
Log:
finalize doc
Modified:
trunk/src/site/apt/addLicense.apt
trunk/src/site/fr/apt/addLicense.apt
Modified: trunk/src/site/apt/addLicense.apt
===================================================================
--- trunk/src/site/apt/addLicense.apt 2010-11-18 20:49:13 UTC (rev 1880)
+++ trunk/src/site/apt/addLicense.apt 2010-11-18 20:49:28 UTC (rev 1881)
@@ -125,7 +125,7 @@
-------------------------------------------------------------------------------
-ou
+or
-------------------------------------------------------------------------------
Modified: trunk/src/site/fr/apt/addLicense.apt
===================================================================
--- trunk/src/site/fr/apt/addLicense.apt 2010-11-18 20:49:13 UTC (rev 1880)
+++ trunk/src/site/fr/apt/addLicense.apt 2010-11-18 20:49:28 UTC (rev 1881)
@@ -128,7 +128,7 @@
-------------------------------------------------------------------------------
-or
+ou
-------------------------------------------------------------------------------
1
0
Author: tchemit
Date: 2010-11-18 21:49:13 +0100 (Thu, 18 Nov 2010)
New Revision: 1880
Url: http://nuiton.org/repositories/revision/maven-license-plugin/1880
Log:
finalize doc
Modified:
trunk/src/site/apt/addLicense.apt
trunk/src/site/apt/index.apt
trunk/src/site/fr/apt/addLicense.apt
trunk/src/site/fr/apt/index.apt
Modified: trunk/src/site/apt/addLicense.apt
===================================================================
--- trunk/src/site/apt/addLicense.apt 2010-11-18 20:25:57 UTC (rev 1879)
+++ trunk/src/site/apt/addLicense.apt 2010-11-18 20:49:13 UTC (rev 1880)
@@ -110,7 +110,7 @@
<artifactId>maven-license-plugin</artifactId>
<configuration>
<licenseName>my_licence</licenseName>
- <licenseResolver>file://${maven.src.dir}/licenses</licenseResolver>
+ <licenseResolver>file://${basedir}/src/licenses</licenseResolver>
</configuration>
<executions>
<execution>
@@ -123,4 +123,30 @@
</executions>
</plugin>
--------------------------------------------------------------------------------
\ No newline at end of file
+-------------------------------------------------------------------------------
+
+ou
+
+-------------------------------------------------------------------------------
+
+<properties>
+ <license.licenseName>my_licence</license.licenseName>
+ <license.licenseResolver>file://${basedir}/src/licenses</license.licenseResolver>
+</properties>
+
+<plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-license-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>first</id>
+ <goals>
+ <goal>update-file-header</goal>
+ </goals>
+ <phase>process-sources</phase>
+ </execution>
+ </executions>
+</plugin>
+
+-------------------------------------------------------------------------------
+
Modified: trunk/src/site/apt/index.apt
===================================================================
--- trunk/src/site/apt/index.apt 2010-11-18 20:25:57 UTC (rev 1879)
+++ trunk/src/site/apt/index.apt 2010-11-18 20:49:13 UTC (rev 1880)
@@ -39,7 +39,12 @@
As planned, license descriptor was removed from project.
<<Projet will migrate to Codehaus>> under the name of <<license-maven-plugin>>.
+
+ This is then the last version under this name. hope you will continue to use
+ it on codehaus forge :).
+ New location of the project is here : {{http://mojo.codehaus.org/license-maven-plugin}}.
+
What's new in version 2.4 et 2.4.1
We would like not to use any longer project description file since it is too
Modified: trunk/src/site/fr/apt/addLicense.apt
===================================================================
--- trunk/src/site/fr/apt/addLicense.apt 2010-11-18 20:25:57 UTC (rev 1879)
+++ trunk/src/site/fr/apt/addLicense.apt 2010-11-18 20:49:13 UTC (rev 1880)
@@ -113,7 +113,7 @@
<artifactId>maven-license-plugin</artifactId>
<configuration>
<licenseName>my_licence</licenseName>
- <licenseResolver>file://${maven.src.dir}/licenses</licenseResolver>
+ <licenseResolver>file://${basedir}/src/licenses</licenseResolver>
</configuration>
<executions>
<execution>
@@ -126,4 +126,30 @@
</executions>
</plugin>
--------------------------------------------------------------------------------
\ No newline at end of file
+-------------------------------------------------------------------------------
+
+or
+
+-------------------------------------------------------------------------------
+
+<properties>
+ <license.licenseName>my_licence</license.licenseName>
+ <license.licenseResolver>file://${basedir}/src/licenses</license.licenseResolver>
+</properties>
+
+<plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-license-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>first</id>
+ <goals>
+ <goal>update-file-header</goal>
+ </goals>
+ <phase>process-sources</phase>
+ </execution>
+ </executions>
+</plugin>
+
+-------------------------------------------------------------------------------
+
Modified: trunk/src/site/fr/apt/index.apt
===================================================================
--- trunk/src/site/fr/apt/index.apt 2010-11-18 20:25:57 UTC (rev 1879)
+++ trunk/src/site/fr/apt/index.apt 2010-11-18 20:49:13 UTC (rev 1880)
@@ -41,6 +41,10 @@
On a supprimé les fichiers de descriptions dépréciés en 2.4.
<<Le projet migre sur Codehaus>> sous le nom de <<license-maven-plugin>>.
+
+ On espère que vous continurez à l'utiliser sous la forge de <<codehaus>>.
+
+ Le projet est désormais ici : {{http://mojo.codehaus.org/license-maven-plugin}}.
Quoi de neuf dans la version 2.4 et 2.4.1
1
0
18 Nov '10
Author: tchemit
Date: 2010-11-18 21:25:57 +0100 (Thu, 18 Nov 2010)
New Revision: 1879
Url: http://nuiton.org/repositories/revision/maven-license-plugin/1879
Log:
Anomalie #1012: Fix documentation of mojo (some parameters are in french, other in english : all in english)
Modified:
trunk/src/main/java/org/nuiton/license/plugin/AbstractAddThirdPartyMojo.java
trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java
trunk/src/main/java/org/nuiton/license/plugin/CommentStyleListMojo.java
trunk/src/main/java/org/nuiton/license/plugin/LicenseListMojo.java
Modified: trunk/src/main/java/org/nuiton/license/plugin/AbstractAddThirdPartyMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AbstractAddThirdPartyMojo.java 2010-11-17 10:34:03 UTC (rev 1878)
+++ trunk/src/main/java/org/nuiton/license/plugin/AbstractAddThirdPartyMojo.java 2010-11-18 20:25:57 UTC (rev 1879)
@@ -44,10 +44,7 @@
import org.nuiton.plugin.PluginWithEncoding;
/**
- * Goal to generate the THIRD-PARTY.txt file which resumes all dependencies with
- * their licenses.
- * <p/>
- * It also add it in class-path.
+ * Abstract mojo for all third-party mojos.
*
* @author tchemit <chemit(a)codelutin.com>
* @since 2.3
@@ -55,7 +52,7 @@
public abstract class AbstractAddThirdPartyMojo extends AbstractLicenseMojo implements PluginWithEncoding {
/**
- * Repertoire de sortie des classes (classpath).
+ * Directory where to generate files.
*
* @parameter expression="${license.outputDirectory}" default-value="target/generated-sources/license"
* @required
@@ -64,10 +61,9 @@
protected File outputDirectory;
/**
- * Fichier ou ecrire les licences des dependances.
+ * File where to wirte the third-party file.
*
- * @parameter expression="${license.thirdPartyFilename}"
- * default-value="THIRD-PARTY.txt"
+ * @parameter expression="${license.thirdPartyFilename}" default-value="THIRD-PARTY.txt"
* @required
* @since 2.3
*/
@@ -119,16 +115,18 @@
protected String bundleThirdPartyPath;
/**
- * Un flag pour faire une copie nommé dans META-INF (prefixe avec le nom de
- * l'artifact).
+ * A flag to copy a bundled version of the third-party file. This is usefull
+ * to avoid for a final application collision name of third party file.
*
+ * The file will be copied at the {@link #bundleThirdPartyPath} location.
+ *
* @parameter expression="${license.generateBundle}" default-value="false"
* @since 2.3
*/
protected boolean generateBundle;
/**
- * Un flag pour forcer la generation.
+ * To force generation of the third-party file even if every thing is up to date.
*
* @parameter expression="${license.force}" default-value="false"
* @since 2.3
Modified: trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java 2010-11-17 10:34:03 UTC (rev 1878)
+++ trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java 2010-11-18 20:25:57 UTC (rev 1879)
@@ -48,10 +48,14 @@
import java.util.regex.PatternSyntaxException;
/**
- * Le goal pour copier le fichier THIRD-PARTY.txt (contenant les licenses de
- * toutes les dependances du projet) dans le classpath (et le generer s'il
- * n'existe pas).
+ * The gola to generate the third-party file.
*
+ * This file contains for all dependencies of the project a line giving the
+ * license used by the dependency.
+ *
+ * It will also copy it in the class-path (says add the generated directory as
+ * a resource of the build).
+ *
* @author tchemit <chemit(a)codelutin.com>
* @goal add-third-party
* @phase generate-resources
Modified: trunk/src/main/java/org/nuiton/license/plugin/CommentStyleListMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/CommentStyleListMojo.java 2010-11-17 10:34:03 UTC (rev 1878)
+++ trunk/src/main/java/org/nuiton/license/plugin/CommentStyleListMojo.java 2010-11-18 20:25:57 UTC (rev 1879)
@@ -47,7 +47,7 @@
public class CommentStyleListMojo extends AbstractLicenseMojo {
/**
- * Un drapeau pour afficher aussi le contenu des license.
+ * A flag to display also the content of each license.
*
* @parameter expression="${detail}"
* @since 2.1
Modified: trunk/src/main/java/org/nuiton/license/plugin/LicenseListMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/LicenseListMojo.java 2010-11-17 10:34:03 UTC (rev 1878)
+++ trunk/src/main/java/org/nuiton/license/plugin/LicenseListMojo.java 2010-11-18 20:25:57 UTC (rev 1879)
@@ -48,7 +48,7 @@
public class LicenseListMojo extends AbstractLicenseMojo implements PluginWithEncoding {
/**
- * La baseURL d'un resolver de license supplementaire
+ * the url of an extra license repository.
*
* @parameter expression="${extraResolver}"
* @since 1.0.1
@@ -56,7 +56,7 @@
private String extraResolver;
/**
- * Un drapeau pour afficher aussi le contenu des license.
+ * A flag to display also the content of each license.
*
* @parameter expression="${detail}"
* @since 1.0.1
1
0
Author: jcouteau
Date: 2010-11-17 11:34:03 +0100 (Wed, 17 Nov 2010)
New Revision: 1878
Url: http://nuiton.org/repositories/revision/maven-license-plugin/1878
Log:
Remove old useless doc
Removed:
trunk/src/site/apt/descriptor.apt
trunk/src/site/fr/apt/descriptor.apt
Modified:
trunk/src/site/apt/usage.apt
trunk/src/site/site_en.xml
trunk/src/site/site_fr.xml
Deleted: trunk/src/site/apt/descriptor.apt
===================================================================
--- trunk/src/site/apt/descriptor.apt 2010-11-17 10:11:55 UTC (rev 1877)
+++ trunk/src/site/apt/descriptor.apt 2010-11-17 10:34:03 UTC (rev 1878)
@@ -1,95 +0,0 @@
-~~~
-~~ #%L
-~~ Maven License Plugin
-~~
-~~ $Id$
-~~ $HeadURL$
-~~ %%
-~~ Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit
-~~ %%
-~~ This program is free software: you can redistribute it and/or modify
-~~ it under the terms of the GNU Lesser General Public License as
-~~ published by the Free Software Foundation, either version 3 of the
-~~ License, or (at your option) any later version.
-~~
-~~ This program is distributed in the hope that it will be useful,
-~~ but WITHOUT ANY WARRANTY; without even the implied warranty of
-~~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-~~ GNU General Lesser Public License for more details.
-~~
-~~ You should have received a copy of the GNU General Lesser Public
-~~ License along with this program. If not, see
-~~ <http://www.gnu.org/licenses/lgpl-3.0.html>.
-~~ #L%
-~~~
-----
-License project descriptor
-----
-
-Warning
-
- <Since version 2.4>, <<the descriptor file is no more mandatory. It will be removed
- from version 3.>>
-
-Abstract
-
-
- This document describes the license project descriptor file introduced in
- version 2.1.
-
- The license file descriptor file aims to enumerate all files to include in
- license process per type and license.
-
- This new format is used in goal
- {{{./update-file-header-mojo.html}update-file-header}} and
- {{{./update-project-license-mojo.html}update-project-license}}.
-
-xsd
-
- This file is ruled by a {{{./licenseProjectDescriptor-1.0.0.xsd}xsd file}}.
-
-Example
-
- The next example applies a lgpl v3 license on all java files in **src/main/java**.
-
--------------------------------------------------------------------------------
-
- <?xml version='1.0' encoding='UTF-8'?>
- <project xmlns="http://maven-site.nuiton.org/maven-license-plugin/1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven-site.nuiton.org/maven-license-plugin/1.0.0 http://maven-site.nuiton.org/maven-license-plugin/licenseProjectDescriptor-…">
- <mainLicense>gpl_v3</mainLicense>
- <headers>
- <header>
- <licenseName>lgpl_v3</licenseName>
- <commentStyle>java</commentStyle>
- <fileSets>
- <fileSet>
- <basedir>all/src</basedir>
- <includes>
- <include>**/*.java</include>
- </includes>
- </fileSet>
- </fileSets>
- </header>
- </headers>
- </project>
--------------------------------------------------------------------------------
-
-How to create your own project.xml file
-
- The project.xml file should be located in the src/license directory.
-
- The xml file is included in project tags. Then you describe the main license
- using one of the codes present in maven-license-plugin (use
- mvn license:license-list -Ddetail to get the list of the codes and
- corresponding licenses).
-
- You can then declare headers. A header is the association of a license and a
- comment-style. If no license is present, the mainLicense will be taken. You
- can set here the base dir and the files to include and/or exclude pattern.
-
- Note that your are not limited in the number of headers. You can create a
- header for one file in case of copied code from other projects, but in this
- case you might prefer using the %%IgnoreLicense tag in the file itself. The
- previous example should help you create your project.xml file.
Modified: trunk/src/site/apt/usage.apt
===================================================================
--- trunk/src/site/apt/usage.apt 2010-11-17 10:11:55 UTC (rev 1877)
+++ trunk/src/site/apt/usage.apt 2010-11-17 10:34:03 UTC (rev 1878)
@@ -83,7 +83,7 @@
* How to consolidate the THIRD-PARTY file
- It is possiblie to improve the THIRD-PARTY file :
+ It is possible to improve the THIRD-PARTY file :
- Fill back missing license for dependencies.
@@ -91,8 +91,8 @@
** 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>>
+ While using configuration's property <<useMissingfile>> on third-party goals,
+ it will create (or read for aggregate) a file located from property <<missingFile>>
(by default <<src/license/THIRD-PARTY.properties>>).
In this file, we find dependencies with no license, you just have to fill
@@ -124,7 +124,7 @@
</dependencies>
-------------------------------------------------------------------------------
- Here is a <<THIRD-PARTY>> file with unamed licenses launched by
+ Here is a <<THIRD-PARTY>> file with unnamed licenses launched by
--------------------------------------------------------------------------------
mvn license:add-third-party -DuseMissingFile
@@ -176,7 +176,7 @@
** Merge licenses.
- to merge licenses added in <<THIRd-PARTY>> file, you have to add a <<licenseMerges>>
+ 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.
Deleted: trunk/src/site/fr/apt/descriptor.apt
===================================================================
--- trunk/src/site/fr/apt/descriptor.apt 2010-11-17 10:11:55 UTC (rev 1877)
+++ trunk/src/site/fr/apt/descriptor.apt 2010-11-17 10:34:03 UTC (rev 1878)
@@ -1,97 +0,0 @@
-~~~
-~~ #%L
-~~ Maven License Plugin
-~~
-~~ $Id$
-~~ $HeadURL$
-~~ %%
-~~ Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit
-~~ %%
-~~ This program is free software: you can redistribute it and/or modify
-~~ it under the terms of the GNU Lesser General Public License as
-~~ published by the Free Software Foundation, either version 3 of the
-~~ License, or (at your option) any later version.
-~~
-~~ This program is distributed in the hope that it will be useful,
-~~ but WITHOUT ANY WARRANTY; without even the implied warranty of
-~~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-~~ GNU General Lesser Public License for more details.
-~~
-~~ You should have received a copy of the GNU General Lesser Public
-~~ License along with this program. If not, see
-~~ <http://www.gnu.org/licenses/lgpl-3.0.html>.
-~~ #L%
-~~~
-----
-License project descriptor
-----
-
-Attention
-
- <Depuis la version 2.4>, <<le fichier de description n'est plus obligatoire. Il
- sera supprimé avec la version 3.>>
-
-Abstract
-
- Ce document décrit le fichier de description de license introduit dans la
- version 2.1.
-
- Le but du fichier de description de license est d'énumérer tous les fichiers à
- inclure dans le process de license par license et par type.
-
- Ce nouveau format est utilisé dans les goals
- {{{./update-file-header-mojo.html}update-file-header}} et
- {{{./update-project-license-mojo.html}update-project-license}}.
-
-xsd
-
- Ce fichier est géré par un {{{../licenseProjectDescriptor-1.0.0.xsd}fichier xsd}}.
-
-Exemple
-
- L'exemple suivant applique la license lgpl v3 à tous les fichier java présents
- dans <<src/main/java>>.
-
--------------------------------------------------------------------------------
-
- <?xml version='1.0' encoding='UTF-8'?>
- <project xmlns="http://maven-site.nuiton.org/maven-license-plugin/1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven-site.nuiton.org/maven-license-plugin/1.0.0 http://maven-site.nuiton.org/maven-license-plugin/licenseProjectDescriptor-…">
- <mainLicense>gpl_v3</mainLicense>
- <headers>
- <header>
- <licenseName>lgpl_v3</licenseName>
- <commentStyle>java</commentStyle>
- <fileSets>
- <fileSet>
- <basedir>all/src</basedir>
- <includes>
- <include>**/*.java</include>
- </includes>
- </fileSet>
- </fileSets>
- </header>
- </headers>
- </project>
--------------------------------------------------------------------------------
-
-Comment créer son propre fichier project.xml
-
- Le fichier <<project.xml>> doit être situé dans le dossier <<src/license>>.
-
- Le fichier xml est inclus entre des balises project. Vous décrivez ensuite la
- license principale du projet en utilisant les codes du plugin (utilisez
- mvn license:license-list -Ddetail pour connaitre la liste des codes et des
- licenses correspondantes).
-
- Vous pouvez ensuite déclarer des headers. Un header est l'association d'une
- license et d'un stye de commentaire. S'il n'y a pas de license, la license
- principale du projet est utilisée. Vous pouvez déclarer le répertoire de base
- et le pattern de sélection/inclusion de fichiers.
-
- Notez que vous n'êtes pas limités dans le nombre de headers. Vous pouvez
- créer un header pour un fichier dans le cas de code copié depuis un autre
- projet par exemple, ou vous pouvez utiliser le tag <<% %Ignore-License>> dans
- le fichier lui-même. L'exemple précédent devrait vous permettre de créer votre
- propre fichier project.xml.
Modified: trunk/src/site/site_en.xml
===================================================================
--- trunk/src/site/site_en.xml 2010-11-17 10:11:55 UTC (rev 1877)
+++ trunk/src/site/site_en.xml 2010-11-17 10:34:03 UTC (rev 1878)
@@ -57,7 +57,6 @@
<menu name="User">
<item name="Introduction" href="index.html"/>
<item name="File header model" href="header.html"/>
- <item name="License project descriptor" href="descriptor.html"/>
<item name="Add your license" href="addLicense.html"/>
<item name="Usage" href="usage.html">
<item name="License" href="usage.html#License">
Modified: trunk/src/site/site_fr.xml
===================================================================
--- trunk/src/site/site_fr.xml 2010-11-17 10:11:55 UTC (rev 1877)
+++ trunk/src/site/site_fr.xml 2010-11-17 10:34:03 UTC (rev 1878)
@@ -56,7 +56,6 @@
<menu name="Utilisateur">
<item name="Introduction" href="index.html"/>
<item name="Modèle de header de fichier" href="header.html"/>
- <item name="Descripteur de license du projet" href="descriptor.html"/>
<item name="Ajouter une license" href="addLicense.html"/>
<item name="Utilisation" href="usage.html">
<item name="License" href="usage.html#License">
1
0
Author: jcouteau
Date: 2010-11-17 11:11:55 +0100 (Wed, 17 Nov 2010)
New Revision: 1877
Url: http://nuiton.org/repositories/revision/maven-license-plugin/1877
Log:
[#1010] Add an explanation in documention on how to use a new license
Added:
trunk/src/site/apt/addLicense.apt
trunk/src/site/fr/apt/addLicense.apt
Modified:
trunk/src/site/site_en.xml
trunk/src/site/site_fr.xml
Added: trunk/src/site/apt/addLicense.apt
===================================================================
--- trunk/src/site/apt/addLicense.apt (rev 0)
+++ trunk/src/site/apt/addLicense.apt 2010-11-17 10:11:55 UTC (rev 1877)
@@ -0,0 +1,126 @@
+~~~
+~~ #%L
+~~ Maven License Plugin
+~~
+~~ $Id$
+~~ $HeadURL$
+~~ %%
+~~ Copyright (C) 2008 - 2010 CodeLutin, Jean Couteau
+~~ %%
+~~ This program is free software: you can redistribute it and/or modify
+~~ it under the terms of the GNU Lesser General Public License as
+~~ published by the Free Software Foundation, either version 3 of the
+~~ License, or (at your option) any later version.
+~~
+~~ This program is distributed in the hope that it will be useful,
+~~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+~~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+~~ GNU General Lesser Public License for more details.
+~~
+~~ You should have received a copy of the GNU General Lesser Public
+~~ License along with this program. If not, see
+~~ <http://www.gnu.org/licenses/lgpl-3.0.html>.
+~~ #L%
+~~~
+
+----
+Add a license not present in maven-license-plugin
+----
+
+Add a license not present in maven-license-plugin
+
+ You might want to add a new license that is not already managed by the plugin
+ (common free software licenses are managed, but in case of proprietary
+ software (open or closed source, other license might be used).
+
+* Create the license files
+
+ * src/main/licences/my_licence/header.txt
+
+ Example for GPLv3 :
+
+-------------------------------------------------------------------------------
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as
+published by the Free Software Foundation, either version 3 of the
+License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public
+License along with this program. If not, see
+<http://www.gnu.org/licenses/gpl-3.0.html>.
+
+-------------------------------------------------------------------------------
+
+ * src/main/licences/my_licence/license.txt
+
+ Example for GPLv3 :
+
+-------------------------------------------------------------------------------
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+...
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+
+
+-------------------------------------------------------------------------------
+
+* Declare the new license
+
+ The new license(s) must be declared in the file :
+ src/main/licences/licenses.properties. One license per line like :
+
+-------------------------------------------------------------------------------
+
+ my_licence=My license
+
+-------------------------------------------------------------------------------
+
+
+* Configure the plugin
+
+ You need to specify the name of your license and where to find it.
+
+-------------------------------------------------------------------------------
+
+<plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-license-plugin</artifactId>
+ <configuration>
+ <licenseName>my_licence</licenseName>
+ <licenseResolver>file://${maven.src.dir}/licenses</licenseResolver>
+ </configuration>
+ <executions>
+ <execution>
+ <id>first</id>
+ <goals>
+ <goal>update-file-header</goal>
+ </goals>
+ <phase>process-sources</phase>
+ </execution>
+ </executions>
+</plugin>
+
+-------------------------------------------------------------------------------
\ No newline at end of file
Added: trunk/src/site/fr/apt/addLicense.apt
===================================================================
--- trunk/src/site/fr/apt/addLicense.apt (rev 0)
+++ trunk/src/site/fr/apt/addLicense.apt 2010-11-17 10:11:55 UTC (rev 1877)
@@ -0,0 +1,129 @@
+~~~
+~~ #%L
+~~ Maven License Plugin
+~~
+~~ $Id$
+~~ $HeadURL$
+~~ %%
+~~ Copyright (C) 2008 - 2010 CodeLutin, Jean Couteau
+~~ %%
+~~ This program is free software: you can redistribute it and/or modify
+~~ it under the terms of the GNU Lesser General Public License as
+~~ published by the Free Software Foundation, either version 3 of the
+~~ License, or (at your option) any later version.
+~~
+~~ This program is distributed in the hope that it will be useful,
+~~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+~~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+~~ GNU General Lesser Public License for more details.
+~~
+~~ You should have received a copy of the GNU General Lesser Public
+~~ License along with this program. If not, see
+~~ <http://www.gnu.org/licenses/lgpl-3.0.html>.
+~~ #L%
+~~~
+
+----
+Ajouter une license non présente dans maven-license-plugin
+----
+
+Ajouter une license non présente dans maven-license-plugin
+
+ Vous pouvez souhaiter ajouter une nouvelle license qui n'est pas encore gérée
+ par le plugin (les principales licenses libres sont gérées, mais dans le cas
+ de logiciels privateurs (qu'ils soient open-source ou non), d'autres licenses
+ peuvent être utilisées).
+
+* Créer les fichiers de license
+
+ * src/main/licences/ma_licence/header.txt
+
+ Le texte de license repris en haut de chaque fichier source.
+
+ Exemple pour la license GPLv3 :
+
+-------------------------------------------------------------------------------
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as
+published by the Free Software Foundation, either version 3 of the
+License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public
+License along with this program. If not, see
+<http://www.gnu.org/licenses/gpl-3.0.html>.
+
+-------------------------------------------------------------------------------
+
+ * src/main/licences/ma_licence/license.txt
+
+ Exemple pour la license GPLv3 :
+
+-------------------------------------------------------------------------------
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+...
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+
+
+-------------------------------------------------------------------------------
+
+* Déclarer la nouvelle license
+
+ La(les) nouvelle(s) license(s) doit être déclarée dans le fichier
+ src/main/licences/licenses.properties. Une license par ligne :
+
+-------------------------------------------------------------------------------
+
+ ma_licence=Ma license
+
+-------------------------------------------------------------------------------
+
+
+* Configurer le plugin
+
+ Vous devez spécifier la license et où la trouver.
+
+-------------------------------------------------------------------------------
+
+<plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-license-plugin</artifactId>
+ <configuration>
+ <licenseName>my_licence</licenseName>
+ <licenseResolver>file://${maven.src.dir}/licenses</licenseResolver>
+ </configuration>
+ <executions>
+ <execution>
+ <id>first</id>
+ <goals>
+ <goal>update-file-header</goal>
+ </goals>
+ <phase>process-sources</phase>
+ </execution>
+ </executions>
+</plugin>
+
+-------------------------------------------------------------------------------
\ No newline at end of file
Modified: trunk/src/site/site_en.xml
===================================================================
--- trunk/src/site/site_en.xml 2010-11-16 10:33:37 UTC (rev 1876)
+++ trunk/src/site/site_en.xml 2010-11-17 10:11:55 UTC (rev 1877)
@@ -58,6 +58,7 @@
<item name="Introduction" href="index.html"/>
<item name="File header model" href="header.html"/>
<item name="License project descriptor" href="descriptor.html"/>
+ <item name="Add your license" href="addLicense.html"/>
<item name="Usage" href="usage.html">
<item name="License" href="usage.html#License">
<item name="update-project-license" href="update-project-license-mojo.html"/>
Modified: trunk/src/site/site_fr.xml
===================================================================
--- trunk/src/site/site_fr.xml 2010-11-16 10:33:37 UTC (rev 1876)
+++ trunk/src/site/site_fr.xml 2010-11-17 10:11:55 UTC (rev 1877)
@@ -57,6 +57,7 @@
<item name="Introduction" href="index.html"/>
<item name="Modèle de header de fichier" href="header.html"/>
<item name="Descripteur de license du projet" href="descriptor.html"/>
+ <item name="Ajouter une license" href="addLicense.html"/>
<item name="Utilisation" href="usage.html">
<item name="License" href="usage.html#License">
<item name="update-project-license" href="update-project-license-mojo.html"/>
1
0
16 Nov '10
Author: tchemit
Date: 2010-11-16 11:33:37 +0100 (Tue, 16 Nov 2010)
New Revision: 1876
Url: http://nuiton.org/repositories/revision/maven-license-plugin/1876
Log:
Anomalie #776: THIRD-PARTY missing file not re-generated as needed
Evolution #1047: Migrate in THIRD-PARTY missing file to specify the type of depedencies
Modified:
trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java
trunk/src/main/java/org/nuiton/license/plugin/LicenseMap.java
Modified: trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java 2010-11-11 22:52:27 UTC (rev 1875)
+++ trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java 2010-11-16 10:33:37 UTC (rev 1876)
@@ -41,6 +41,7 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import java.util.SortedSet;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -176,17 +177,67 @@
getLog().info("found " + unsafeMappings.size() + " unsafe mappings");
}
+ // compute if missing file should be (re)-generate
+ boolean generateMissingfile = computeDoGenerateMissingFile(
+ unsafeMappings,
+ unsafeDependencies
+ );
+
+ setDoGenerateMissing(generateMissingfile);
+
+ if (generateMissingfile && isVerbose()) {
+ StringBuilder sb = new StringBuilder();
+ sb.append("Will use from missing file ");
+ sb.append(unsafeMappings.size());
+ sb.append(" dependencies :");
+ for (Map.Entry<Object, Object> entry : unsafeMappings.entrySet()) {
+ String id = (String) entry.getKey();
+ String license = (String) entry.getValue();
+ sb.append("\n - ").append(id).append(" - ").append(license);
+ }
+ getLog().info(sb.toString());
+ } else {
+ if (isUseMissingFile() && !unsafeMappings.isEmpty()) {
+ getLog().info("Missing file " + getMissingFile() + " is up-to-date.");
+ }
+ }
+ return unsafeMappings;
+ }
+
+ /**
+ * @param unsafeMappings the unsafe mapping coming from the missing file
+ * @param unsafeDependencies the unsafe dependencies from the project
+ * @return {@code true} if missing ifle should be (re-)generated, {@code false} otherwise
+ * @throws IOException if any IO problem
+ * @since 3.0
+ */
+ protected boolean computeDoGenerateMissingFile(SortedProperties unsafeMappings,
+ SortedSet<MavenProject> unsafeDependencies) throws IOException {
+
+ if (!isUseMissingFile()) {
+
+ // never use the missing file
+ return false;
+ }
+
if (isForce()) {
- // use missingFile and found some unsafe dependencies
- setDoGenerateMissing(isUseMissingFile() && !CollectionUtils.isEmpty(unsafeMappings.keySet()));
+ // the mapping fro missing file is not empty, regenerate it
+ return !CollectionUtils.isEmpty(unsafeMappings.keySet());
} else {
- // use missingFile and still have some unsafe dependencies
- setDoGenerateMissing(isUseMissingFile() && !CollectionUtils.isEmpty(unsafeDependencies));
+ if (!CollectionUtils.isEmpty(unsafeDependencies)) {
+
+ // there is some unsafe dependencies from the project, must
+ // regenerate missing file
+ return true;
+ }
+
+ // check if the missing file has changed
+ SortedProperties oldUnsafeMappings = new SortedProperties(getEncoding());
+ oldUnsafeMappings.load(getMissingFile());
+ return !unsafeMappings.equals(oldUnsafeMappings);
}
-
- return unsafeMappings;
}
@Override
Modified: trunk/src/main/java/org/nuiton/license/plugin/LicenseMap.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/LicenseMap.java 2010-11-11 22:52:27 UTC (rev 1875)
+++ trunk/src/main/java/org/nuiton/license/plugin/LicenseMap.java 2010-11-16 10:33:37 UTC (rev 1876)
@@ -46,6 +46,7 @@
import java.util.SortedSet;
import java.util.TreeMap;
import java.util.TreeSet;
+
/**
* Map of artifacts (stub in mavenproject) group by their license.
*
@@ -151,11 +152,65 @@
unsafeMappings.load(missingFile);
}
+ // get from the missing file, all unknown dependencies
+ List<String> unknownDependenciesId = new ArrayList<String>();
+
+ // migrate unsafe mapping (before version 3.0 we do not have the type of
+ // dependency in the missing file, now we must deal with it, so check it
+
+
+ List<String> migrateId = new ArrayList<String>();
+ SortedMap<String, MavenProject> artifactCache =
+ AbstractAddThirdPartyMojo.getArtifactCache();
+ for (Object o : unsafeMappings.keySet()) {
+ String id = (String) o;
+ MavenProject project = artifactCache.get(id);
+ if (project == null) {
+ // try with the --jar type
+ project = artifactCache.get(id + "--jar");
+ if (project == null) {
+
+ // now we are sure this is a unknown dependency
+ unknownDependenciesId.add(id);
+
+ } else {
+
+ // this dependency must be migrated
+ migrateId.add(id);
+ }
+ }
+ }
+
+ if (!unknownDependenciesId.isEmpty()) {
+
+ // there is some unknown dependencies in the missing file, remove them
+ for (String id : unknownDependenciesId) {
+ getLog().warn("dependency [" + id + "] does not exists in project, remove it from the missing file.");
+ unsafeMappings.remove(id);
+ }
+
+ unknownDependenciesId.clear();
+ }
+
+ if (!migrateId.isEmpty()) {
+
+ // there is some dependencies to migrate in the missing file
+ for (String id : migrateId) {
+ String newId = id + "--jar";
+ getLog().info("Migrate " + id + " to " + newId + " in the missing file.");
+ Object value = unsafeMappings.get(id);
+ unsafeMappings.remove(id);
+ unsafeMappings.put(newId, value);
+ }
+
+ migrateId.clear();
+ }
+
// push back loaded dependencies
for (Object o : unsafeMappings.keySet()) {
String id = (String) o;
- MavenProject project = AbstractAddThirdPartyMojo.getArtifactCache().get(id);
+ MavenProject project = artifactCache.get(id);
if (project == null) {
getLog().warn("dependency [" + id + "] does not exists in project.");
continue;
1
0
Author: tchemit
Date: 2010-11-11 23:52:27 +0100 (Thu, 11 Nov 2010)
New Revision: 1875
Url: http://nuiton.org/repositories/revision/maven-license-plugin/1875
Log:
pass to version 3.0-SNAPSHOT
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-11-11 22:38:54 UTC (rev 1874)
+++ trunk/pom.xml 2010-11-11 22:52:27 UTC (rev 1875)
@@ -40,7 +40,7 @@
</parent>
<artifactId>maven-license-plugin</artifactId>
- <version>2.4.2-SNAPSHOT</version>
+ <version>3.0-SNAPSHOT</version>
<dependencies>
1
0
Author: tchemit
Date: 2010-11-11 23:38:54 +0100 (Thu, 11 Nov 2010)
New Revision: 1874
Url: http://nuiton.org/repositories/revision/maven-license-plugin/1874
Log:
Evolution #1040: Remove licenseProjectDescriptor + do some cleaning
Added:
trunk/src/main/java/org/nuiton/license/plugin/AbstractLicenseNameMojo.java
Removed:
trunk/src/it/update-file-header/src/license/
trunk/src/it/update-project-license/src/license/
trunk/src/main/java/org/nuiton/license/plugin/AbstractLicenseWithDescriptorMojo.java
trunk/src/main/mdo/
trunk/src/main/resources/META-INF/plexus/components.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/addLicense/project.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/all/project.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/failLicense/project.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/ignoreLicense/project.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/updateLicense/project.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense/project.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense/project.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense/project.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateProjectLicenseMojoTest/projectOne.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateProjectLicenseMojoTest/projectTwo.xml
Modified:
trunk/pom.xml
trunk/src/it/update-file-header/pom.xml
trunk/src/it/update-project-license/pom.xml
trunk/src/main/java/org/nuiton/license/plugin/UpdateFileHeaderMojo.java
trunk/src/main/java/org/nuiton/license/plugin/UpdateProjectLicenseMojo.java
trunk/src/site/apt/index.apt
trunk/src/site/fr/apt/index.apt
trunk/src/test/java/org/nuiton/license/plugin/UpdateFileHeaderMojoTest.java
trunk/src/test/java/org/nuiton/license/plugin/UpdateProjectLicenseMojoTest.java
trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/addLicense.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/all.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/failLicense.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/ignoreLicense.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/updateLicense.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateProjectLicenseMojoTest/testOne.xml
trunk/src/test/resources/org/nuiton/license/plugin/updateProjectLicenseMojoTest/testTwo.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/pom.xml 2010-11-11 22:38:54 UTC (rev 1874)
@@ -23,7 +23,9 @@
<http://www.gnu.org/licenses/lgpl-3.0.html>.
#L%
-->
-<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">
+<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>
@@ -130,13 +132,15 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
+ <version>2.5</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
+ <version>1.1.1</version>
</dependency>
-
+
<!-- FIXME si on ne le rajoute pas, on se retrouve avec la version 1.1 qui ne convient pas -->
<dependency>
<groupId>org.codehaus.plexus</groupId>
@@ -172,7 +176,7 @@
<version>${mavenVersion}</version>
<scope>provided</scope>
</dependency>
-
+
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
@@ -189,6 +193,7 @@
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
+ <version>1.2.16</version>
<scope>runtime</scope>
</dependency>
@@ -292,6 +297,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
+ <version>4.8.2</version>
</dependency>
</dependencies>
@@ -348,9 +354,15 @@
<!-- Source control management. -->
<scm>
- <connection>scm:svn:http://svn.nuiton.org/svn/maven-license-plugin/trunk</connection>
- <developerConnection>scm:svn:http://svn.nuiton.org/svn/maven-license-plugin/trunk</developerConnection>
- <url>http://www.nuiton.org/repositories/browse/maven-license-plugin/trunk</url>
+ <connection>
+ scm:svn:http://svn.nuiton.org/svn/maven-license-plugin/trunk
+ </connection>
+ <developerConnection>
+ scm:svn:http://svn.nuiton.org/svn/maven-license-plugin/trunk
+ </developerConnection>
+ <url>
+ http://www.nuiton.org/repositories/browse/maven-license-plugin/trunk
+ </url>
</scm>
<!-- ************************************************************* -->
@@ -367,12 +379,9 @@
<!-- helper version -->
<helperPluginVersion>1.2.9</helperPluginVersion>
- <!-- license project descriptor model version -->
- <mdoVersion>1.0.0</mdoVersion>
-
<!-- documentation is in apt format -->
<siteSourcesType>apt</siteSourcesType>
-
+
<!-- documentation is in english then french -->
<locales>en,fr</locales>
@@ -384,46 +393,6 @@
<plugins>
- <!-- generate descriptor model + reader -->
- <plugin>
- <groupId>org.codehaus.modello</groupId>
- <artifactId>modello-maven-plugin</artifactId>
- <version>1.0</version>
- <configuration>
- <version>${mdoVersion}</version>
- <lineLength>80</lineLength>
- <useJava5>true</useJava5>
- <models>
- <model>src/main/mdo/descriptor.mdo</model>
- </models>
- </configuration>
- <executions>
- <execution>
- <id>mdo</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>xpp3-reader</goal>
- <goal>java</goal>
- </goals>
- <configuration>
- <models>
- <model>src/main/mdo/descriptor.mdo</model>
- </models>
- </configuration>
- </execution>
- <execution>
- <id>mdo-xsd</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>xsd</goal>
- </goals>
- <configuration>
- <outputDirectory>src/site/resources</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
<!-- expose new plexus components -->
<plugin>
<groupId>org.codehaus.plexus</groupId>
@@ -449,6 +418,7 @@
<plugin>
<groupId>org.nuiton</groupId>
<artifactId>maven-license-plugin</artifactId>
+ <version>2.4.1</version>
<configuration>
<excludes>
<exclude>**/it/ano-947/**</exclude>
@@ -491,7 +461,8 @@
<pomInclude>evol-818/multimodule-filters/pom.xml</pomInclude>
<pomInclude>evol-884/update-project-license/pom.xml</pomInclude>
<pomInclude>evol-884/update-file-header/pom.xml</pomInclude>
- <pomInclude>evol-884/update-file-header-specific/pom.xml</pomInclude>
+ <pomInclude>evol-884/update-file-header-specific/pom.xml
+ </pomInclude>
<pomInclude>add-third-party/no-encoding/pom.xml</pomInclude>
<pomInclude>aggregate-add-third-party/pom.xml</pomInclude>
<pomInclude>add-third-party/merge-licenses/pom.xml</pomInclude>
@@ -501,7 +472,8 @@
<pomInclude>update-project-license/pom.xml</pomInclude>
</pomIncludes>
<postBuildHookScript>verify</postBuildHookScript>
- <localRepositoryPath>${basedir}/target/local-repo</localRepositoryPath>
+ <localRepositoryPath>${basedir}/target/local-repo
+ </localRepositoryPath>
<settingsFile>src/it/settings.xml</settingsFile>
<cloneProjectsTo>${project.build.directory}/its</cloneProjectsTo>
<debug>${maven.verbose}</debug>
Modified: trunk/src/it/update-file-header/pom.xml
===================================================================
--- trunk/src/it/update-file-header/pom.xml 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/it/update-file-header/pom.xml 2010-11-11 22:38:54 UTC (rev 1874)
@@ -43,6 +43,7 @@
</organization>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <license.licenseName>gpl_v3</license.licenseName>
</properties>
<build>
Modified: trunk/src/it/update-project-license/pom.xml
===================================================================
--- trunk/src/it/update-project-license/pom.xml 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/it/update-project-license/pom.xml 2010-11-11 22:38:54 UTC (rev 1874)
@@ -45,6 +45,7 @@
</organization>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <license.licenseName>gpl_v3</license.licenseName>
<license.generateBundle>true</license.generateBundle>
<license.bundleLicensePath>META-INF/bundleLicense.txt</license.bundleLicensePath>
<license.verbose>true</license.verbose>
Copied: trunk/src/main/java/org/nuiton/license/plugin/AbstractLicenseNameMojo.java (from rev 1867, trunk/src/main/java/org/nuiton/license/plugin/AbstractLicenseWithDescriptorMojo.java)
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AbstractLicenseNameMojo.java (rev 0)
+++ trunk/src/main/java/org/nuiton/license/plugin/AbstractLicenseNameMojo.java 2010-11-11 22:38:54 UTC (rev 1874)
@@ -0,0 +1,223 @@
+/*
+ * #%L
+ * Maven License Plugin
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+package org.nuiton.license.plugin;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.maven.plugin.MojoFailureException;
+import org.nuiton.license.plugin.model.License;
+import org.nuiton.license.plugin.model.LicenseStore;
+import org.nuiton.plugin.PluginWithEncoding;
+
+import java.util.Arrays;
+
+/**
+ * Abstract mojo which using a {@link #licenseName} and owns a
+ * {@link #licenseStore}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.1
+ */
+public abstract class AbstractLicenseNameMojo extends AbstractLicenseMojo implements PluginWithEncoding {
+
+ /**
+ * Encoding used to read and writes files.
+ * <p/>
+ * <b>Note:</b> If nothing is filled here, we will use the system
+ * property {@code file.encoding}.
+ *
+ * @parameter expression="${license.encoding}" default-value="${project.build.sourceEncoding}"
+ * @required
+ * @since 2.1
+ */
+ private String encoding;
+
+ /**
+ * To specify an external extra licenses repository resolver (says the base
+ * url of the repository where the {@code license.properties} is present).
+ *
+ * @parameter expression="${license.licenseResolver}"
+ * @since 2.1
+ */
+ private String licenseResolver;
+
+ /**
+ * A flag to keep a backup of every modified file.
+ *
+ * @parameter expression="${license.keepBackup}" default-value="false"
+ * @since 2.1
+ */
+ private boolean keepBackup;
+
+ /**
+ * Name of the license to use in the project.
+ *
+ * @parameter expression="${license.licenseName}"
+ * @since 2.4
+ */
+ private String licenseName;
+
+ /** store of licenses */
+ private LicenseStore licenseStore;
+
+ /**
+ * When is sets to {@code true}, will skip execution.
+ * <p/>
+ * This will take effects in method {@link #checkSkip()}.
+ * So the method {@link #doAction()} will never be invoked.
+ *
+ * @return {@code true} if goal will not be executed
+ */
+ public abstract boolean isSkip();
+
+ /**
+ * Changes internal state {@code skip} to execute (or not) goal.
+ *
+ * @param skip new state value
+ */
+ public abstract void setSkip(boolean skip);
+
+ @Override
+ protected boolean checkSkip() {
+ if (isSkip()) {
+ getLog().info("skip flag is on, will skip goal.");
+ return false;
+ }
+ return super.checkSkip();
+ }
+
+ @Override
+ protected void init() throws Exception {
+
+ if (isSkip()) {
+ return;
+ }
+
+ // init licenses store
+ LicenseStore licenseStore = createLicenseStore(getLicenseResolver());
+ setLicenseStore(licenseStore);
+
+ // check licenseName exists
+ checkLicense(licenseName);
+ }
+
+ public License getMainLicense()
+ throws IllegalArgumentException, IllegalStateException, MojoFailureException {
+
+ // check license exists
+ checkLicense(licenseName);
+
+ // obtain license from his name
+ License mainLicense = getLicense(licenseName);
+ return mainLicense;
+ }
+
+ public License getLicense(String licenseName)
+ throws IllegalArgumentException, IllegalStateException {
+ if (StringUtils.isEmpty(licenseName)) {
+ throw new IllegalArgumentException(
+ "licenseName can not be null, nor empty");
+ }
+ LicenseStore licenseStore = getLicenseStore();
+ if (licenseStore == null) {
+ throw new IllegalStateException("No license store initialized!");
+ }
+ License mainLicense = licenseStore.getLicense(licenseName);
+ return mainLicense;
+ }
+
+ /**
+ * Check if the given license name is valid (not null, nor empty) and
+ * exists in the license store.
+ *
+ * @param licenseName the name of the license to check
+ * @throws IllegalArgumentException if license is not valid
+ * @throws IllegalStateException if license store is not initialized
+ * @throws MojoFailureException if license does not exist
+ * @since 2.4.1
+ */
+ protected void checkLicense(String licenseName)
+ throws IllegalArgumentException,
+ IllegalStateException, MojoFailureException {
+ if (StringUtils.isEmpty(licenseName)) {
+ throw new IllegalArgumentException(
+ "licenseName can not be null, nor empty");
+ }
+ LicenseStore licenseStore = getLicenseStore();
+ if (licenseStore == null) {
+ throw new IllegalStateException("No license store initialized!");
+ }
+ License mainLicense = licenseStore.getLicense(licenseName);
+ if (mainLicense == null) {
+ throw new MojoFailureException(
+ "License named '" + mainLicense +
+ "' is unknown, use one of " +
+ Arrays.toString(licenseStore.getLicenseNames()));
+ }
+ }
+
+ @Override
+ public final String getEncoding() {
+ return encoding;
+ }
+
+ @Override
+ public final void setEncoding(String encoding) {
+ this.encoding = encoding;
+ }
+
+ public boolean isKeepBackup() {
+ return keepBackup;
+ }
+
+ public String getLicenseName() {
+ return licenseName;
+ }
+
+ public String getLicenseResolver() {
+ return licenseResolver;
+ }
+
+ public LicenseStore getLicenseStore() {
+ return licenseStore;
+ }
+
+ public void setKeepBackup(boolean keepBackup) {
+ this.keepBackup = keepBackup;
+ }
+
+ public void setLicenseResolver(String licenseResolver) {
+ this.licenseResolver = licenseResolver;
+ }
+
+ public void setLicenseName(String licenseName) {
+ this.licenseName = licenseName;
+ }
+
+ public void setLicenseStore(LicenseStore licenseStore) {
+ this.licenseStore = licenseStore;
+ }
+
+}
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/AbstractLicenseNameMojo.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Deleted: trunk/src/main/java/org/nuiton/license/plugin/AbstractLicenseWithDescriptorMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AbstractLicenseWithDescriptorMojo.java 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/main/java/org/nuiton/license/plugin/AbstractLicenseWithDescriptorMojo.java 2010-11-11 22:38:54 UTC (rev 1874)
@@ -1,339 +0,0 @@
-/*
- * #%L
- * Maven License Plugin
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Lesser Public License for more details.
- *
- * You should have received a copy of the GNU General Lesser Public
- * License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
- * #L%
- */
-
-package org.nuiton.license.plugin;
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.project.MavenProject;
-import org.nuiton.license.plugin.model.License;
-import org.nuiton.license.plugin.model.LicenseStore;
-import org.nuiton.license.plugin.model.descriptor.LicenseProjectDescriptor;
-import org.nuiton.license.plugin.model.descriptor.io.xpp3.LicenseProjectDescriptorXpp3Reader;
-import org.nuiton.plugin.PluginWithEncoding;
-
-import java.io.File;
-import java.io.FileReader;
-import java.util.Arrays;
-
-/**
- * Abstract mojo which using {@link #descriptor} file and owns a
- * {@link #licenseStore}.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 2.1
- */
-public abstract class AbstractLicenseWithDescriptorMojo extends AbstractLicenseMojo implements PluginWithEncoding {
-
- /**
- * Encoding used to read and writes files.
- * <p/>
- * <b>Note:</b> If nothing is filled here, we will use the system
- * property {@code file.encoding}.
- *
- * @parameter expression="${license.encoding}" default-value="${project.build.sourceEncoding}"
- * @required
- * @since 2.1
- */
- private String encoding;
-
- /**
- * The project license descriptor file.
- * <p/>
- * <b>Note:</b> This parameter is no more required as it will be removed in
- * version 3.
- *
- * @parameter expression="${license.descriptor}" default-value="src/license/project.xml"
- * @since 2.1
- * @deprecated since 2.4.1, in version 3 we will no more use descriptor
- */
- @Deprecated
- private File descriptor;
-
- /**
- * To specify an external extra licenses repository resolver (says the base
- * url of the repository where the {@code license.properties} is present).
- *
- * @parameter expression="${license.licenseResolver}"
- * @since 2.1
- */
- private String licenseResolver;
-
- /**
- * A flag to keep a backup of every modified file.
- *
- * @parameter expression="${license.keepBackup}" default-value="false"
- * @since 2.1
- */
- private boolean keepBackup;
-
- /**
- * Name of the license to use in the project.
- *
- * @parameter expression="${license.licenseName}"
- * @since 2.4
- */
- private String licenseName;
-
- /** store of licenses */
- private LicenseStore licenseStore;
-
- /**
- * descriptor of project.
- *
- * @deprecated since 2.4.1, in version 3 we will no more use a descriptor file to describe project license.
- */
- @Deprecated
- private LicenseProjectDescriptor licenseProjectDescriptor;
-
- /**
- * When is sets to {@code true}, will skip execution.
- * <p/>
- * This will take effects in method {@link #checkSkip()}.
- * So the method {@link #doAction()} will never be invoked.
- *
- * @return {@code true} if goal will not be executed
- */
- public abstract boolean isSkip();
-
- /**
- * Changes internal state {@code skip} to execute (or not) goal.
- *
- * @param skip new state value
- */
- public abstract void setSkip(boolean skip);
-
- @Override
- protected boolean checkSkip() {
- if (isSkip()) {
- getLog().info("skip flag is on, will skip goal.");
- return false;
- }
- return super.checkSkip();
- }
-
- @Override
- protected void init() throws Exception {
-
- if (isSkip()) {
- return;
- }
-
- // init licenses store
- LicenseStore licenseStore = createLicenseStore(getLicenseResolver());
- setLicenseStore(licenseStore);
-
- // load project descriptor
- File descriptorFile = new File(getDescriptor().getAbsolutePath());
- if (!descriptorFile.exists()) {
-
- // try to find the file in the direct parent module
- MavenProject mavenProject = getProject().getParent();
- if (mavenProject != null) {
-
- File basedir = getProject().getBasedir();
-
- // try with the parent
- String path = descriptorFile.getAbsolutePath().substring(
- basedir.getAbsolutePath().length() + 1);
- setDescriptor(new File(mavenProject.getBasedir() +
- File.separator + path));
- if (isVerbose()) {
- getLog().info("try in parent module " + getDescriptor());
- }
-
- }
- descriptorFile = new File(getDescriptor().getAbsolutePath());
- }
-
- if (!descriptorFile.exists()) {
-
- // No descriptor File: use no descriptor
-
- // check licenseName exists
- checkLicense(licenseName);
-
- return;
- }
-
- // Will use the deprecated license project descriptor
-
- getLog().warn("\n");
- getLog().warn("-----------------------------------------------------------------------------------");
- getLog().warn("The usage of License descriptor file is deprecated and will be removed in version 3");
- getLog().warn("-----------------------------------------------------------------------------------");
- getLog().warn("\n");
-
- getLog().info("Loading descriptor " + descriptorFile);
- LicenseProjectDescriptor licenseProject = null;
- FileReader reader = new FileReader(descriptorFile);
- try {
- licenseProject =
- new LicenseProjectDescriptorXpp3Reader().read(reader);
- setLicenseProjectDescriptor(licenseProject);
-
- } finally {
- reader.close();
- }
-
- // check that license project is sane (known licenses + header types)
- // + populate default license name in LicenseSet (with main License) if
- // none given for licenseSet
- validateLicenseProjectDescriptor(licenseProject);
- }
-
- @Deprecated
- protected void validateLicenseProjectDescriptor(LicenseProjectDescriptor licenseProjectDescriptor) throws MojoFailureException {
- String mainLicense = licenseProjectDescriptor.getMainLicense();
-
- checkLicense(mainLicense);
-
- setLicenseName(mainLicense);
- }
-
- public License getMainLicense()
- throws IllegalArgumentException, IllegalStateException, MojoFailureException {
-// LicenseProjectDescriptor licenseProject = getLicenseProjectDescriptor();
-// if (licenseProject != null) {
-//
-// // use the main license from the license project descriptor
-// licenseName = licenseProject.getMainLicense();
-// }
-
- // check license exists
- checkLicense(licenseName);
-
- // obtain license from his name
- License mainLicense = getLicense(licenseName);
- return mainLicense;
- }
-
- public License getLicense(String licenseName)
- throws IllegalArgumentException, IllegalStateException {
- if (StringUtils.isEmpty(licenseName)) {
- throw new IllegalArgumentException(
- "licenseName can not be null, nor empty");
- }
- LicenseStore licenseStore = getLicenseStore();
- if (licenseStore == null) {
- throw new IllegalStateException("No license store initialized!");
- }
- License mainLicense = licenseStore.getLicense(licenseName);
- return mainLicense;
- }
-
- /**
- * Check if the given license name is valid (not null, nor empty) and
- * exists in the license store.
- *
- * @param licenseName the name of the license to check
- * @throws IllegalArgumentException if license is not valid
- * @throws IllegalStateException if license store is not initialized
- * @throws MojoFailureException if license does not exist
- * @since 2.4.1
- */
- protected void checkLicense(String licenseName)
- throws IllegalArgumentException,
- IllegalStateException, MojoFailureException {
- if (StringUtils.isEmpty(licenseName)) {
- throw new IllegalArgumentException(
- "licenseName can not be null, nor empty");
- }
- LicenseStore licenseStore = getLicenseStore();
- if (licenseStore == null) {
- throw new IllegalStateException("No license store initialized!");
- }
- License mainLicense = licenseStore.getLicense(licenseName);
- if (mainLicense == null) {
- throw new MojoFailureException(
- "License named '" + mainLicense +
- "' is unknown, use one of " +
- Arrays.toString(licenseStore.getLicenseNames()));
- }
- }
-
- @Override
- public final String getEncoding() {
- return encoding;
- }
-
- @Override
- public final void setEncoding(String encoding) {
- this.encoding = encoding;
- }
-
- @Deprecated
- public File getDescriptor() {
- return descriptor;
- }
-
- public boolean isKeepBackup() {
- return keepBackup;
- }
-
- public String getLicenseName() {
- return licenseName;
- }
-
- public String getLicenseResolver() {
- return licenseResolver;
- }
-
- public LicenseStore getLicenseStore() {
- return licenseStore;
- }
-
- @Deprecated
- public LicenseProjectDescriptor getLicenseProjectDescriptor() {
- return licenseProjectDescriptor;
- }
-
- public void setKeepBackup(boolean keepBackup) {
- this.keepBackup = keepBackup;
- }
-
- @Deprecated
- public void setDescriptor(File descriptor) {
- this.descriptor = descriptor;
- }
-
- public void setLicenseResolver(String licenseResolver) {
- this.licenseResolver = licenseResolver;
- }
-
- public void setLicenseName(String licenseName) {
- this.licenseName = licenseName;
- }
-
- public void setLicenseStore(LicenseStore licenseStore) {
- this.licenseStore = licenseStore;
- }
-
- @Deprecated
- public void setLicenseProjectDescriptor(
- LicenseProjectDescriptor licenseProjectDescriptor) {
- this.licenseProjectDescriptor = licenseProjectDescriptor;
- }
-}
Modified: trunk/src/main/java/org/nuiton/license/plugin/UpdateFileHeaderMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/UpdateFileHeaderMojo.java 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/main/java/org/nuiton/license/plugin/UpdateFileHeaderMojo.java 2010-11-11 22:38:54 UTC (rev 1874)
@@ -26,23 +26,14 @@
package org.nuiton.license.plugin;
import org.apache.commons.lang.StringUtils;
-import org.apache.maven.plugin.MojoFailureException;
import org.codehaus.plexus.util.FileUtils;
import org.nuiton.license.plugin.header.FileHeader;
import org.nuiton.license.plugin.header.FileHeaderProcessor;
import org.nuiton.license.plugin.header.FileHeaderProcessorConfiguration;
import org.nuiton.license.plugin.header.InvalideFileHeaderException;
import org.nuiton.license.plugin.header.UpdateFileHeaderFilter;
-import org.nuiton.license.plugin.header.transformer.AptFileHeaderTransformer;
import org.nuiton.license.plugin.header.transformer.FileHeaderTransformer;
-import org.nuiton.license.plugin.header.transformer.JavaFileHeaderTransformer;
-import org.nuiton.license.plugin.header.transformer.PropertiesFileHeaderTransformer;
-import org.nuiton.license.plugin.header.transformer.RstFileHeaderTransformer;
-import org.nuiton.license.plugin.header.transformer.XmlFileHeaderTransformer;
import org.nuiton.license.plugin.model.License;
-import org.nuiton.license.plugin.model.descriptor.FileSet;
-import org.nuiton.license.plugin.model.descriptor.Header;
-import org.nuiton.license.plugin.model.descriptor.LicenseProjectDescriptor;
import org.nuiton.plugin.PluginHelper;
import java.io.File;
@@ -60,8 +51,7 @@
import java.util.TreeMap;
/**
- * The goal to update (or add) the header on some files described in
- * {@link #descriptor} file.
+ * The goal to update (or add) the header on project source files.
* <p/>
* This goal replace the {@code update-header} goal which can not deal with
* Copyright.
@@ -74,7 +64,7 @@
* @goal update-file-header
* @since 2.1
*/
-public class UpdateFileHeaderMojo extends AbstractLicenseWithDescriptorMojo implements FileHeaderProcessorConfiguration {
+public class UpdateFileHeaderMojo extends AbstractLicenseNameMojo implements FileHeaderProcessorConfiguration {
/**
* Name of project (or module).
@@ -421,17 +411,6 @@
super.init();
- // this block will be removed in version 3
- if (getLicenseProjectDescriptor() != null) {
-
- // use the main license from the license project descriptor
- setLicenseName(getLicenseProjectDescriptor().getMainLicense());
-
- // get all files to treate indexed by their comment style
- filesToTreateByCommentStyle = obtainFilesToTreateByCommentStyle();
- return;
- }
-
if (roots == null || roots.length == 0) {
roots = DEFAULT_ROOTS;
if (isVerbose()) {
@@ -514,64 +493,6 @@
result.put(commentStyle, new ArrayList<File>());
}
- // this block will be removed in version 3
- if (getLicenseProjectDescriptor() != null) {
-
- List<Header> headers = getLicenseProjectDescriptor().getHeaders();
-
- for (Header header : headers) {
-
- String commentStyle = header.getCommentStyle();
-
- List<File> filesForCS = result.get(commentStyle);
-
- for (FileSet fileSet : header.getFileSets()) {
-
- File basedir = new File(getProject().getBasedir(),
- fileSet.getBasedir());
- if (getLog().isDebugEnabled()) {
- getLog().debug(" - process file set with basedir : " + basedir);
- }
-
- List<String> includes = fileSet.getIncludes();
- if (includes.isEmpty()) {
-
- // it means include all
- includes.add("**/*");
- }
- List<String> excludes = fileSet.getExcludes();
-
- Map<File, String[]> filestoTreate = new TreeMap<File, String[]>();
-
- // obtain files to treate
- getFilesToTreateForRoots(
- includes.toArray(new String[includes.size()]),
- excludes.isEmpty() ? null :
- excludes.toArray(new String[excludes.size()]),
- Arrays.asList(basedir.getAbsolutePath()),
- filestoTreate,
- null
- );
-
- try {
- for (Map.Entry<File, String[]> entry :
- filestoTreate.entrySet()) {
-
- File rootFile = entry.getKey();
-
- for (String path : entry.getValue()) {
-
- filesForCS.add(new File(rootFile, path));
- }
- }
- } finally {
- filestoTreate.clear();
- }
- }
- }
- return result;
- }
-
List<String> rootsList = new ArrayList<String>(roots.length);
for (String root : roots) {
File f = new File(root);
@@ -583,6 +504,10 @@
if (f.exists()) {
getLog().info("Will search files to update from root " + f);
rootsList.add(f.getAbsolutePath());
+ } else {
+ if (isVerbose()) {
+ getLog().info("Skip not found root " + f);
+ }
}
}
@@ -999,36 +924,6 @@
return result;
}
- /**
- * Obtain the known Comment style from the given extension
- *
- * @param extension the extension to match with a comment style
- * @return the known comment style, or null if not found
- */
- protected String getCommentStyleForExtenion(String extension) {
-
- // trim the extension
- extension = extension.trim();
-
- if (JavaFileHeaderTransformer.NAME.equalsIgnoreCase(extension)) {
- return JavaFileHeaderTransformer.NAME;
- }
- if (XmlFileHeaderTransformer.NAME.equalsIgnoreCase(extension)) {
- return XmlFileHeaderTransformer.NAME;
- }
- if (AptFileHeaderTransformer.NAME.equalsIgnoreCase(extension)) {
- return AptFileHeaderTransformer.NAME;
- }
- if (PropertiesFileHeaderTransformer.NAME.equalsIgnoreCase(extension)) {
- return PropertiesFileHeaderTransformer.NAME;
- }
- if (RstFileHeaderTransformer.NAME.equalsIgnoreCase(extension)) {
- return RstFileHeaderTransformer.NAME;
- }
-
- return null;
- }
-
public FileHeaderTransformer getTransformer(String transformerName)
throws IllegalArgumentException, IllegalStateException {
if (StringUtils.isEmpty(transformerName)) {
@@ -1048,70 +943,6 @@
return transformer;
}
- @Override
- protected void validateLicenseProjectDescriptor(LicenseProjectDescriptor licenseProjectDescriptor)
- throws MojoFailureException {
-
- super.validateLicenseProjectDescriptor(licenseProjectDescriptor);
-
- String mainLicense = licenseProjectDescriptor.getMainLicense();
-
- Header singleHeader = licenseProjectDescriptor.getHeader();
- if (singleHeader != null) {
-
- // add it to set (and remove it from single)
- licenseProjectDescriptor.addHeader(singleHeader);
- licenseProjectDescriptor.setHeader(null);
- }
-
- for (Header header : licenseProjectDescriptor.getHeaders()) {
-
- String headerType = header.getCommentStyle();
-
- if (getTransformer(headerType) == null) {
- throw new MojoFailureException(
- "headerType '" + headerType +
- "' is unknown, use one of " + transformers.keySet());
- }
- String licenseName = header.getLicenseName();
- if (StringUtils.isEmpty(licenseName)) {
-
- // use the main license
- header.setLicenseName(mainLicense);
- } else {
-
- // check license name
- checkLicense(licenseName);
- }
-
- FileSet singleFileSet = header.getFileSet();
- if (singleFileSet != null) {
-
- // add it to set (and remove it from single)
- header.addFileSet(singleFileSet);
- header.setFileSet(null);
- }
- for (FileSet fileSet : header.getFileSets()) {
-
- String singleInclude = fileSet.getInclude();
- if (singleInclude != null) {
-
- // add it to set (and remove it from single)
- fileSet.addInclude(singleInclude);
- fileSet.setInclude(null);
- }
-
- String singleExclude = fileSet.getExclude();
- if (singleExclude != null) {
-
- // add it to set (and remove it from single)
- fileSet.addExclude(singleExclude);
- fileSet.setExclude(null);
- }
- }
- }
- }
-
public boolean isClearAfterOperation() {
return clearAfterOperation;
}
Modified: trunk/src/main/java/org/nuiton/license/plugin/UpdateProjectLicenseMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/UpdateProjectLicenseMojo.java 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/main/java/org/nuiton/license/plugin/UpdateProjectLicenseMojo.java 2010-11-11 22:38:54 UTC (rev 1874)
@@ -32,10 +32,10 @@
/**
* Updates (or creates) the main project license file according to the given
- * license project {@link #descriptor}.
+ * license defines as {@link #licenseName}.
* <p/>
- * Can also generate a bundle license file (to avoid collision names in
- * class-path). This file is by default generate in
+ * Can also generate a bundled license file (to avoid collision names in
+ * class-path). This file is by default generated in
* {@code META-INF class-path directory}.
* <p/>
* <b>Note:</b> this goal replace {@code add-license} one (which does not
@@ -47,7 +47,7 @@
* @requiresProject true
* @since 2.1
*/
-public class UpdateProjectLicenseMojo extends AbstractLicenseWithDescriptorMojo {
+public class UpdateProjectLicenseMojo extends AbstractLicenseNameMojo {
/**
* Project license file to synchronize with main license defined in
Deleted: trunk/src/main/resources/META-INF/plexus/components.xml
===================================================================
--- trunk/src/main/resources/META-INF/plexus/components.xml 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/main/resources/META-INF/plexus/components.xml 2010-11-11 22:38:54 UTC (rev 1874)
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- #%L
- Maven License Plugin
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Lesser Public License for more details.
-
- You should have received a copy of the GNU General Lesser Public
- License along with this program. If not, see
- <http://www.gnu.org/licenses/lgpl-3.0.html>.
- #L%
- -->
-
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<component-set>
- <components>
- <component>
- <role>org.codehaus.plexus.velocity.VelocityComponent</role>
- <role-hint>maven-license-plugin</role-hint>
- <implementation>org.codehaus.plexus.velocity.DefaultVelocityComponent</implementation>
- <configuration>
- <properties>
- <property>
- <name>resource.loader</name>
- <value>file,classpath</value>
- </property>
- <property>
- <name>classpath.resource.loader.class</name>
- <value>org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader</value>
- </property>
- <property>
- <name>file.resource.loader.class</name>
- <value>org.apache.velocity.runtime.resource.loader.FileResourceLoader</value>
- </property>
- </properties>
- </configuration>
- </component>
- </components>
-</component-set>
\ No newline at end of file
Modified: trunk/src/site/apt/index.apt
===================================================================
--- trunk/src/site/apt/index.apt 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/site/apt/index.apt 2010-11-11 22:38:54 UTC (rev 1874)
@@ -34,6 +34,12 @@
The process tags are separated by space otherwise plugin can NOT update header of this file!
+What's new in version 3.0
+
+ As planned, license descriptor was removed from project.
+
+ <<Projet will migrate to Codehaus>> under the name of <<license-maven-plugin>>.
+
What's new in version 2.4 et 2.4.1
We would like not to use any longer project description file since it is too
Modified: trunk/src/site/fr/apt/index.apt
===================================================================
--- trunk/src/site/fr/apt/index.apt 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/site/fr/apt/index.apt 2010-11-11 22:38:54 UTC (rev 1874)
@@ -36,6 +36,12 @@
Dans la documentation, les tags de process sont séparés par des espaces où le
plugin ne pourrait PAS gérer la license de ces fichiers !
+Quoi de neuf dans la version 3.0
+
+ On a supprimé les fichiers de descriptions dépréciés en 2.4.
+
+ <<Le projet migre sur Codehaus>> sous le nom de <<license-maven-plugin>>.
+
Quoi de neuf dans la version 2.4 et 2.4.1
On voudrait ne plus utiliser les fichiers de descriptions d'en-tête introduits
Modified: trunk/src/test/java/org/nuiton/license/plugin/UpdateFileHeaderMojoTest.java
===================================================================
--- trunk/src/test/java/org/nuiton/license/plugin/UpdateFileHeaderMojoTest.java 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/test/java/org/nuiton/license/plugin/UpdateFileHeaderMojoTest.java 2010-11-11 22:38:54 UTC (rev 1874)
@@ -26,6 +26,7 @@
package org.nuiton.license.plugin;
import org.junit.Assert;
+import org.junit.Ignore;
import org.junit.Test;
import org.nuiton.plugin.AbstractMojoTest;
import org.nuiton.plugin.PluginHelper;
@@ -66,6 +67,12 @@
mojo.clear();
}
+ @Override
+ protected void setUpMojo(UpdateFileHeaderMojo mojo, File pomFile) throws Exception {
+ super.setUpMojo(mojo, pomFile);
+ mojo.getProject().setBasedir(new File(mojo.getProject().getBasedir(),getMethodName()));
+ }
+
@Test
public void addLicense() throws Exception {
Modified: trunk/src/test/java/org/nuiton/license/plugin/UpdateProjectLicenseMojoTest.java
===================================================================
--- trunk/src/test/java/org/nuiton/license/plugin/UpdateProjectLicenseMojoTest.java 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/test/java/org/nuiton/license/plugin/UpdateProjectLicenseMojoTest.java 2010-11-11 22:38:54 UTC (rev 1874)
@@ -53,8 +53,7 @@
// license is where the pom is
File outputDirectory = pomFile.getParentFile();
mojo.setOutputDirectory(outputDirectory);
- mojo.setDescriptor(
- new File(outputDirectory, mojo.getDescriptor().getName()));
+// mojo.setDescriptor(new File(outputDirectory, mojo.getDescriptor().getName()));
if (!outputDirectory.exists()) {
if (!outputDirectory.mkdirs()) {
throw new IOException(
Deleted: trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/addLicense/project.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/addLicense/project.xml 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/addLicense/project.xml 2010-11-11 22:38:54 UTC (rev 1874)
@@ -1,45 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!--
- #%L
- Maven License Plugin
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Lesser Public License for more details.
-
- You should have received a copy of the GNU General Lesser Public
- License along with this program. If not, see
- <http://www.gnu.org/licenses/lgpl-3.0.html>.
- #L%
- -->
-
-<project xmlns="http://maven-site.nuiton.org/maven-license-plugin/1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven-site.nuiton.org/maven-license-plugin/1.0.0 http://maven-site.nuiton.org/maven-license-plugin/licenseProjectDescriptor-…">
- <mainLicense>gpl_v3</mainLicense>
- <headers>
- <header>
- <licenseName>lgpl_v3</licenseName>
- <commentStyle>java</commentStyle>
- <fileSets>
- <fileSet>
- <basedir>addLicense/src</basedir>
- <includes>
- <include>**/*.java</include>
- </includes>
- </fileSet>
- </fileSets>
- </header>
- </headers>
-</project>
Modified: trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/addLicense.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/addLicense.xml 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/addLicense.xml 2010-11-11 22:38:54 UTC (rev 1874)
@@ -42,9 +42,7 @@
<groupId>org.nuiton</groupId>
<artifactId>maven-license-plugin</artifactId>
<configuration>
- <descriptor>
- target/test-classes/org/nuiton/license/plugin/updateFileHeaderMojoTest/addLicense/project.xml
- </descriptor>
+ <licenseName>lgpl_v3</licenseName>
<projectName>Project name : maven-license-plugin-java</projectName>
<organizationName>Organization is CodeLutin</organizationName>
<inceptionYear>2010</inceptionYear>
Deleted: trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/all/project.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/all/project.xml 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/all/project.xml 2010-11-11 22:38:54 UTC (rev 1874)
@@ -1,45 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!--
- #%L
- Maven License Plugin
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Lesser Public License for more details.
-
- You should have received a copy of the GNU General Lesser Public
- License along with this program. If not, see
- <http://www.gnu.org/licenses/lgpl-3.0.html>.
- #L%
- -->
-
-<project xmlns="http://maven-site.nuiton.org/maven-license-plugin/1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven-site.nuiton.org/maven-license-plugin/1.0.0 http://maven-site.nuiton.org/maven-license-plugin/licenseProjectDescriptor-…">
- <mainLicense>gpl_v3</mainLicense>
- <headers>
- <header>
- <licenseName>lgpl_v3</licenseName>
- <commentStyle>java</commentStyle>
- <fileSets>
- <fileSet>
- <basedir>all/src</basedir>
- <includes>
- <include>**/*.java</include>
- </includes>
- </fileSet>
- </fileSets>
- </header>
- </headers>
-</project>
Modified: trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/all.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/all.xml 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/all.xml 2010-11-11 22:38:54 UTC (rev 1874)
@@ -41,9 +41,7 @@
<groupId>org.nuiton</groupId>
<artifactId>maven-license-plugin</artifactId>
<configuration>
- <descriptor>
- target/test-classes/org/nuiton/license/plugin/updateFileHeaderMojoTest/all/project.xml
- </descriptor>
+ <licenseName>lgpl_v3</licenseName>
<projectName>Project name : maven-license-plugin-java</projectName>
<organizationName>Organization is CodeLutin</organizationName>
<inceptionYear>2010</inceptionYear>
Deleted: trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/failLicense/project.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/failLicense/project.xml 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/failLicense/project.xml 2010-11-11 22:38:54 UTC (rev 1874)
@@ -1,47 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!--
- #%L
- Maven License Plugin
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Lesser Public License for more details.
-
- You should have received a copy of the GNU General Lesser Public
- License along with this program. If not, see
- <http://www.gnu.org/licenses/lgpl-3.0.html>.
- #L%
- -->
-
-<project xmlns="http://maven-site.nuiton.org/maven-license-plugin/1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven-site.nuiton.org/maven-license-plugin/1.0.0 http://maven-site.nuiton.org/maven-license-plugin/licenseProjectDescriptor-…">
- <mainLicense>gpl_v3</mainLicense>
-
- <headers>
- <header>
- <licenseName>lgpl_v3</licenseName>
- <commentStyle>java</commentStyle>
- <fileSets>
- <fileSet>
- <basedir>failLicense/src</basedir>
- <includes>
- <include>**/*.java</include>
- </includes>
- </fileSet>
- </fileSets>
- </header>
- </headers>
-
-</project>
Modified: trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/failLicense.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/failLicense.xml 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/failLicense.xml 2010-11-11 22:38:54 UTC (rev 1874)
@@ -41,9 +41,7 @@
<groupId>org.nuiton</groupId>
<artifactId>maven-license-plugin</artifactId>
<configuration>
- <descriptor>
- target/test-classes/org/nuiton/license/plugin/updateFileHeaderMojoTest/failLicense/project.xml
- </descriptor>
+ <licenseName>lgpl_v3</licenseName>
<projectName>NEVER_FINd_ME!</projectName>
<organizationName>NEVER_FINd_ME!</organizationName>
<inceptionYear>2010</inceptionYear>
Deleted: trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/ignoreLicense/project.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/ignoreLicense/project.xml 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/ignoreLicense/project.xml 2010-11-11 22:38:54 UTC (rev 1874)
@@ -1,45 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!--
- #%L
- Maven License Plugin
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Lesser Public License for more details.
-
- You should have received a copy of the GNU General Lesser Public
- License along with this program. If not, see
- <http://www.gnu.org/licenses/lgpl-3.0.html>.
- #L%
- -->
-
-<project xmlns="http://maven-site.nuiton.org/maven-license-plugin/1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven-site.nuiton.org/maven-license-plugin/1.0.0 http://maven-site.nuiton.org/maven-license-plugin/licenseProjectDescriptor-…">
- <mainLicense>gpl_v3</mainLicense>
- <headers>
- <header>
- <licenseName>lgpl_v3</licenseName>
- <commentStyle>java</commentStyle>
- <fileSets>
- <fileSet>
- <basedir>ignoreLicense/src</basedir>
- <includes>
- <include>**/*.java</include>
- </includes>
- </fileSet>
- </fileSets>
- </header>
- </headers>
-</project>
Modified: trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/ignoreLicense.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/ignoreLicense.xml 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/ignoreLicense.xml 2010-11-11 22:38:54 UTC (rev 1874)
@@ -41,9 +41,7 @@
<groupId>org.nuiton</groupId>
<artifactId>maven-license-plugin</artifactId>
<configuration>
- <descriptor>
- target/test-classes/org/nuiton/license/plugin/updateFileHeaderMojoTest/ignoreLicense/project.xml
- </descriptor>
+ <licenseName>lgpl_v3</licenseName>
<projectName>NEVER_FINd_ME!</projectName>
<organizationName>NEVER_FINd_ME!</organizationName>
<inceptionYear>2010</inceptionYear>
Deleted: trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/updateLicense/project.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/updateLicense/project.xml 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/updateLicense/project.xml 2010-11-11 22:38:54 UTC (rev 1874)
@@ -1,46 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!--
- #%L
- Maven License Plugin
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Lesser Public License for more details.
-
- You should have received a copy of the GNU General Lesser Public
- License along with this program. If not, see
- <http://www.gnu.org/licenses/lgpl-3.0.html>.
- #L%
- -->
-
-
-<project xmlns="http://maven-site.nuiton.org/maven-license-plugin/1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven-site.nuiton.org/maven-license-plugin/1.0.0 http://maven-site.nuiton.org/maven-license-plugin/licenseProjectDescriptor-…">
- <mainLicense>gpl_v3</mainLicense>
- <headers>
- <header>
- <licenseName>lgpl_v3</licenseName>
- <commentStyle>java</commentStyle>
- <fileSets>
- <fileSet>
- <basedir>updateLicense/src</basedir>
- <includes>
- <include>**/*.java</include>
- </includes>
- </fileSet>
- </fileSets>
- </header>
- </headers>
-</project>
Modified: trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/updateLicense.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/updateLicense.xml 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateFileHeaderMojoTest/updateLicense.xml 2010-11-11 22:38:54 UTC (rev 1874)
@@ -42,9 +42,7 @@
<groupId>org.nuiton</groupId>
<artifactId>maven-license-plugin</artifactId>
<configuration>
- <descriptor>
- target/test-classes/org/nuiton/license/plugin/updateFileHeaderMojoTest/updateLicense/project.xml
- </descriptor>
+ <licenseName>lgpl_v3</licenseName>
<projectName>Project name : maven-license-plugin-java</projectName>
<organizationName>Organization is CodeLutin</organizationName>
<inceptionYear>2010</inceptionYear>
Deleted: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense/project.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense/project.xml 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense/project.xml 2010-11-11 22:38:54 UTC (rev 1874)
@@ -1,45 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!--
- #%L
- Maven License Plugin
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Lesser Public License for more details.
-
- You should have received a copy of the GNU General Lesser Public
- License along with this program. If not, see
- <http://www.gnu.org/licenses/lgpl-3.0.html>.
- #L%
- -->
-
-<project xmlns="http://maven-site.nuiton.org/maven-license-plugin/1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven-site.nuiton.org/maven-license-plugin/1.0.0 http://maven-site.nuiton.org/maven-license-plugin/licenseProject-1.0.0.xsd">
- <mainLicense>gpl_v3</mainLicense>
- <licenseSets>
- <licenseSet>
- <licenseName>lgpl_v3</licenseName>
- <fileSets>
- <fileSet>
- <headerType>java</headerType>
- <basedir>addLicense/src</basedir>
- <includes>
- <include>**/*.java</include>
- </includes>
- </fileSet>
- </fileSets>
- </licenseSet>
- </licenseSets>
-</project>
Modified: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense.xml 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense.xml 2010-11-11 22:38:54 UTC (rev 1874)
@@ -42,9 +42,7 @@
<groupId>org.nuiton</groupId>
<artifactId>maven-license-plugin</artifactId>
<configuration>
- <descriptor>
- target/test-classes/org/nuiton/license/plugin/updateLicenseMojoTest/addLicense/project.xml
- </descriptor>
+ <licenseName>lgpl_v3</licenseName>
<projectName>Project name : maven-license-plugin-java</projectName>
<organizationName>Organization is CodeLutin</organizationName>
<inceptionYear>2010</inceptionYear>
Deleted: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense/project.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense/project.xml 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense/project.xml 2010-11-11 22:38:54 UTC (rev 1874)
@@ -1,45 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!--
- #%L
- Maven License Plugin
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Lesser Public License for more details.
-
- You should have received a copy of the GNU General Lesser Public
- License along with this program. If not, see
- <http://www.gnu.org/licenses/lgpl-3.0.html>.
- #L%
- -->
-
-<project xmlns="http://maven-site.nuiton.org/maven-license-plugin/1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven-site.nuiton.org/maven-license-plugin/1.0.0 http://maven-site.nuiton.org/maven-license-plugin/licenseProject-1.0.0.xsd">
- <mainLicense>gpl_v3</mainLicense>
- <licenseSets>
- <licenseSet>
- <licenseName>lgpl_v3</licenseName>
- <fileSets>
- <fileSet>
- <headerType>java</headerType>
- <basedir>ignoreLicense/src</basedir>
- <includes>
- <include>**/*.java</include>
- </includes>
- </fileSet>
- </fileSets>
- </licenseSet>
- </licenseSets>
-</project>
Modified: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense.xml 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense.xml 2010-11-11 22:38:54 UTC (rev 1874)
@@ -41,9 +41,7 @@
<groupId>org.nuiton</groupId>
<artifactId>maven-license-plugin</artifactId>
<configuration>
- <descriptor>
- target/test-classes/org/nuiton/license/plugin/updateLicenseMojoTest/ignoreLicense/project.xml
- </descriptor>
+ <licenseName>lgpl_v3</licenseName>
<projectName>NEVER_FINd_ME!</projectName>
<organizationName>NEVER_FINd_ME!</organizationName>
<inceptionYear>2010</inceptionYear>
Deleted: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense/project.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense/project.xml 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense/project.xml 2010-11-11 22:38:54 UTC (rev 1874)
@@ -1,46 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!--
- #%L
- Maven License Plugin
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Lesser Public License for more details.
-
- You should have received a copy of the GNU General Lesser Public
- License along with this program. If not, see
- <http://www.gnu.org/licenses/lgpl-3.0.html>.
- #L%
- -->
-
-
-<project xmlns="http://maven-site.nuiton.org/maven-license-plugin/1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven-site.nuiton.org/maven-license-plugin/1.0.0 http://maven-site.nuiton.org/maven-license-plugin/licenseProject-1.0.0.xsd">
- <mainLicense>gpl_v3</mainLicense>
- <licenseSets>
- <licenseSet>
- <licenseName>lgpl_v3</licenseName>
- <fileSets>
- <fileSet>
- <headerType>java</headerType>
- <basedir>updateLicense/src</basedir>
- <includes>
- <include>**/*.java</include>
- </includes>
- </fileSet>
- </fileSets>
- </licenseSet>
- </licenseSets>
-</project>
Modified: trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense.xml 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense.xml 2010-11-11 22:38:54 UTC (rev 1874)
@@ -42,9 +42,7 @@
<groupId>org.nuiton</groupId>
<artifactId>maven-license-plugin</artifactId>
<configuration>
- <descriptor>
- target/test-classes/org/nuiton/license/plugin/updateLicenseMojoTest/updateLicense/project.xml
- </descriptor>
+ <licenseName>lgpl_v3</licenseName>
<projectName>Project name : maven-license-plugin-java</projectName>
<organizationName>Organization is CodeLutin</organizationName>
<inceptionYear>2010</inceptionYear>
Deleted: trunk/src/test/resources/org/nuiton/license/plugin/updateProjectLicenseMojoTest/projectOne.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateProjectLicenseMojoTest/projectOne.xml 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateProjectLicenseMojoTest/projectOne.xml 2010-11-11 22:38:54 UTC (rev 1874)
@@ -1,31 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!--
- #%L
- Maven License Plugin
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Lesser Public License for more details.
-
- You should have received a copy of the GNU General Lesser Public
- License along with this program. If not, see
- <http://www.gnu.org/licenses/lgpl-3.0.html>.
- #L%
- -->
-
-<project xmlns="http://maven-site.nuiton.org/maven-license-plugin/1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven-site.nuiton.org/maven-license-plugin/1.0.0 http://maven-site.nuiton.org/maven-license-plugin/licenseProjectDescriptor-…">
- <mainLicense>lgpl_v3</mainLicense>
-</project>
Deleted: trunk/src/test/resources/org/nuiton/license/plugin/updateProjectLicenseMojoTest/projectTwo.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateProjectLicenseMojoTest/projectTwo.xml 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateProjectLicenseMojoTest/projectTwo.xml 2010-11-11 22:38:54 UTC (rev 1874)
@@ -1,31 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!--
- #%L
- Maven License Plugin
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2008 - 2010 CodeLutin, Tony Chemit
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Lesser Public License for more details.
-
- You should have received a copy of the GNU General Lesser Public
- License along with this program. If not, see
- <http://www.gnu.org/licenses/lgpl-3.0.html>.
- #L%
- -->
-
-<project xmlns="http://maven-site.nuiton.org/maven-license-plugin/1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven-site.nuiton.org/maven-license-plugin/1.0.0 http://maven-site.nuiton.org/maven-license-plugin/licenseProjectDescriptor-…">
- <mainLicense>gpl_v3</mainLicense>
-</project>
Modified: trunk/src/test/resources/org/nuiton/license/plugin/updateProjectLicenseMojoTest/testOne.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateProjectLicenseMojoTest/testOne.xml 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateProjectLicenseMojoTest/testOne.xml 2010-11-11 22:38:54 UTC (rev 1874)
@@ -41,9 +41,8 @@
<artifactId>maven-license-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
- <descriptor>${basedir}/projectOne.xml</descriptor>
+ <licenseName>lgpl_v3</licenseName>
<licenseFile>licenseOne.txt</licenseFile>
- <!--<outputDirectory>test</outputDirectory>-->
<verbose>true</verbose>
</configuration>
<executions>
Modified: trunk/src/test/resources/org/nuiton/license/plugin/updateProjectLicenseMojoTest/testTwo.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/updateProjectLicenseMojoTest/testTwo.xml 2010-11-11 21:20:22 UTC (rev 1873)
+++ trunk/src/test/resources/org/nuiton/license/plugin/updateProjectLicenseMojoTest/testTwo.xml 2010-11-11 22:38:54 UTC (rev 1874)
@@ -41,7 +41,7 @@
<artifactId>maven-license-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
- <descriptor>projectTwo.xml</descriptor>
+ <licenseName>gpl_v3</licenseName>
<licenseFile>licenseTwo.txt</licenseFile>
<verbose>true</verbose>
</configuration>
1
0
r1873 - in trunk: . src/it/ano-812 src/main/java/org/nuiton/license/plugin
by tchemit@users.nuiton.org 11 Nov '10
by tchemit@users.nuiton.org 11 Nov '10
11 Nov '10
Author: tchemit
Date: 2010-11-11 22:20:22 +0100 (Thu, 11 Nov 2010)
New Revision: 1873
Url: http://nuiton.org/repositories/revision/maven-license-plugin/1873
Log:
push back all its + add svn-keywords + license headers
Modified:
trunk/pom.xml
trunk/src/it/ano-812/README.txt
trunk/src/it/ano-812/invoker.properties
trunk/src/it/ano-812/pom.xml
trunk/src/it/ano-812/verify.groovy
trunk/src/main/java/org/nuiton/license/plugin/ArtifactHelper.java
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-11-11 21:09:37 UTC (rev 1872)
+++ trunk/pom.xml 2010-11-11 21:20:22 UTC (rev 1873)
@@ -484,21 +484,21 @@
<configuration>
<pomIncludes>
<pomInclude>ano-812/pom.xml</pomInclude>
- <!--<pomInclude>ano-816/pom.xml</pomInclude>-->
- <!--<pomInclude>ano-947/pom.xml</pomInclude>-->
- <!--<pomInclude>evol-952/pom.xml</pomInclude>-->
- <!--<pomInclude>evol-818/excluded-included/pom.xml</pomInclude>-->
- <!--<pomInclude>evol-818/multimodule-filters/pom.xml</pomInclude>-->
- <!--<pomInclude>evol-884/update-project-license/pom.xml</pomInclude>-->
- <!--<pomInclude>evol-884/update-file-header/pom.xml</pomInclude>-->
- <!--<pomInclude>evol-884/update-file-header-specific/pom.xml</pomInclude>-->
- <!--<pomInclude>add-third-party/no-encoding/pom.xml</pomInclude>-->
- <!--<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>-->
- <!--<pomInclude>update-project-license/pom.xml</pomInclude>-->
+ <pomInclude>ano-816/pom.xml</pomInclude>
+ <pomInclude>ano-947/pom.xml</pomInclude>
+ <pomInclude>evol-952/pom.xml</pomInclude>
+ <pomInclude>evol-818/excluded-included/pom.xml</pomInclude>
+ <pomInclude>evol-818/multimodule-filters/pom.xml</pomInclude>
+ <pomInclude>evol-884/update-project-license/pom.xml</pomInclude>
+ <pomInclude>evol-884/update-file-header/pom.xml</pomInclude>
+ <pomInclude>evol-884/update-file-header-specific/pom.xml</pomInclude>
+ <pomInclude>add-third-party/no-encoding/pom.xml</pomInclude>
+ <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>
+ <pomInclude>update-project-license/pom.xml</pomInclude>
</pomIncludes>
<postBuildHookScript>verify</postBuildHookScript>
<localRepositoryPath>${basedir}/target/local-repo</localRepositoryPath>
Property changes on: trunk/src/it/ano-812/README.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/src/it/ano-812/invoker.properties
===================================================================
--- trunk/src/it/ano-812/invoker.properties 2010-11-11 21:09:37 UTC (rev 1872)
+++ trunk/src/it/ano-812/invoker.properties 2010-11-11 21:20:22 UTC (rev 1873)
@@ -1,3 +1,27 @@
+###
+# #%L
+# Maven License Plugin
+#
+# $Id$
+# $HeadURL$
+# %%
+# Copyright (C) 2008 - 2010 CodeLutin
+# %%
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Lesser Public License for more details.
+#
+# You should have received a copy of the GNU General Lesser Public
+# License along with this program. If not, see
+# <http://www.gnu.org/licenses/lgpl-3.0.html>.
+# #L%
+###
# 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
Property changes on: trunk/src/it/ano-812/invoker.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/src/it/ano-812/pom.xml
===================================================================
--- trunk/src/it/ano-812/pom.xml 2010-11-11 21:09:37 UTC (rev 1872)
+++ trunk/src/it/ano-812/pom.xml 2010-11-11 21:20:22 UTC (rev 1873)
@@ -1,4 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ #%L
+ Maven License Plugin
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2008 - 2010 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Lesser Public License for more details.
+
+ You should have received a copy of the GNU General Lesser Public
+ License along with this program. If not, see
+ <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ #L%
+ -->
+
<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">
Property changes on: trunk/src/it/ano-812/pom.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/src/it/ano-812/verify.groovy
===================================================================
--- trunk/src/it/ano-812/verify.groovy 2010-11-11 21:09:37 UTC (rev 1872)
+++ trunk/src/it/ano-812/verify.groovy 2010-11-11 21:20:22 UTC (rev 1873)
@@ -1,3 +1,27 @@
+/*
+ * #%L
+ * Maven License Plugin
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2010 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
file = new File(basedir, 'target/generated-sources/license/THIRD-PARTY.txt');
assert file.exists();
Property changes on: trunk/src/it/ano-812/verify.groovy
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/src/main/java/org/nuiton/license/plugin/ArtifactHelper.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/ArtifactHelper.java 2010-11-11 21:09:37 UTC (rev 1872)
+++ trunk/src/main/java/org/nuiton/license/plugin/ArtifactHelper.java 2010-11-11 21:20:22 UTC (rev 1873)
@@ -1,3 +1,27 @@
+/*
+ * #%L
+ * Maven License Plugin
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2008 - 2010 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
package org.nuiton.license.plugin;
import org.apache.commons.lang.StringUtils;
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/ArtifactHelper.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
1
0
r1872 - in trunk: . src/it src/it/ano-812 src/main/java/org/nuiton/license/plugin
by tchemit@users.nuiton.org 11 Nov '10
by tchemit@users.nuiton.org 11 Nov '10
11 Nov '10
Author: tchemit
Date: 2010-11-11 22:09:37 +0100 (Thu, 11 Nov 2010)
New Revision: 1872
Url: http://nuiton.org/repositories/revision/maven-license-plugin/1872
Log:
Anomalie #812: Build fail on add-third-party goal when the pom of a dependency is not found
Added:
trunk/src/it/ano-812/
trunk/src/it/ano-812/README.txt
trunk/src/it/ano-812/invoker.properties
trunk/src/it/ano-812/pom.xml
trunk/src/it/ano-812/verify.groovy
Modified:
trunk/pom.xml
trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-11-11 21:08:53 UTC (rev 1871)
+++ trunk/pom.xml 2010-11-11 21:09:37 UTC (rev 1872)
@@ -316,7 +316,8 @@
<organization>CodeLutin</organization>
<timezone>+2</timezone>
<roles>
- <role>Développeur</role>
+ <role>lead</role>
+ <role>developer</role>
</roles>
</developer>
<developer>
@@ -326,7 +327,7 @@
<organization>CodeLutin</organization>
<timezone>+2</timezone>
<roles>
- <role>Développeur</role>
+ <role>developer</role>
</roles>
</developer>
<developer>
@@ -361,10 +362,10 @@
<properties>
<!-- processor version -->
- <processorVersion>1.0.4-SNAPSHOT</processorVersion>
+ <processorVersion>1.0.4</processorVersion>
<!-- helper version -->
- <helperPluginVersion>1.3-SNAPSHOT</helperPluginVersion>
+ <helperPluginVersion>1.2.9</helperPluginVersion>
<!-- license project descriptor model version -->
<mdoVersion>1.0.0</mdoVersion>
@@ -375,6 +376,8 @@
<!-- documentation is in english then french -->
<locales>en,fr</locales>
+ <mavenVersion>2.2.1</mavenVersion>
+
</properties>
<build>
@@ -480,21 +483,22 @@
<artifactId>maven-invoker-plugin</artifactId>
<configuration>
<pomIncludes>
- <pomInclude>ano-816/pom.xml</pomInclude>
- <pomInclude>ano-947/pom.xml</pomInclude>
- <pomInclude>evol-952/pom.xml</pomInclude>
- <pomInclude>evol-818/excluded-included/pom.xml</pomInclude>
- <pomInclude>evol-818/multimodule-filters/pom.xml</pomInclude>
- <pomInclude>evol-884/update-project-license/pom.xml</pomInclude>
- <pomInclude>evol-884/update-file-header/pom.xml</pomInclude>
- <pomInclude>evol-884/update-file-header-specific/pom.xml</pomInclude>
- <pomInclude>add-third-party/no-encoding/pom.xml</pomInclude>
- <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>
- <pomInclude>update-project-license/pom.xml</pomInclude>
+ <pomInclude>ano-812/pom.xml</pomInclude>
+ <!--<pomInclude>ano-816/pom.xml</pomInclude>-->
+ <!--<pomInclude>ano-947/pom.xml</pomInclude>-->
+ <!--<pomInclude>evol-952/pom.xml</pomInclude>-->
+ <!--<pomInclude>evol-818/excluded-included/pom.xml</pomInclude>-->
+ <!--<pomInclude>evol-818/multimodule-filters/pom.xml</pomInclude>-->
+ <!--<pomInclude>evol-884/update-project-license/pom.xml</pomInclude>-->
+ <!--<pomInclude>evol-884/update-file-header/pom.xml</pomInclude>-->
+ <!--<pomInclude>evol-884/update-file-header-specific/pom.xml</pomInclude>-->
+ <!--<pomInclude>add-third-party/no-encoding/pom.xml</pomInclude>-->
+ <!--<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>-->
+ <!--<pomInclude>update-project-license/pom.xml</pomInclude>-->
</pomIncludes>
<postBuildHookScript>verify</postBuildHookScript>
<localRepositoryPath>${basedir}/target/local-repo</localRepositoryPath>
Added: trunk/src/it/ano-812/README.txt
===================================================================
--- trunk/src/it/ano-812/README.txt (rev 0)
+++ trunk/src/it/ano-812/README.txt 2010-11-11 21:09:37 UTC (rev 1872)
@@ -0,0 +1,7 @@
+To test when a dependency has no pom file in repository. In that case, we must
+act this dependency as a unknown license.
+
+We are using a known dependency in central to be without pom, says
+woodstox:wstx-asl:3.2.7
+
+See http://nuiton.org/issues/show/812
\ No newline at end of file
Added: trunk/src/it/ano-812/invoker.properties
===================================================================
--- trunk/src/it/ano-812/invoker.properties (rev 0)
+++ trunk/src/it/ano-812/invoker.properties 2010-11-11 21:09:37 UTC (rev 1872)
@@ -0,0 +1,22 @@
+
+# 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-fast
+
+# 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
Added: trunk/src/it/ano-812/pom.xml
===================================================================
--- trunk/src/it/ano-812/pom.xml (rev 0)
+++ trunk/src/it/ano-812/pom.xml 2010-11-11 21:09:37 UTC (rev 1872)
@@ -0,0 +1,48 @@
+<?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-ano-812</artifactId>
+ <version>@pom.version@</version>
+
+ <name>License Test :: ano-812</name>
+
+ <inceptionYear>2012</inceptionYear>
+
+ <dependencies>
+ <dependency>
+ <groupId>woodstox</groupId>
+ <artifactId>wstx-asl</artifactId>
+ <version>3.2.7</version>
+ </dependency>
+ </dependencies>
+
+ <organization>
+ <name>License Test</name>
+ </organization>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <license.verbose>true</license.verbose>
+ <license.licenseName>lgpl_v3</license.licenseName>
+ </properties>
+ <build>
+
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-license-plugin</artifactId>
+ <version>@pom.version@</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+</project>
+
+
Added: trunk/src/it/ano-812/verify.groovy
===================================================================
--- trunk/src/it/ano-812/verify.groovy (rev 0)
+++ trunk/src/it/ano-812/verify.groovy 2010-11-11 21:09:37 UTC (rev 1872)
@@ -0,0 +1,8 @@
+
+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( '(Unknown license) wstx-asl (woodstox:wstx-asl:3.2.7 - no url defined)' );
+
+return true;
Modified: trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java 2010-11-11 21:08:53 UTC (rev 1871)
+++ trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyMojo.java 2010-11-11 21:09:37 UTC (rev 1872)
@@ -264,7 +264,7 @@
artifact,
remoteRepositories,
localRepository,
- false
+ true
);
if (isVerbose()) {
log.info("add dependency [" + id + "]");
1
0