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
January 2010
- 1 participants
- 31 discussions
21 Jan '10
Author: tchemit
Date: 2010-01-21 13:48:31 +0100 (Thu, 21 Jan 2010)
New Revision: 1678
Modified:
trunk/pom.xml
trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFileMojo.java
trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFileMojo.java
Log:
- Anomalie #250: Change mojo properties expression from helper.XXX to license.XXX
- fix documentation if mojo
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-01-21 12:38:11 UTC (rev 1677)
+++ trunk/pom.xml 2010-01-21 12:48:31 UTC (rev 1678)
@@ -289,7 +289,7 @@
<processor.version>1.0.2</processor.version>
- <!-- documention is in english -->
+ <!-- documentation is in english -->
<maven.site.locales>en</maven.site.locales>
</properties>
Modified: trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFileMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFileMojo.java 2010-01-21 12:38:11 UTC (rev 1677)
+++ trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFileMojo.java 2010-01-21 12:48:31 UTC (rev 1678)
@@ -52,7 +52,7 @@
/**
* Fichier de la licence du module.
*
- * @parameter expression="${helper.licenceFile}" default-value="${basedir}/LICENSE.txt"
+ * @parameter expression="${license.licenceFile}" default-value="${basedir}/LICENSE.txt"
* @required
* @since 1.0.0
*/
@@ -73,7 +73,7 @@
/**
* Repertoire de sortie des sources.
*
- * @parameter expression="${helper.outputDirectory}" default-value="target/generated-sources/license"
+ * @parameter expression="${license.outputDirectory}" default-value="target/generated-sources/license"
* @required
* @since 1.0.0
*/
@@ -81,7 +81,7 @@
/**
* Repertoire de sortie des classes (classpath).
*
- * @parameter expression="${helper.licenceFilename}" default-value=""
+ * @parameter expression="${license.licenceFilename}" default-value=""
* @since 1.0.0
*/
protected String licenseFilename;
@@ -96,21 +96,21 @@
/**
* Un flag pour conserver un backup des fichiers modifies.
*
- * @parameter expression="${helper.keepBackup}" default-value="false"
+ * @parameter expression="${license.keepBackup}" default-value="false"
* @since 1.0.0
*/
protected boolean keepBackup;
/**
* Un flag pour forcer la generation.
*
- * @parameter expression="${helper.force}" default-value="false"
+ * @parameter expression="${license.force}" default-value="false"
* @since 1.0.0
*/
protected boolean force;
/**
* Un flag pour activer le mode verbeux.
*
- * @parameter expression="${helper.verbose}" default-value="${maven.verbose}"
+ * @parameter expression="${license.verbose}" default-value="${maven.verbose}"
* @since 1.0.0
*/
protected boolean verbose;
@@ -119,36 +119,27 @@
* <p/>
* Cette option n'est utilisable que sur des modules avec un class-path (pas pour un pom)
*
- * @parameter expression="${helper.copyToMETA_INF}" default-value="false"
+ * @parameter expression="${license.copyToMETA_INF}" default-value="false"
* @since 1.0.0
*/
protected boolean copyToMETA_INF;
/**
* La baseURL d'un resolver de license supplementaire
*
- * @parameter expression="${helper.extraResolver}"
+ * @parameter expression="${license.extraResolver}"
* @since 1.0.0
*/
protected String[] extraResolver;
protected License license;
-// public AddLicenseFileMojo() {
-// super("all files are up-to-date.");
-// }
-
protected boolean hasClassPath() {
return rejectPackaging(Packaging.pom);
}
-// @Override
-// protected boolean ensurePackaging() {
- // return false;
-//// return project != null && ("pom".equals(project.getPackaging()) || "site".equals(project.getPackaging()));
-// }
+
boolean doGenerate;
@Override
protected void init() throws Exception {
-// protected boolean init() throws Exception {
// must generate if file does not exist
doGenerate = true;
@@ -167,8 +158,6 @@
if (licenseFilename == null || licenseFilename.isEmpty()) {
licenseFilename = licenseName;
}
- // always execute the mojo ?
-// return true;
}
@Override
@@ -186,8 +175,6 @@
}
// copy it to backup file
backupFile(licenseFile);
-// File backup = new File(licenseFile.getAbsolutePath() + "~");
-// licenseFile.renameTo(backup);
}
}
@@ -208,7 +195,6 @@
copyFile(licenseFile, destFile);
}
addResourceDir(outputDirectory, "**/*.txt");
-// addResourceDir(outputDirectory.getAbsolutePath());
}
}
Modified: trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFileMojo.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFileMojo.java 2010-01-21 12:38:11 UTC (rev 1677)
+++ trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFileMojo.java 2010-01-21 12:48:31 UTC (rev 1678)
@@ -67,7 +67,7 @@
/**
* Fichier ou ecrire les licences des dependances.
*
- * @parameter expression="${helper.thirdPartyFilename}" default-value="THIRD-PARTY.txt"
+ * @parameter expression="${license.thirdPartyFilename}" default-value="THIRD-PARTY.txt"
* @required
* @since 1.0.0
*/
@@ -75,7 +75,7 @@
/**
* Repertoire de sortie des classes (classpath).
*
- * @parameter expression="${helper.outputDirectory}" default-value="target/generated-sources/license"
+ * @parameter expression="${license.outputDirectory}" default-value="target/generated-sources/license"
* @required
* @since 1.0.0
*/
@@ -83,7 +83,7 @@
/**
* Encoding a utiliser pour lire et ecrire les fichiers.
*
- * @parameter expression="${helper.encoding}" default-value="${project.build.sourceEncoding}"
+ * @parameter expression="${license.encoding}" default-value="${project.build.sourceEncoding}"
* @required
* @since 1.0.0
*/
@@ -91,28 +91,28 @@
/**
* Un flag pour forcer la generation.
*
- * @parameter expression="${helper.force}" default-value="false"
+ * @parameter expression="${license.force}" default-value="false"
* @since 1.0.0
*/
protected boolean force;
/**
* Un flag pour conserver un backup des fichiers modifies.
*
- * @parameter expression="${helper.keepBackup}" default-value="false"
+ * @parameter expression="${license.keepBackup}" default-value="false"
* @since 1.0.0
*/
protected boolean keepBackup;
/**
* Un flag pour faire une copie nommé dans META-INF (prefixe avec le nom de l'artifact).
*
- * @parameter expression="${helper.copyToMETA_INF}" default-value="false"
+ * @parameter expression="${license.copyToMETA_INF}" default-value="false"
* @since 1.0.0
*/
protected boolean copyToMETA_INF;
/**
* Un flag pour activer le mode verbeux.
*
- * @parameter expression="${helper.verbose}" default-value="${maven.verbose}"
+ * @parameter expression="${license.verbose}" default-value="${maven.verbose}"
* @since 1.0.0
*/
protected boolean verbose;
1
0
Author: tchemit
Date: 2010-01-21 13:38:11 +0100 (Thu, 21 Jan 2010)
New Revision: 1677
Removed:
trunk/src/main/resources/META-INF/services/
Log:
Evolution #249: Remove ServiceLoader mecanism
1
0
r1676 - in trunk/src: main/java/org/nuiton/license/plugin main/java/org/nuiton/license/plugin/header/generator main/resources/META-INF/services test/java/org/nuiton/license/plugin test/resources/org/nuiton/license/plugin
by tchemit@users.nuiton.org 21 Jan '10
by tchemit@users.nuiton.org 21 Jan '10
21 Jan '10
Author: tchemit
Date: 2010-01-21 13:35:36 +0100 (Thu, 21 Jan 2010)
New Revision: 1676
Added:
trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFileMojo.java
trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFileMojo.java
trunk/src/main/java/org/nuiton/license/plugin/GeneratorListMojo.java
trunk/src/main/java/org/nuiton/license/plugin/LicenseListMojo.java
trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderMojo.java
trunk/src/test/java/org/nuiton/license/plugin/AddLicenseFileMojoTest.java
trunk/src/test/java/org/nuiton/license/plugin/UpdateHeaderMojoTest.java
trunk/src/test/resources/org/nuiton/license/plugin/addLicenseFileMojoTest/
trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderMojoTest/
Removed:
trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFilePlugin.java
trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFilePlugin.java
trunk/src/main/java/org/nuiton/license/plugin/GeneratorListPlugin.java
trunk/src/main/java/org/nuiton/license/plugin/LicenseListPlugin.java
trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderPlugin.java
trunk/src/main/resources/META-INF/services/org.nuiton.license.header.generator.HeaderGenerator
trunk/src/test/java/org/nuiton/license/plugin/AddLicenseFilePluginTest.java
trunk/src/test/java/org/nuiton/license/plugin/UpdateHeaderPluginTest.java
trunk/src/test/resources/org/nuiton/license/plugin/addLicenseFilePluginTest/
trunk/src/test/resources/org/nuiton/license/plugin/updateHeaderPluginTest/
Modified:
trunk/src/main/java/org/nuiton/license/plugin/header/generator/XmlLicenseHeaderGeneratorImpl.java
Log:
- Evolution #248: Rename Mojo classes from Plugin suffix to Mojo suffix
- Evolution #249: Remove ServiceLoader mecanism
Copied: trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFileMojo.java (from rev 1674, trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFilePlugin.java)
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFileMojo.java (rev 0)
+++ trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFileMojo.java 2010-01-21 12:35:36 UTC (rev 1676)
@@ -0,0 +1,298 @@
+/*
+ * *##%
+ * Maven helper plugin
+ * Copyright (C) 2009 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>.
+ * ##%*
+ */
+package org.nuiton.license.plugin;
+
+
+import org.apache.maven.project.MavenProject;
+import org.nuiton.license.plugin.repository.License;
+import org.nuiton.license.plugin.repository.LicenseRepository;
+import org.nuiton.license.plugin.repository.LicenseRepositoryFactory;
+import org.nuiton.plugin.AbstractPlugin;
+import org.nuiton.plugin.PluginHelper;
+
+import java.io.File;
+
+/**
+ * Le goal pour ajouter le fichier LICENSE.txt dans le classpath (et le generer s'il n'existe pas).
+ *
+ * @author chemit
+ * @goal add-license
+ * @phase generate-resources
+ * @requiresProject true
+ * @requiresDependencyResolution compile
+ */
+public class AddLicenseFileMojo extends AbstractPlugin {
+
+ /**
+ * Dependance du projet.
+ *
+ * @parameter default-value="${project}"
+ * @required
+ * @since 1.0.0
+ */
+ protected MavenProject project;
+ /**
+ * Fichier de la licence du module.
+ *
+ * @parameter expression="${helper.licenceFile}" default-value="${basedir}/LICENSE.txt"
+ * @required
+ * @since 1.0.0
+ */
+ protected File licenseFile;
+ /**
+ * Le type de license a appliquer.
+ * <p/>
+ * Pour obtenir la liste des licenses disponibles, utilisez le goal <b>available-licenses</b>
+ * <pre>
+ * mvn helper:available-licenses -Ddetail
+ * </pre>
+ *
+ * @parameter expression="${license.licenseName}"
+ * @required
+ * @since 1.0.0
+ */
+ protected String licenseName;
+ /**
+ * Repertoire de sortie des sources.
+ *
+ * @parameter expression="${helper.outputDirectory}" default-value="target/generated-sources/license"
+ * @required
+ * @since 1.0.0
+ */
+ protected File outputDirectory;
+ /**
+ * Repertoire de sortie des classes (classpath).
+ *
+ * @parameter expression="${helper.licenceFilename}" default-value=""
+ * @since 1.0.0
+ */
+ protected String licenseFilename;
+ /**
+ * Encoding a utiliser pour lire et ecrire les fichiers.
+ *
+ * @parameter expression="${helper.encoding}" default-value="${project.build.sourceEncoding}"
+ * @required
+ * @since 1.0.0
+ */
+ protected String encoding;
+ /**
+ * Un flag pour conserver un backup des fichiers modifies.
+ *
+ * @parameter expression="${helper.keepBackup}" default-value="false"
+ * @since 1.0.0
+ */
+ protected boolean keepBackup;
+ /**
+ * Un flag pour forcer la generation.
+ *
+ * @parameter expression="${helper.force}" default-value="false"
+ * @since 1.0.0
+ */
+ protected boolean force;
+ /**
+ * Un flag pour activer le mode verbeux.
+ *
+ * @parameter expression="${helper.verbose}" default-value="${maven.verbose}"
+ * @since 1.0.0
+ */
+ protected boolean verbose;
+ /**
+ * Un flag pour faire une copie nommée dans META-INF (prefixe avec le nom de l'artifact).
+ * <p/>
+ * Cette option n'est utilisable que sur des modules avec un class-path (pas pour un pom)
+ *
+ * @parameter expression="${helper.copyToMETA_INF}" default-value="false"
+ * @since 1.0.0
+ */
+ protected boolean copyToMETA_INF;
+ /**
+ * La baseURL d'un resolver de license supplementaire
+ *
+ * @parameter expression="${helper.extraResolver}"
+ * @since 1.0.0
+ */
+ protected String[] extraResolver;
+ protected License license;
+
+// public AddLicenseFileMojo() {
+// super("all files are up-to-date.");
+// }
+
+ protected boolean hasClassPath() {
+ return rejectPackaging(Packaging.pom);
+ }
+// @Override
+// protected boolean ensurePackaging() {
+ // return false;
+//// return project != null && ("pom".equals(project.getPackaging()) || "site".equals(project.getPackaging()));
+// }
+ boolean doGenerate;
+
+ @Override
+ protected void init() throws Exception {
+// protected boolean init() throws Exception {
+
+ // must generate if file does not exist
+ doGenerate = true;
+
+ if (!force) {
+ // regenerate only if file exists and is newer than pom file
+ doGenerate = !isFileNewerThanPomFile(licenseFile);
+ }
+
+ // acquire license
+
+ LicenseRepository factory = LicenseRepositoryFactory.newLicenseRepository(true, true, extraResolver);
+
+ license = factory.getLicense(licenseName);
+
+ if (licenseFilename == null || licenseFilename.isEmpty()) {
+ licenseFilename = licenseName;
+ }
+ // always execute the mojo ?
+// return true;
+ }
+
+ @Override
+ protected void doAction() throws Exception {
+ getLog().info("using licence [" + licenseName + "]");
+
+ if (doGenerate) {
+ if (verbose) {
+ getLog().info("detail : " + license);
+ }
+
+ if (licenseFile.exists() && keepBackup) {
+ if (verbose) {
+ getLog().info("backup " + licenseFile);
+ }
+ // copy it to backup file
+ backupFile(licenseFile);
+// File backup = new File(licenseFile.getAbsolutePath() + "~");
+// licenseFile.renameTo(backup);
+ }
+ }
+
+ String licenseContent = license.getLicenseContent(encoding);
+
+ if (doGenerate) {
+ writeFile(licenseFile, licenseContent, encoding);
+ }
+
+ if (hasClassPath()) {
+ // copy LICENSE.txt to classpath
+ File target = new File(outputDirectory, licenseFile.getName());
+
+ copyFile(licenseFile, target);
+
+ if (copyToMETA_INF) {
+ File destFile = PluginHelper.getFile(outputDirectory, "META-INF", project.getArtifactId() + "-" + licenseFile.getName());
+ copyFile(licenseFile, destFile);
+ }
+ addResourceDir(outputDirectory, "**/*.txt");
+// addResourceDir(outputDirectory.getAbsolutePath());
+ }
+ }
+
+ public File getLicenseFile() {
+ return licenseFile;
+ }
+
+ public String getLicenseName() {
+ return licenseName;
+ }
+
+ public org.nuiton.license.plugin.repository.License getLicense() {
+ return license;
+ }
+
+ public String[] getExtraResolver() {
+ return extraResolver;
+ }
+
+ public String getEncoding() {
+ return encoding;
+ }
+
+ public boolean isKeepBackup() {
+ return keepBackup;
+ }
+
+ public boolean isForce() {
+ return force;
+ }
+
+ public File getOutputDirectory() {
+ return outputDirectory;
+ }
+
+ public void setLicenseFile(File licenseFile) {
+ this.licenseFile = licenseFile;
+ }
+
+ public void setLicenseName(String licenseName) {
+ this.licenseName = licenseName;
+ }
+
+ public void setExtraResolver(String[] extraResolver) {
+ this.extraResolver = extraResolver;
+ }
+
+ public void setLicense(org.nuiton.license.plugin.repository.License license) {
+ this.license = license;
+ }
+
+ public void setEncoding(String encoding) {
+ this.encoding = encoding;
+ }
+
+ public void setKeepBackup(boolean keepBackup) {
+ this.keepBackup = keepBackup;
+ }
+
+ public void setOutputDirectory(File outputDirectory) {
+ this.outputDirectory = outputDirectory;
+ }
+
+ public void setForce(boolean force) {
+ this.force = force;
+ }
+
+ @Override
+ public boolean isVerbose() {
+ return verbose;
+ }
+
+ @Override
+ public void setVerbose(boolean verbose) {
+ this.verbose = verbose;
+ }
+
+ @Override
+ public MavenProject getProject() {
+ return project;
+ }
+
+ @Override
+ public void setProject(MavenProject project) {
+ this.project = project;
+ }
+}
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFileMojo.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Deleted: trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFilePlugin.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFilePlugin.java 2010-01-21 12:14:14 UTC (rev 1675)
+++ trunk/src/main/java/org/nuiton/license/plugin/AddLicenseFilePlugin.java 2010-01-21 12:35:36 UTC (rev 1676)
@@ -1,298 +0,0 @@
-/*
- * *##%
- * Maven helper plugin
- * Copyright (C) 2009 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>.
- * ##%*
- */
-package org.nuiton.license.plugin;
-
-
-import org.apache.maven.project.MavenProject;
-import org.nuiton.license.plugin.repository.License;
-import org.nuiton.license.plugin.repository.LicenseRepository;
-import org.nuiton.license.plugin.repository.LicenseRepositoryFactory;
-import org.nuiton.plugin.AbstractPlugin;
-import org.nuiton.plugin.PluginHelper;
-
-import java.io.File;
-
-/**
- * Le goal pour ajouter le fichier LICENSE.txt dans le classpath (et le generer s'il n'existe pas).
- *
- * @author chemit
- * @goal add-license
- * @phase generate-resources
- * @requiresProject true
- * @requiresDependencyResolution compile
- */
-public class AddLicenseFilePlugin extends AbstractPlugin {
-
- /**
- * Dependance du projet.
- *
- * @parameter default-value="${project}"
- * @required
- * @since 1.0.0
- */
- protected MavenProject project;
- /**
- * Fichier de la licence du module.
- *
- * @parameter expression="${helper.licenceFile}" default-value="${basedir}/LICENSE.txt"
- * @required
- * @since 1.0.0
- */
- protected File licenseFile;
- /**
- * Le type de license a appliquer.
- * <p/>
- * Pour obtenir la liste des licenses disponibles, utilisez le goal <b>available-licenses</b>
- * <pre>
- * mvn helper:available-licenses -Ddetail
- * </pre>
- *
- * @parameter expression="${license.licenseName}"
- * @required
- * @since 1.0.0
- */
- protected String licenseName;
- /**
- * Repertoire de sortie des sources.
- *
- * @parameter expression="${helper.outputDirectory}" default-value="target/generated-sources/license"
- * @required
- * @since 1.0.0
- */
- protected File outputDirectory;
- /**
- * Repertoire de sortie des classes (classpath).
- *
- * @parameter expression="${helper.licenceFilename}" default-value=""
- * @since 1.0.0
- */
- protected String licenseFilename;
- /**
- * Encoding a utiliser pour lire et ecrire les fichiers.
- *
- * @parameter expression="${helper.encoding}" default-value="${project.build.sourceEncoding}"
- * @required
- * @since 1.0.0
- */
- protected String encoding;
- /**
- * Un flag pour conserver un backup des fichiers modifies.
- *
- * @parameter expression="${helper.keepBackup}" default-value="false"
- * @since 1.0.0
- */
- protected boolean keepBackup;
- /**
- * Un flag pour forcer la generation.
- *
- * @parameter expression="${helper.force}" default-value="false"
- * @since 1.0.0
- */
- protected boolean force;
- /**
- * Un flag pour activer le mode verbeux.
- *
- * @parameter expression="${helper.verbose}" default-value="${maven.verbose}"
- * @since 1.0.0
- */
- protected boolean verbose;
- /**
- * Un flag pour faire une copie nommée dans META-INF (prefixe avec le nom de l'artifact).
- * <p/>
- * Cette option n'est utilisable que sur des modules avec un class-path (pas pour un pom)
- *
- * @parameter expression="${helper.copyToMETA_INF}" default-value="false"
- * @since 1.0.0
- */
- protected boolean copyToMETA_INF;
- /**
- * La baseURL d'un resolver de license supplementaire
- *
- * @parameter expression="${helper.extraResolver}"
- * @since 1.0.0
- */
- protected String[] extraResolver;
- protected License license;
-
-// public AddLicenseFilePlugin() {
-// super("all files are up-to-date.");
-// }
-
- protected boolean hasClassPath() {
- return rejectPackaging(Packaging.pom);
- }
-// @Override
-// protected boolean ensurePackaging() {
- // return false;
-//// return project != null && ("pom".equals(project.getPackaging()) || "site".equals(project.getPackaging()));
-// }
- boolean doGenerate;
-
- @Override
- protected void init() throws Exception {
-// protected boolean init() throws Exception {
-
- // must generate if file does not exist
- doGenerate = true;
-
- if (!force) {
- // regenerate only if file exists and is newer than pom file
- doGenerate = !isFileNewerThanPomFile(licenseFile);
- }
-
- // acquire license
-
- LicenseRepository factory = LicenseRepositoryFactory.newLicenseRepository(true, true, extraResolver);
-
- license = factory.getLicense(licenseName);
-
- if (licenseFilename == null || licenseFilename.isEmpty()) {
- licenseFilename = licenseName;
- }
- // always execute the mojo ?
-// return true;
- }
-
- @Override
- protected void doAction() throws Exception {
- getLog().info("using licence [" + licenseName + "]");
-
- if (doGenerate) {
- if (verbose) {
- getLog().info("detail : " + license);
- }
-
- if (licenseFile.exists() && keepBackup) {
- if (verbose) {
- getLog().info("backup " + licenseFile);
- }
- // copy it to backup file
- backupFile(licenseFile);
-// File backup = new File(licenseFile.getAbsolutePath() + "~");
-// licenseFile.renameTo(backup);
- }
- }
-
- String licenseContent = license.getLicenseContent(encoding);
-
- if (doGenerate) {
- writeFile(licenseFile, licenseContent, encoding);
- }
-
- if (hasClassPath()) {
- // copy LICENSE.txt to classpath
- File target = new File(outputDirectory, licenseFile.getName());
-
- copyFile(licenseFile, target);
-
- if (copyToMETA_INF) {
- File destFile = PluginHelper.getFile(outputDirectory, "META-INF", project.getArtifactId() + "-" + licenseFile.getName());
- copyFile(licenseFile, destFile);
- }
- addResourceDir(outputDirectory, "**/*.txt");
-// addResourceDir(outputDirectory.getAbsolutePath());
- }
- }
-
- public File getLicenseFile() {
- return licenseFile;
- }
-
- public String getLicenseName() {
- return licenseName;
- }
-
- public org.nuiton.license.plugin.repository.License getLicense() {
- return license;
- }
-
- public String[] getExtraResolver() {
- return extraResolver;
- }
-
- public String getEncoding() {
- return encoding;
- }
-
- public boolean isKeepBackup() {
- return keepBackup;
- }
-
- public boolean isForce() {
- return force;
- }
-
- public File getOutputDirectory() {
- return outputDirectory;
- }
-
- public void setLicenseFile(File licenseFile) {
- this.licenseFile = licenseFile;
- }
-
- public void setLicenseName(String licenseName) {
- this.licenseName = licenseName;
- }
-
- public void setExtraResolver(String[] extraResolver) {
- this.extraResolver = extraResolver;
- }
-
- public void setLicense(org.nuiton.license.plugin.repository.License license) {
- this.license = license;
- }
-
- public void setEncoding(String encoding) {
- this.encoding = encoding;
- }
-
- public void setKeepBackup(boolean keepBackup) {
- this.keepBackup = keepBackup;
- }
-
- public void setOutputDirectory(File outputDirectory) {
- this.outputDirectory = outputDirectory;
- }
-
- public void setForce(boolean force) {
- this.force = force;
- }
-
- @Override
- public boolean isVerbose() {
- return verbose;
- }
-
- @Override
- public void setVerbose(boolean verbose) {
- this.verbose = verbose;
- }
-
- @Override
- public MavenProject getProject() {
- return project;
- }
-
- @Override
- public void setProject(MavenProject project) {
- this.project = project;
- }
-}
Copied: trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFileMojo.java (from rev 1675, trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFilePlugin.java)
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFileMojo.java (rev 0)
+++ trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFileMojo.java 2010-01-21 12:35:36 UTC (rev 1676)
@@ -0,0 +1,394 @@
+/*
+ * *##%
+ * Maven helper plugin
+ * Copyright (C) 2009 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>.
+ * ##%*
+ */
+package org.nuiton.license.plugin;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.factory.ArtifactFactory;
+import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.resolver.ArtifactCollector;
+import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
+import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
+import org.apache.maven.model.License;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.project.MavenProjectBuilder;
+import org.apache.maven.project.ProjectBuildingException;
+import org.apache.maven.shared.dependency.tree.DependencyNode;
+import org.apache.maven.shared.dependency.tree.DependencyTreeBuilder;
+import org.apache.maven.shared.dependency.tree.DependencyTreeBuilderException;
+
+import java.io.File;
+import java.util.List;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import org.nuiton.plugin.AbstractPlugin;
+import org.nuiton.plugin.PluginHelper;
+
+/**
+ * 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).
+ *
+ * @author chemit
+ * @goal add-third-party
+ * @phase generate-resources
+ * @requiresDependencyResolution test
+ * @requiresProject true
+ */
+public class AddThirdPartyFileMojo extends AbstractPlugin {
+
+ private static final String unknownLicenseMessage = "Unknown license";
+ /**
+ * Dependance du projet.
+ *
+ * @parameter default-value="${project}"
+ * @required
+ * @readonly
+ * @since 1.0.0
+ */
+ protected MavenProject project;
+ /**
+ * Fichier ou ecrire les licences des dependances.
+ *
+ * @parameter expression="${helper.thirdPartyFilename}" default-value="THIRD-PARTY.txt"
+ * @required
+ * @since 1.0.0
+ */
+ protected String thirdPartyFilename;
+ /**
+ * Repertoire de sortie des classes (classpath).
+ *
+ * @parameter expression="${helper.outputDirectory}" default-value="target/generated-sources/license"
+ * @required
+ * @since 1.0.0
+ */
+ protected File outputDirectory;
+ /**
+ * Encoding a utiliser pour lire et ecrire les fichiers.
+ *
+ * @parameter expression="${helper.encoding}" default-value="${project.build.sourceEncoding}"
+ * @required
+ * @since 1.0.0
+ */
+ protected String encoding;
+ /**
+ * Un flag pour forcer la generation.
+ *
+ * @parameter expression="${helper.force}" default-value="false"
+ * @since 1.0.0
+ */
+ protected boolean force;
+ /**
+ * Un flag pour conserver un backup des fichiers modifies.
+ *
+ * @parameter expression="${helper.keepBackup}" default-value="false"
+ * @since 1.0.0
+ */
+ protected boolean keepBackup;
+ /**
+ * Un flag pour faire une copie nommé dans META-INF (prefixe avec le nom de l'artifact).
+ *
+ * @parameter expression="${helper.copyToMETA_INF}" default-value="false"
+ * @since 1.0.0
+ */
+ protected boolean copyToMETA_INF;
+ /**
+ * Un flag pour activer le mode verbeux.
+ *
+ * @parameter expression="${helper.verbose}" default-value="${maven.verbose}"
+ * @since 1.0.0
+ */
+ protected boolean verbose;
+ /**
+ * Local Repository.
+ *
+ * @parameter expression="${localRepository}"
+ * @required
+ * @readonly
+ * @since 1.0.0
+ */
+ protected ArtifactRepository localRepository;
+ /**
+ * Remote repositories used for the project.
+ *
+ * @parameter expression="${project.remoteArtifactRepositories}"
+ * @required
+ * @readonly
+ * @since 1.0.0
+ */
+ protected List<?> remoteRepositories;
+ /**
+ * Dependency tree builder component.
+ *
+ * @component
+ */
+ protected DependencyTreeBuilder dependencyTreeBuilder;
+ /**
+ * Artifact Factory component.
+ *
+ * @component
+ */
+ protected ArtifactFactory factory;
+ /**
+ * Artifact metadata source component.
+ *
+ * @component
+ */
+ protected ArtifactMetadataSource artifactMetadataSource;
+ /**
+ * Artifact collector component.
+ *
+ * @component
+ */
+ protected ArtifactCollector collector;
+ /**
+ * Maven Project Builder component.
+ *
+ * @component
+ */
+ protected MavenProjectBuilder mavenProjectBuilder;
+ /**
+ * content of third party file (only computed if {@link #force} is active or the
+ * {@link #thirdPartyFile} does not exist, or is not up-to-date.
+ */
+ protected String thirdPartyFileContent;
+ protected File thirdPartyFile;
+
+ @Override
+ protected boolean checkPackaging() {
+ return rejectPackaging(Packaging.pom);
+ }
+ boolean doGenerate;
+
+ @Override
+ protected void init() throws Exception {
+
+ doGenerate = true;
+ thirdPartyFile = new File(outputDirectory, thirdPartyFilename);
+
+ if (!force) {
+ // regenerate only if file exists and is newer than pom file
+ doGenerate = !isFileNewerThanPomFile(thirdPartyFile);
+ }
+
+ if (doGenerate) {
+
+ // prepare thirdPartyFileContent
+
+ DependencyNode dependencyTreeNode = resolveProject();
+
+ LicenseMap licenseMap = new LicenseMap();
+
+ for (Object o : dependencyTreeNode.getChildren()) {
+
+ buildLicenseMap((DependencyNode) o, licenseMap);
+ }
+
+ thirdPartyFileContent = buildGroupedLicenses(licenseMap);
+
+ // log dependencies with no license
+ SortedSet<String> dependenciesWithNoLicense = licenseMap.get(unknownLicenseMessage);
+ if (dependenciesWithNoLicense != null) {
+ for (String dep : dependenciesWithNoLicense) {
+ // no license found for the dependency
+ getLog().warn("no license found for dependency " + dep);
+ }
+ }
+ } else {
+ thirdPartyFileContent = PluginHelper.readAsString(thirdPartyFile, encoding);
+ }
+ }
+
+ @Override
+ protected void doAction() throws Exception {
+ if (doGenerate) {
+ if (verbose) {
+ getLog().info("writing third-party file : " + thirdPartyFile);
+ }
+ if (keepBackup && thirdPartyFile.exists()) {
+ if (verbose) {
+ getLog().info("backup " + thirdPartyFile);
+ }
+ backupFile(thirdPartyFile);
+ }
+ writeFile(thirdPartyFile, thirdPartyFileContent, encoding);
+ }
+ if (copyToMETA_INF) {
+ copyFile(thirdPartyFile, new File(outputDirectory, "META-INF" + File.separator + project.getArtifactId() + "-" + thirdPartyFile.getName()));
+ }
+ addResourceDir(outputDirectory,"**/*.txt");
+ }
+
+ /** @return resolve the dependency tree */
+ protected DependencyNode resolveProject() {
+ try {
+ ArtifactFilter artifactFilter = new ScopeArtifactFilter(Artifact.SCOPE_TEST);
+ return dependencyTreeBuilder.buildDependencyTree(project, localRepository, factory,
+ artifactMetadataSource, artifactFilter, collector);
+ } catch (DependencyTreeBuilderException e) {
+ getLog().error("Unable to build dependency tree.", e);
+ return null;
+ }
+ }
+
+ protected void buildLicenseMap(DependencyNode node, LicenseMap licenseMap) {
+ if (node.getState() != DependencyNode.INCLUDED) {
+ // this dependency is not included, so do not treate it
+ if (verbose) {
+ getLog().info("do not include this dependency " + node.toNodeString());
+ }
+ return;
+ }
+ Artifact artifact = node.getArtifact();
+
+ if (verbose && getLog().isDebugEnabled()) {
+ getLog().debug("treate node " + node.toNodeString());
+ }
+
+ if (!Artifact.SCOPE_SYSTEM.equals(artifact.getScope())) {
+ try {
+ MavenProject artifactProject = getMavenProjectFromRepository(artifact);
+ String artifactName = getArtifactName(artifactProject);
+
+ List<?> licenses = artifactProject.getLicenses();
+
+ if (licenses.isEmpty()) {
+ // no license found for the dependency
+ licenseMap.put(unknownLicenseMessage, artifactName);
+
+ } else {
+ for (Object o : licenses) {
+ if (o == null) {
+ getLog().warn("could not acquire the license for " + artifactName);
+ continue;
+ }
+ License license = (License) o;
+ String licenseKey = license.getName();
+ if (license.getName() == null) {
+ licenseKey = license.getUrl();
+ }
+ licenseMap.put(licenseKey, artifactName);
+ }
+ }
+ } catch (ProjectBuildingException e) {
+ getLog().error("ProjectBuildingException error : ", e);
+ }
+ }
+ if (!node.getChildren().isEmpty()) {
+ for (Object o : node.getChildren()) {
+ buildLicenseMap((DependencyNode) o, licenseMap);
+ }
+ }
+ }
+
+ protected String buildGroupedLicenses(LicenseMap licenseMap) {
+ StringBuilder sb = new StringBuilder();
+ sb.append("List of third-party dependencies grouped by their license type.");
+ for (String licenseName : licenseMap.keySet()) {
+ sb.append("\n\n").append(licenseName).append(" : ");
+
+ SortedSet<String> projects = licenseMap.get(licenseName);
+
+ for (String projectName : projects) {
+ sb.append("\n * ").append(projectName);
+ }
+ }
+ return sb.toString();
+ }
+
+ protected String getArtifactName(MavenProject artifactProject) {
+ StringBuilder sb = new StringBuilder();
+
+ sb.append(artifactProject.getName());
+ sb.append(" (");
+ sb.append(artifactProject.getGroupId());
+ sb.append(":");
+ sb.append(artifactProject.getArtifactId());
+ sb.append(":");
+ sb.append(artifactProject.getVersion());
+ sb.append(" - ");
+ String url = artifactProject.getUrl();
+ sb.append(url == null ? "no url defined" : url);
+ sb.append(")");
+
+ return sb.toString();
+ }
+
+ /**
+ * Get the <code>Maven project</code> from the repository depending the <code>Artifact</code> given.
+ *
+ * @param artifact an artifact
+ * @return the Maven project for the given artifact
+ * @throws ProjectBuildingException if any
+ */
+ protected MavenProject getMavenProjectFromRepository(Artifact artifact)
+ throws ProjectBuildingException {
+
+ boolean allowStubModel = false;
+
+ if (!"pom".equals(artifact.getType())) {
+ artifact = factory.createProjectArtifact(artifact.getGroupId(), artifact.getArtifactId(),
+ artifact.getVersion(), artifact.getScope());
+ allowStubModel = true;
+ }
+
+ // TODO: we should use the MavenMetadataSource instead
+ return mavenProjectBuilder.buildFromRepository(artifact, remoteRepositories, localRepository,
+ allowStubModel);
+ }
+
+ protected class LicenseMap extends java.util.TreeMap<String, SortedSet<String>> {
+
+ private static final long serialVersionUID = 864199843545688069L;
+
+ public SortedSet<String> put(String key, String value) {
+ // handle multiple values as a set to avoid duplicates
+ SortedSet<String> valueList = get(key);
+ if (valueList == null) {
+ valueList = new TreeSet<String>();
+ }
+ if (getLog().isDebugEnabled()) {
+ getLog().debug("key:" + key + ",value: " + value);
+ }
+ valueList.add(value);
+ return put(key, valueList);
+ }
+ }
+
+ @Override
+ public boolean isVerbose() {
+ return verbose;
+ }
+
+ @Override
+ public void setVerbose(boolean verbose) {
+ this.verbose = verbose;
+ }
+
+ @Override
+ public MavenProject getProject() {
+ return project;
+ }
+
+ @Override
+ public void setProject(MavenProject project) {
+ this.project = project;
+ }
+}
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFileMojo.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Deleted: trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFilePlugin.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFilePlugin.java 2010-01-21 12:14:14 UTC (rev 1675)
+++ trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFilePlugin.java 2010-01-21 12:35:36 UTC (rev 1676)
@@ -1,394 +0,0 @@
-/*
- * *##%
- * Maven helper plugin
- * Copyright (C) 2009 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>.
- * ##%*
- */
-package org.nuiton.license.plugin;
-
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.factory.ArtifactFactory;
-import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
-import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.resolver.ArtifactCollector;
-import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
-import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
-import org.apache.maven.model.License;
-import org.apache.maven.project.MavenProject;
-import org.apache.maven.project.MavenProjectBuilder;
-import org.apache.maven.project.ProjectBuildingException;
-import org.apache.maven.shared.dependency.tree.DependencyNode;
-import org.apache.maven.shared.dependency.tree.DependencyTreeBuilder;
-import org.apache.maven.shared.dependency.tree.DependencyTreeBuilderException;
-
-import java.io.File;
-import java.util.List;
-import java.util.SortedSet;
-import java.util.TreeSet;
-import org.nuiton.plugin.AbstractPlugin;
-import org.nuiton.plugin.PluginHelper;
-
-/**
- * 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).
- *
- * @author chemit
- * @goal add-third-party
- * @phase generate-resources
- * @requiresDependencyResolution test
- * @requiresProject true
- */
-public class AddThirdPartyFilePlugin extends AbstractPlugin {
-
- private static final String unknownLicenseMessage = "Unknown license";
- /**
- * Dependance du projet.
- *
- * @parameter default-value="${project}"
- * @required
- * @readonly
- * @since 1.0.0
- */
- protected MavenProject project;
- /**
- * Fichier ou ecrire les licences des dependances.
- *
- * @parameter expression="${helper.thirdPartyFilename}" default-value="THIRD-PARTY.txt"
- * @required
- * @since 1.0.0
- */
- protected String thirdPartyFilename;
- /**
- * Repertoire de sortie des classes (classpath).
- *
- * @parameter expression="${helper.outputDirectory}" default-value="target/generated-sources/license"
- * @required
- * @since 1.0.0
- */
- protected File outputDirectory;
- /**
- * Encoding a utiliser pour lire et ecrire les fichiers.
- *
- * @parameter expression="${helper.encoding}" default-value="${project.build.sourceEncoding}"
- * @required
- * @since 1.0.0
- */
- protected String encoding;
- /**
- * Un flag pour forcer la generation.
- *
- * @parameter expression="${helper.force}" default-value="false"
- * @since 1.0.0
- */
- protected boolean force;
- /**
- * Un flag pour conserver un backup des fichiers modifies.
- *
- * @parameter expression="${helper.keepBackup}" default-value="false"
- * @since 1.0.0
- */
- protected boolean keepBackup;
- /**
- * Un flag pour faire une copie nommé dans META-INF (prefixe avec le nom de l'artifact).
- *
- * @parameter expression="${helper.copyToMETA_INF}" default-value="false"
- * @since 1.0.0
- */
- protected boolean copyToMETA_INF;
- /**
- * Un flag pour activer le mode verbeux.
- *
- * @parameter expression="${helper.verbose}" default-value="${maven.verbose}"
- * @since 1.0.0
- */
- protected boolean verbose;
- /**
- * Local Repository.
- *
- * @parameter expression="${localRepository}"
- * @required
- * @readonly
- * @since 1.0.0
- */
- protected ArtifactRepository localRepository;
- /**
- * Remote repositories used for the project.
- *
- * @parameter expression="${project.remoteArtifactRepositories}"
- * @required
- * @readonly
- * @since 1.0.0
- */
- protected List<?> remoteRepositories;
- /**
- * Dependency tree builder component.
- *
- * @component
- */
- protected DependencyTreeBuilder dependencyTreeBuilder;
- /**
- * Artifact Factory component.
- *
- * @component
- */
- protected ArtifactFactory factory;
- /**
- * Artifact metadata source component.
- *
- * @component
- */
- protected ArtifactMetadataSource artifactMetadataSource;
- /**
- * Artifact collector component.
- *
- * @component
- */
- protected ArtifactCollector collector;
- /**
- * Maven Project Builder component.
- *
- * @component
- */
- protected MavenProjectBuilder mavenProjectBuilder;
- /**
- * content of third party file (only computed if {@link #force} is active or the
- * {@link #thirdPartyFile} does not exist, or is not up-to-date.
- */
- protected String thirdPartyFileContent;
- protected File thirdPartyFile;
-
- @Override
- protected boolean checkPackaging() {
- return rejectPackaging(Packaging.pom);
- }
- boolean doGenerate;
-
- @Override
- protected void init() throws Exception {
-
- doGenerate = true;
- thirdPartyFile = new File(outputDirectory, thirdPartyFilename);
-
- if (!force) {
- // regenerate only if file exists and is newer than pom file
- doGenerate = !isFileNewerThanPomFile(thirdPartyFile);
- }
-
- if (doGenerate) {
-
- // prepare thirdPartyFileContent
-
- DependencyNode dependencyTreeNode = resolveProject();
-
- LicenseMap licenseMap = new LicenseMap();
-
- for (Object o : dependencyTreeNode.getChildren()) {
-
- buildLicenseMap((DependencyNode) o, licenseMap);
- }
-
- thirdPartyFileContent = buildGroupedLicenses(licenseMap);
-
- // log dependencies with no license
- SortedSet<String> dependenciesWithNoLicense = licenseMap.get(unknownLicenseMessage);
- if (dependenciesWithNoLicense != null) {
- for (String dep : dependenciesWithNoLicense) {
- // no license found for the dependency
- getLog().warn("no license found for dependency " + dep);
- }
- }
- } else {
- thirdPartyFileContent = PluginHelper.readAsString(thirdPartyFile, encoding);
- }
- }
-
- @Override
- protected void doAction() throws Exception {
- if (doGenerate) {
- if (verbose) {
- getLog().info("writing third-party file : " + thirdPartyFile);
- }
- if (keepBackup && thirdPartyFile.exists()) {
- if (verbose) {
- getLog().info("backup " + thirdPartyFile);
- }
- backupFile(thirdPartyFile);
- }
- writeFile(thirdPartyFile, thirdPartyFileContent, encoding);
- }
- if (copyToMETA_INF) {
- copyFile(thirdPartyFile, new File(outputDirectory, "META-INF" + File.separator + project.getArtifactId() + "-" + thirdPartyFile.getName()));
- }
- addResourceDir(outputDirectory,"**/*.txt");
- }
-
- /** @return resolve the dependency tree */
- protected DependencyNode resolveProject() {
- try {
- ArtifactFilter artifactFilter = new ScopeArtifactFilter(Artifact.SCOPE_TEST);
- return dependencyTreeBuilder.buildDependencyTree(project, localRepository, factory,
- artifactMetadataSource, artifactFilter, collector);
- } catch (DependencyTreeBuilderException e) {
- getLog().error("Unable to build dependency tree.", e);
- return null;
- }
- }
-
- protected void buildLicenseMap(DependencyNode node, LicenseMap licenseMap) {
- if (node.getState() != DependencyNode.INCLUDED) {
- // this dependency is not included, so do not treate it
- if (verbose) {
- getLog().info("do not include this dependency " + node.toNodeString());
- }
- return;
- }
- Artifact artifact = node.getArtifact();
-
- if (verbose && getLog().isDebugEnabled()) {
- getLog().debug("treate node " + node.toNodeString());
- }
-
- if (!Artifact.SCOPE_SYSTEM.equals(artifact.getScope())) {
- try {
- MavenProject artifactProject = getMavenProjectFromRepository(artifact);
- String artifactName = getArtifactName(artifactProject);
-
- List<?> licenses = artifactProject.getLicenses();
-
- if (licenses.isEmpty()) {
- // no license found for the dependency
- licenseMap.put(unknownLicenseMessage, artifactName);
-
- } else {
- for (Object o : licenses) {
- if (o == null) {
- getLog().warn("could not acquire the license for " + artifactName);
- continue;
- }
- License license = (License) o;
- String licenseKey = license.getName();
- if (license.getName() == null) {
- licenseKey = license.getUrl();
- }
- licenseMap.put(licenseKey, artifactName);
- }
- }
- } catch (ProjectBuildingException e) {
- getLog().error("ProjectBuildingException error : ", e);
- }
- }
- if (!node.getChildren().isEmpty()) {
- for (Object o : node.getChildren()) {
- buildLicenseMap((DependencyNode) o, licenseMap);
- }
- }
- }
-
- protected String buildGroupedLicenses(LicenseMap licenseMap) {
- StringBuilder sb = new StringBuilder();
- sb.append("List of third-party dependencies grouped by their license type.");
- for (String licenseName : licenseMap.keySet()) {
- sb.append("\n\n").append(licenseName).append(" : ");
-
- SortedSet<String> projects = licenseMap.get(licenseName);
-
- for (String projectName : projects) {
- sb.append("\n * ").append(projectName);
- }
- }
- return sb.toString();
- }
-
- protected String getArtifactName(MavenProject artifactProject) {
- StringBuilder sb = new StringBuilder();
-
- sb.append(artifactProject.getName());
- sb.append(" (");
- sb.append(artifactProject.getGroupId());
- sb.append(":");
- sb.append(artifactProject.getArtifactId());
- sb.append(":");
- sb.append(artifactProject.getVersion());
- sb.append(" - ");
- String url = artifactProject.getUrl();
- sb.append(url == null ? "no url defined" : url);
- sb.append(")");
-
- return sb.toString();
- }
-
- /**
- * Get the <code>Maven project</code> from the repository depending the <code>Artifact</code> given.
- *
- * @param artifact an artifact
- * @return the Maven project for the given artifact
- * @throws ProjectBuildingException if any
- */
- protected MavenProject getMavenProjectFromRepository(Artifact artifact)
- throws ProjectBuildingException {
-
- boolean allowStubModel = false;
-
- if (!"pom".equals(artifact.getType())) {
- artifact = factory.createProjectArtifact(artifact.getGroupId(), artifact.getArtifactId(),
- artifact.getVersion(), artifact.getScope());
- allowStubModel = true;
- }
-
- // TODO: we should use the MavenMetadataSource instead
- return mavenProjectBuilder.buildFromRepository(artifact, remoteRepositories, localRepository,
- allowStubModel);
- }
-
- protected class LicenseMap extends java.util.TreeMap<String, SortedSet<String>> {
-
- private static final long serialVersionUID = 864199843545688069L;
-
- public SortedSet<String> put(String key, String value) {
- // handle multiple values as a set to avoid duplicates
- SortedSet<String> valueList = get(key);
- if (valueList == null) {
- valueList = new TreeSet<String>();
- }
- if (getLog().isDebugEnabled()) {
- getLog().debug("key:" + key + ",value: " + value);
- }
- valueList.add(value);
- return put(key, valueList);
- }
- }
-
- @Override
- public boolean isVerbose() {
- return verbose;
- }
-
- @Override
- public void setVerbose(boolean verbose) {
- this.verbose = verbose;
- }
-
- @Override
- public MavenProject getProject() {
- return project;
- }
-
- @Override
- public void setProject(MavenProject project) {
- this.project = project;
- }
-}
Copied: trunk/src/main/java/org/nuiton/license/plugin/GeneratorListMojo.java (from rev 1675, trunk/src/main/java/org/nuiton/license/plugin/GeneratorListPlugin.java)
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/GeneratorListMojo.java (rev 0)
+++ trunk/src/main/java/org/nuiton/license/plugin/GeneratorListMojo.java 2010-01-21 12:35:36 UTC (rev 1676)
@@ -0,0 +1,82 @@
+/*
+ * *##%
+ * Maven License Plugin
+ * Copyright (C) 2008 - 2009 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>.
+ * ##%*
+ */
+package org.nuiton.license.plugin;
+
+import java.util.Map;
+import java.util.Map.Entry;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.nuiton.license.plugin.header.generator.HeaderGenerator;
+
+/**
+ * Displays all the available generators.
+ *
+ * @author chemit
+ *
+ * @requiresProject false
+ * @requiresDirectInvocation
+ * @goal generator-list
+ *
+ * @since 1.0.1
+ *
+ */
+public class GeneratorListMojo extends AbstractMojo {
+
+ /**
+ * Un drapeau pour afficher aussi le contenu des license.
+ *
+ * @parameter expression="${detail}"
+ * @since 1.0.1
+ */
+ protected boolean detail;
+ /**
+ * All available generators
+ *
+ * @component role="org.nuiton.license.header.generator.HeaderGenerator"
+ */
+ protected Map<String, HeaderGenerator> _generators;
+
+ @Override
+ public void execute() throws MojoExecutionException, MojoFailureException {
+
+ // display it
+ StringBuilder buffer = new StringBuilder("\n");
+ buffer.append("\n\n-------------------------------------------------------------------------------\n");
+ buffer.append(" maven-license-plugin\n");
+ buffer.append("-------------------------------------------------------------------------------\n\n");
+ if (_generators == null || _generators.isEmpty()) {
+ buffer.append("No generator found.\n\n");
+ } else {
+ buffer.append("List of available generators :\n\n");
+ for (Entry<String, HeaderGenerator> stringHeaderGeneratorEntry : _generators.entrySet()) {
+ Entry<String, HeaderGenerator> e = stringHeaderGeneratorEntry;
+ HeaderGenerator generator = e.getValue();
+ buffer.append(" - ").append(e.getKey()).append(" : ").append(generator.getDescription());
+ buffer.append("\n");
+ if (detail) {
+ buffer.append("\n example : \n").append(generator.getHeader("content ")).append('\n');
+ }
+ }
+ }
+ getLog().info(buffer.toString());
+ }
+}
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/GeneratorListMojo.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Added: svn:mergeinfo
+
Deleted: trunk/src/main/java/org/nuiton/license/plugin/GeneratorListPlugin.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/GeneratorListPlugin.java 2010-01-21 12:14:14 UTC (rev 1675)
+++ trunk/src/main/java/org/nuiton/license/plugin/GeneratorListPlugin.java 2010-01-21 12:35:36 UTC (rev 1676)
@@ -1,82 +0,0 @@
-/*
- * *##%
- * Maven License Plugin
- * Copyright (C) 2008 - 2009 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>.
- * ##%*
- */
-package org.nuiton.license.plugin;
-
-import java.util.Map;
-import java.util.Map.Entry;
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.nuiton.license.plugin.header.generator.HeaderGenerator;
-
-/**
- * Displays all the available generators.
- *
- * @author chemit
- *
- * @requiresProject false
- * @requiresDirectInvocation
- * @goal generator-list
- *
- * @since 1.0.1
- *
- */
-public class GeneratorListPlugin extends AbstractMojo {
-
- /**
- * Un drapeau pour afficher aussi le contenu des license.
- *
- * @parameter expression="${detail}"
- * @since 1.0.1
- */
- protected boolean detail;
- /**
- * All available generators
- *
- * @component role="org.nuiton.license.header.generator.HeaderGenerator"
- */
- protected Map<String, HeaderGenerator> _generators;
-
- @Override
- public void execute() throws MojoExecutionException, MojoFailureException {
-
- // display it
- StringBuilder buffer = new StringBuilder("\n");
- buffer.append("\n\n-------------------------------------------------------------------------------\n");
- buffer.append(" maven-license-plugin\n");
- buffer.append("-------------------------------------------------------------------------------\n\n");
- if (_generators == null || _generators.isEmpty()) {
- buffer.append("No generator found.\n\n");
- } else {
- buffer.append("List of available generators :\n\n");
- for (Entry<String, HeaderGenerator> stringHeaderGeneratorEntry : _generators.entrySet()) {
- Entry<String, HeaderGenerator> e = stringHeaderGeneratorEntry;
- HeaderGenerator generator = e.getValue();
- buffer.append(" - ").append(e.getKey()).append(" : ").append(generator.getDescription());
- buffer.append("\n");
- if (detail) {
- buffer.append("\n example : \n").append(generator.getHeader("content ")).append('\n');
- }
- }
- }
- getLog().info(buffer.toString());
- }
-}
Copied: trunk/src/main/java/org/nuiton/license/plugin/LicenseListMojo.java (from rev 1674, trunk/src/main/java/org/nuiton/license/plugin/LicenseListPlugin.java)
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/LicenseListMojo.java (rev 0)
+++ trunk/src/main/java/org/nuiton/license/plugin/LicenseListMojo.java 2010-01-21 12:35:36 UTC (rev 1676)
@@ -0,0 +1,100 @@
+/*
+ * *##%
+ * Maven License Plugin
+ * Copyright (C) 2008 - 2009 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>.
+ * ##%*
+ */
+package org.nuiton.license.plugin;
+
+import java.io.IOException;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+
+import org.nuiton.license.plugin.repository.License;
+import org.nuiton.license.plugin.repository.LicenseDefinition;
+import org.nuiton.license.plugin.repository.LicenseRepository;
+import org.nuiton.license.plugin.repository.LicenseRepositoryFactory;
+
+/**
+ * Display all available licenses.
+ *
+ * @author chemit
+ * @goal license-list
+ * @requiresProject false
+ * @requiresDirectInvocation
+ *
+ * @since 1.0.1
+ */
+public class LicenseListMojo extends AbstractMojo {
+
+ /**
+ * La baseURL d'un resolver de license supplementaire
+ *
+ * @parameter expression="${extraResolver}"
+ * @since 1.0.1
+ */
+ protected String extraResolver;
+ /**
+ * Encoding a utiliser pour lire et ecrire les fichiers.
+ *
+ * @parameter expression="${encoding}" default-value="UTF-8"
+ * @required
+ * @since 1.0.0
+ */
+ protected String encoding;
+ /**
+ * Un drapeau pour afficher aussi le contenu des license.
+ *
+ * @parameter expression="${detail}"
+ * @since 1.0.1
+ */
+ protected boolean detail;
+
+ @Override
+ public void execute() throws MojoExecutionException, MojoFailureException {
+ StringBuilder buffer = new StringBuilder();
+ buffer.append("\n\n-------------------------------------------------------------------------------\n");
+ buffer.append(" maven-license-plugin\n");
+ buffer.append("-------------------------------------------------------------------------------\n\n");
+ buffer.append("Available licenses :\n\n");
+
+ LicenseRepository factory;
+ try {
+ factory = LicenseRepositoryFactory.newLicenseRepository(true, true, extraResolver);
+ } catch (IllegalArgumentException ex) {
+ throw new MojoExecutionException("could not obtain the license repository", ex);
+ } catch (IOException ex) {
+ throw new MojoExecutionException("could not obtain the license repository", ex);
+ }
+
+ for (LicenseDefinition entry : factory.getDefinitions()) {
+ String licenseName = entry.getName();
+ buffer.append(" * ").append(licenseName).append(" : ").append(entry.getDescription()).append('\n');
+ if (detail) {
+ try {
+
+ License license = factory.getLicense(licenseName);
+ buffer.append("\n").append(license.getHeaderContent(encoding)).append("\n\n");
+ } catch (IOException ex) {
+ throw new MojoExecutionException("could not instanciate license with name " + licenseName + " for reason " + ex.getMessage(), ex);
+ }
+ }
+ }
+ getLog().info(buffer.toString());
+ }
+}
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/LicenseListMojo.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Added: svn:mergeinfo
+
Deleted: trunk/src/main/java/org/nuiton/license/plugin/LicenseListPlugin.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/LicenseListPlugin.java 2010-01-21 12:14:14 UTC (rev 1675)
+++ trunk/src/main/java/org/nuiton/license/plugin/LicenseListPlugin.java 2010-01-21 12:35:36 UTC (rev 1676)
@@ -1,100 +0,0 @@
-/*
- * *##%
- * Maven License Plugin
- * Copyright (C) 2008 - 2009 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>.
- * ##%*
- */
-package org.nuiton.license.plugin;
-
-import java.io.IOException;
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-
-import org.nuiton.license.plugin.repository.License;
-import org.nuiton.license.plugin.repository.LicenseDefinition;
-import org.nuiton.license.plugin.repository.LicenseRepository;
-import org.nuiton.license.plugin.repository.LicenseRepositoryFactory;
-
-/**
- * Display all available licenses.
- *
- * @author chemit
- * @goal license-list
- * @requiresProject false
- * @requiresDirectInvocation
- *
- * @since 1.0.1
- */
-public class LicenseListPlugin extends AbstractMojo {
-
- /**
- * La baseURL d'un resolver de license supplementaire
- *
- * @parameter expression="${extraResolver}"
- * @since 1.0.1
- */
- protected String extraResolver;
- /**
- * Encoding a utiliser pour lire et ecrire les fichiers.
- *
- * @parameter expression="${encoding}" default-value="UTF-8"
- * @required
- * @since 1.0.0
- */
- protected String encoding;
- /**
- * Un drapeau pour afficher aussi le contenu des license.
- *
- * @parameter expression="${detail}"
- * @since 1.0.1
- */
- protected boolean detail;
-
- @Override
- public void execute() throws MojoExecutionException, MojoFailureException {
- StringBuilder buffer = new StringBuilder();
- buffer.append("\n\n-------------------------------------------------------------------------------\n");
- buffer.append(" maven-license-plugin\n");
- buffer.append("-------------------------------------------------------------------------------\n\n");
- buffer.append("Available licenses :\n\n");
-
- LicenseRepository factory;
- try {
- factory = LicenseRepositoryFactory.newLicenseRepository(true, true, extraResolver);
- } catch (IllegalArgumentException ex) {
- throw new MojoExecutionException("could not obtain the license repository", ex);
- } catch (IOException ex) {
- throw new MojoExecutionException("could not obtain the license repository", ex);
- }
-
- for (LicenseDefinition entry : factory.getDefinitions()) {
- String licenseName = entry.getName();
- buffer.append(" * ").append(licenseName).append(" : ").append(entry.getDescription()).append('\n');
- if (detail) {
- try {
-
- License license = factory.getLicense(licenseName);
- buffer.append("\n").append(license.getHeaderContent(encoding)).append("\n\n");
- } catch (IOException ex) {
- throw new MojoExecutionException("could not instanciate license with name " + licenseName + " for reason " + ex.getMessage(), ex);
- }
- }
- }
- getLog().info(buffer.toString());
- }
-}
Copied: trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderMojo.java (from rev 1675, trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderPlugin.java)
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderMojo.java (rev 0)
+++ trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderMojo.java 2010-01-21 12:35:36 UTC (rev 1676)
@@ -0,0 +1,467 @@
+/*
+ * *##%
+ * Maven License Plugin
+ * Copyright (C) 2008 - 2009 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>.
+ * ##%*
+ */
+package org.nuiton.license.plugin;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.project.MavenProject;
+import org.apache.velocity.Template;
+import org.apache.velocity.VelocityContext;
+import org.apache.velocity.app.VelocityEngine;
+import org.apache.velocity.context.Context;
+import org.codehaus.plexus.velocity.VelocityComponent;
+import org.nuiton.license.plugin.header.generator.HeaderGenerator;
+import org.nuiton.license.plugin.repository.License;
+import org.nuiton.license.plugin.repository.LicenseRepository;
+import org.nuiton.license.plugin.repository.LicenseRepositoryFactory;
+import org.nuiton.plugin.AbstractPlugin;
+import org.nuiton.plugin.PluginHelper;
+import org.nuiton.processor.LicenseProcessor;
+
+import java.io.File;
+import java.io.StringWriter;
+import java.util.*;
+import java.util.Map.Entry;
+
+/**
+ * The goal to update (or add) the licence header on some files.
+ *
+ * @author chemit
+ * @requiresProject true
+ * @goal update-header
+ * @since 1.0.1
+ */
+public class UpdateHeaderMojo extends AbstractPlugin {
+
+ /**
+ * Dependance du projet.
+ *
+ * @parameter default-value="${project}"
+ * @required
+ * @since 1.0.0
+ */
+ protected MavenProject project;
+ /**
+ * Encoding a utiliser pour lire et ecrire les fichiers.
+ *
+ * @parameter expression="${license.encoding}" default-value="${project.build.sourceEncoding}"
+ * @required
+ * @since 1.0.0
+ */
+ protected String encoding;
+ /**
+ * l'annee de creation du module (sera place dans le header)
+ *
+ * @parameter expression="${license.inceptionYear}" default-value="${project.inceptionYear}"
+ * @required
+ * @since 1.0.0
+ */
+ protected String inceptionYear;
+ /**
+ * le nom de l'organisation (sera place dans le header)
+ *
+ * @parameter expression="${license.organizationName}" default-value="${project.organization.name}"
+ * @required
+ * @since 1.0.0
+ */
+ protected String organizationName;
+ /**
+ * le nom du projet (sera place dans le header)
+ *
+ * @parameter expression="${license.projectName}" default-value="${project.name}"
+ * @required
+ * @since 1.0.0
+ */
+ protected String projectName;
+ /**
+ * Le type de license a appliquer.
+ *
+ * @parameter expression="${license.licenseName}"
+ * @required
+ * @since 1.0.0
+ */
+ protected String licenseName;
+ /**
+ * Le type de générateur a utiliser pour encapsuler le header.
+ * <p/>
+ * Par défaut, on veut utiliser le plugin sur des fichiers sources java.
+ *
+ * @parameter expression="${license.generatorName}" default-value="license-java"
+ * @required
+ * @since 1.0.1
+ */
+ protected String generatorName;
+ /**
+ * La liste des patterns de fichiers à inclure (séparés par des virgules).
+ * <p/>
+ * Exemple : <code>**\/*.java,**\/*.properties</code>
+ * <p/>
+ * On recherchera alors les fichiers respectant l'un des patterns dans
+ * tous les répertoires de sources et de tests.
+ * <p/>
+ * Par défaut, on veut utiliser le plugin sur des fichiers sources java.
+ *
+ * @parameter expression="${license.includes}" default-value="**\/*.java"
+ * @required
+ * @since 1.0.1
+ */
+ protected String includes = "**/*.java";
+ /**
+ * La liste des patterns de fichiers à exclure (séparés par des virgules).
+ * <p/>
+ * Exemple : <code>**\/*.java,**\/*.properties</code>
+ * <p/>
+ * On recherchera alors les fichiers respectant l'un des patterns dans
+ * tous les répertoires de sources et de tests.
+ * <p/>
+ * Par défaut, on n'exclue rien.
+ *
+ * @parameter expression="${license.excludes}"
+ * @since 1.0.1
+ */
+ protected String excludes;
+ /**
+ * Repertoires des fichiers sources a traiter.
+ *
+ * @parameter expression="${license.compileSourceRoots}" default-value="${project.compileSourceRoots}"
+ * @required
+ * @since 1.0.0
+ */
+ protected List<String> compileSourceRoots;
+ /**
+ * Repertoires des fichiers sources de test a traiter.
+ *
+ * @parameter expression="${license.testCompileSourceRoots}" default-value="${project.testCompileSourceRoots}"
+ * @required
+ * @since 1.0.0
+ */
+ protected List<String> testCompileSourceRoots;
+ /**
+ * Un resolver externe
+ *
+ * @parameter expression="${license.licenseResolver}"
+ * @since 1.0.0
+ */
+ protected String licenseResolver;
+ /**
+ * La template (velocity) a utiliser pour construire le header.
+ * <p/>
+ * Cette template doit être dans le class-path ou être un fichier existant
+ *
+ * @parameter expression="${license.template}" default-value="/license/defaultHeader.vm"
+ * @since 1.0.1
+ */
+ protected String template;
+ /**
+ * Des paramètres supplémentaires à utiliser dans la template du header.
+ *
+ * @parameter
+ * @since 1.0.1
+ */
+ protected Map<String, String> templateParameters;
+ /**
+ * Un flag pour conserver un backup des fichiers modifies.
+ *
+ * @parameter expression="${license.keepBackup}" default-value="false"
+ * @since 1.0.0
+ */
+ protected boolean keepBackup;
+ /**
+ * Un flag pour activer le mode verbeux.
+ *
+ * @parameter expression="${license.verbose}" default-value="${maven.verbose}"
+ * @since 1.0.0
+ */
+ protected boolean verbose;
+ /**
+ * A flag to skip the goal.
+ *
+ * @parameter expression="${skipUpdateHeader}" default-value="false"
+ * @since 1.0.3
+ */
+ protected boolean skipUpdateHeader;
+ /**
+ * A flag to test plugin but modify no file.
+ *
+ * @parameter expression="${dryRun}" default-value="false"
+ * @since 1.0.3
+ */
+ protected boolean dryRun;
+ /**
+ * Velocity Component.
+ *
+ * @component roleHint="maven-license-plugin"
+ * @since 2.0.0
+ */
+ protected VelocityComponent velocity;
+ /**
+ * All available generators
+ *
+ * @component role="org.nuiton.license.plugin.header.generator.HeaderGenerator"
+ */
+ protected Map<String, HeaderGenerator> _generators;
+ /**
+ * le header a ajouter dans chaque fichier source java
+ */
+ protected String licenseHeaderContent;
+ /**
+ * le header complet (avec les balises de commentaires)
+ */
+ protected String boxedLicenseHeaderContent;
+ /**
+ * la liste des chemin relatifs des sources java a traiter pour chaque repertoire contenant des sources
+ */
+ protected Map<File, String[]> filesToTreate;
+ /**
+ * le timestamp utilise pour la generation
+ */
+ protected long timestamp;
+
+ @Override
+ public boolean isVerbose() {
+ return verbose;
+ }
+
+ @Override
+ public void setVerbose(boolean verbose) {
+ this.verbose = verbose;
+ }
+
+ @Override
+ public MavenProject getProject() {
+ return project;
+ }
+
+ @Override
+ public void setProject(MavenProject project) {
+ this.project = project;
+ }
+
+ @Override
+ public boolean checkPackaging() {
+ return true;
+ }
+
+ @Override
+ protected boolean checkSkip() {
+ if (skipUpdateHeader) {
+ getLog().info("skip flag is on, will skip goal.");
+ return false;
+ }
+ if (filesToTreate == null || filesToTreate.isEmpty()) {
+ getLog().info("No file to treate, will skip goal.");
+ return false;
+ }
+ return super.checkSkip();
+ }
+
+ @Override
+ public void init() throws Exception {
+
+ if (skipUpdateHeader) {
+ return;
+ }
+ timestamp = System.nanoTime();
+
+ if (_generators == null) {
+ // should never happen...
+ throw new MojoExecutionException("no header generator found");
+ }
+ if (verbose) {
+ for (Entry<String, HeaderGenerator> stringHeaderGeneratorEntry : _generators.entrySet()) {
+ Entry<String, HeaderGenerator> next = stringHeaderGeneratorEntry;
+ getLog().info("config - available generator : " + next.getKey());
+ }
+ }
+
+ if (!_generators.containsKey(generatorName.trim())) {
+ throw new MojoExecutionException("the generator named '" + generatorName + "' is unknown (use generator-list goal to see all of them)");
+ }
+ HeaderGenerator generator = _generators.get(generatorName);
+
+ // obtain all files to be treated
+
+ filesToTreate = new HashMap<File, String[]>();
+ String[] in = includes.split(",");
+ String[] ex = excludes == null ? null : excludes.split(",");
+ getFilesToTreateForRoots(in, ex, compileSourceRoots, filesToTreate, null);
+ getFilesToTreateForRoots(in, ex, testCompileSourceRoots, filesToTreate, null);
+
+ if (filesToTreate.isEmpty()) {
+ return;
+ }
+
+ File templateFile = new File(template);
+
+ // verifie que la template existe (dans le class-path ou en tant que fichier)
+ checkResource(templateFile);
+
+ // recuperation de la license a utiliser
+ LicenseRepository factory = LicenseRepositoryFactory.newLicenseRepository(true, true, licenseResolver);
+ License license = factory.getLicense(licenseName);
+
+ if (verbose) {
+ getLog().info("config - use license " + license.getName());
+ getLog().info("config - use generator " + generator.getName());
+ getLog().info("config - use template " + template);
+ }
+ // obtain content of license header
+ licenseHeaderContent = computeHeader(license, generator);
+
+ // build the comment boxed header content
+ boxedLicenseHeaderContent = generator.getHeader(licenseHeaderContent);
+ if (verbose) {
+ getLog().info("config - header to use\n" + boxedLicenseHeaderContent);
+ }
+
+ }
+
+ @Override
+ protected void doAction() throws Exception {
+
+ // create a licence processor with given header
+ LicenseProcessor p = new LicenseProcessor(licenseHeaderContent);
+
+ for (Entry<File, String[]> entry : filesToTreate.entrySet()) {
+ File src = entry.getKey();
+ for (String javaRelativePath : entry.getValue()) {
+ File file = new File(src, javaRelativePath);
+
+ if (verbose) {
+ getLog().info("process file " + file);
+ }
+
+ // file where to writeFile result
+ File processFile = new File(file.getAbsolutePath() + "_" + timestamp);
+
+ try {
+ p.process(file, processFile);
+ boolean foundLicenseHeader = p.getLicenceFilter().wasTouched();
+
+ if (!foundLicenseHeader) {
+ if (p.getLicenceFilter().isDetectHeader()) {
+ getLog().warn("skip file " + file + " (no license footer tag found : '##%*' !)");
+ } else {
+ // no license header found in file, add it
+ getLog().info("adding license header on file " + file);
+ String content = PluginHelper.readAsString(file, encoding);
+ content = boxedLicenseHeaderContent + content;
+ if (!dryRun) {
+ writeFile(processFile, content, encoding);
+ }
+ }
+ }
+
+ if (keepBackup && !dryRun) {
+ File backupFile = new File(file.getAbsolutePath() + "~");
+ if (verbose) {
+ getLog().debug("backup original file " + file);
+ }
+ renameFile(file, backupFile);
+ }
+ if (dryRun) {
+ deleteFile(processFile);
+ } else {
+ renameFile(processFile, file);
+
+ }
+
+ } catch (Exception e) {
+ getLog().warn("skip file " + file + " (could not process for reason : " + e.getMessage() + ")");
+ deleteFile(processFile);
+ } finally {
+ // toujours cleaner les états du filtre du processeur
+ p.getLicenceFilter().reset();
+ }
+ }
+ }
+ }
+
+ /**
+ * Construction du header a utiliser.
+ * <p/>
+ * Le header est généré à partir de la template velocity donnée et de la
+ * license donnée.
+ *
+ * @param license the license to use to compute header
+ * @param generator the header generator used to compute header
+ * @return le header construit
+ * @throws Exception pour toute erreur pendant la construction du header
+ */
+ protected String computeHeader(License license, HeaderGenerator generator) throws Exception {
+
+ // recuperation de la license a mettre dans le header
+ String licenseContent = license.getHeaderContent(encoding);
+
+ // defined inceptionYear (if year is older than now suffix with a - thisYear)
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(new Date());
+ String thisYear = cal.get(Calendar.YEAR) + "";
+ if (!thisYear.equals(inceptionYear)) {
+ inceptionYear = inceptionYear + " - " + thisYear;
+ }
+
+ // preparation de l'environnement velocity
+
+ Context context = new VelocityContext();
+
+ context.put("inceptionYear", inceptionYear);
+ context.put("projectName", projectName);
+ context.put("organizationName", organizationName);
+ context.put("licenseContent", licenseContent);
+
+ if (templateParameters != null) {
+ for (Entry<String, String> e : templateParameters.entrySet()) {
+ context.put(e.getKey(), e.getValue());
+ }
+ }
+
+ if (verbose) {
+ StringBuilder buffer = new StringBuilder();
+
+ buffer.append("config - parameters for template : ");
+ for (Object key : context.getKeys()) {
+ buffer.append("\n * ").append(key).append(" : ").append(context.get(key + ""));
+ }
+ getLog().info(buffer.toString());
+ }
+
+ // generation du contenu via velocity
+ VelocityEngine engine = velocity.getEngine();
+
+ StringWriter writer = new StringWriter();
+
+ Template velocityTemplate = engine.getTemplate(template, encoding);
+
+ velocityTemplate.merge(context, writer);
+
+ writer.flush();
+
+ writer.close();
+
+ // recuperation du contenu du texte genere
+ String r = writer.getBuffer().toString();
+
+ // prefixage de toutes les lignes par un " * "
+ String result = generator.prefixContent(r.trim() + "\n\n");
+
+ return '\n' + result;
+ }
+}
Property changes on: trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderMojo.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Added: svn:mergeinfo
+
Deleted: trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderPlugin.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderPlugin.java 2010-01-21 12:14:14 UTC (rev 1675)
+++ trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderPlugin.java 2010-01-21 12:35:36 UTC (rev 1676)
@@ -1,467 +0,0 @@
-/*
- * *##%
- * Maven License Plugin
- * Copyright (C) 2008 - 2009 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>.
- * ##%*
- */
-package org.nuiton.license.plugin;
-
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.project.MavenProject;
-import org.apache.velocity.Template;
-import org.apache.velocity.VelocityContext;
-import org.apache.velocity.app.VelocityEngine;
-import org.apache.velocity.context.Context;
-import org.codehaus.plexus.velocity.VelocityComponent;
-import org.nuiton.license.plugin.header.generator.HeaderGenerator;
-import org.nuiton.license.plugin.repository.License;
-import org.nuiton.license.plugin.repository.LicenseRepository;
-import org.nuiton.license.plugin.repository.LicenseRepositoryFactory;
-import org.nuiton.plugin.AbstractPlugin;
-import org.nuiton.plugin.PluginHelper;
-import org.nuiton.processor.LicenseProcessor;
-
-import java.io.File;
-import java.io.StringWriter;
-import java.util.*;
-import java.util.Map.Entry;
-
-/**
- * The goal to update (or add) the licence header on some files.
- *
- * @author chemit
- * @requiresProject true
- * @goal update-header
- * @since 1.0.1
- */
-public class UpdateHeaderPlugin extends AbstractPlugin {
-
- /**
- * Dependance du projet.
- *
- * @parameter default-value="${project}"
- * @required
- * @since 1.0.0
- */
- protected MavenProject project;
- /**
- * Encoding a utiliser pour lire et ecrire les fichiers.
- *
- * @parameter expression="${license.encoding}" default-value="${project.build.sourceEncoding}"
- * @required
- * @since 1.0.0
- */
- protected String encoding;
- /**
- * l'annee de creation du module (sera place dans le header)
- *
- * @parameter expression="${license.inceptionYear}" default-value="${project.inceptionYear}"
- * @required
- * @since 1.0.0
- */
- protected String inceptionYear;
- /**
- * le nom de l'organisation (sera place dans le header)
- *
- * @parameter expression="${license.organizationName}" default-value="${project.organization.name}"
- * @required
- * @since 1.0.0
- */
- protected String organizationName;
- /**
- * le nom du projet (sera place dans le header)
- *
- * @parameter expression="${license.projectName}" default-value="${project.name}"
- * @required
- * @since 1.0.0
- */
- protected String projectName;
- /**
- * Le type de license a appliquer.
- *
- * @parameter expression="${license.licenseName}"
- * @required
- * @since 1.0.0
- */
- protected String licenseName;
- /**
- * Le type de générateur a utiliser pour encapsuler le header.
- * <p/>
- * Par défaut, on veut utiliser le plugin sur des fichiers sources java.
- *
- * @parameter expression="${license.generatorName}" default-value="license-java"
- * @required
- * @since 1.0.1
- */
- protected String generatorName;
- /**
- * La liste des patterns de fichiers à inclure (séparés par des virgules).
- * <p/>
- * Exemple : <code>**\/*.java,**\/*.properties</code>
- * <p/>
- * On recherchera alors les fichiers respectant l'un des patterns dans
- * tous les répertoires de sources et de tests.
- * <p/>
- * Par défaut, on veut utiliser le plugin sur des fichiers sources java.
- *
- * @parameter expression="${license.includes}" default-value="**\/*.java"
- * @required
- * @since 1.0.1
- */
- protected String includes = "**/*.java";
- /**
- * La liste des patterns de fichiers à exclure (séparés par des virgules).
- * <p/>
- * Exemple : <code>**\/*.java,**\/*.properties</code>
- * <p/>
- * On recherchera alors les fichiers respectant l'un des patterns dans
- * tous les répertoires de sources et de tests.
- * <p/>
- * Par défaut, on n'exclue rien.
- *
- * @parameter expression="${license.excludes}"
- * @since 1.0.1
- */
- protected String excludes;
- /**
- * Repertoires des fichiers sources a traiter.
- *
- * @parameter expression="${license.compileSourceRoots}" default-value="${project.compileSourceRoots}"
- * @required
- * @since 1.0.0
- */
- protected List<String> compileSourceRoots;
- /**
- * Repertoires des fichiers sources de test a traiter.
- *
- * @parameter expression="${license.testCompileSourceRoots}" default-value="${project.testCompileSourceRoots}"
- * @required
- * @since 1.0.0
- */
- protected List<String> testCompileSourceRoots;
- /**
- * Un resolver externe
- *
- * @parameter expression="${license.licenseResolver}"
- * @since 1.0.0
- */
- protected String licenseResolver;
- /**
- * La template (velocity) a utiliser pour construire le header.
- * <p/>
- * Cette template doit être dans le class-path ou être un fichier existant
- *
- * @parameter expression="${license.template}" default-value="/license/defaultHeader.vm"
- * @since 1.0.1
- */
- protected String template;
- /**
- * Des paramètres supplémentaires à utiliser dans la template du header.
- *
- * @parameter
- * @since 1.0.1
- */
- protected Map<String, String> templateParameters;
- /**
- * Un flag pour conserver un backup des fichiers modifies.
- *
- * @parameter expression="${license.keepBackup}" default-value="false"
- * @since 1.0.0
- */
- protected boolean keepBackup;
- /**
- * Un flag pour activer le mode verbeux.
- *
- * @parameter expression="${license.verbose}" default-value="${maven.verbose}"
- * @since 1.0.0
- */
- protected boolean verbose;
- /**
- * A flag to skip the goal.
- *
- * @parameter expression="${skipUpdateHeader}" default-value="false"
- * @since 1.0.3
- */
- protected boolean skipUpdateHeader;
- /**
- * A flag to test plugin but modify no file.
- *
- * @parameter expression="${dryRun}" default-value="false"
- * @since 1.0.3
- */
- protected boolean dryRun;
- /**
- * Velocity Component.
- *
- * @component roleHint="maven-license-plugin"
- * @since 2.0.0
- */
- protected VelocityComponent velocity;
- /**
- * All available generators
- *
- * @component role="org.nuiton.license.plugin.header.generator.HeaderGenerator"
- */
- protected Map<String, HeaderGenerator> _generators;
- /**
- * le header a ajouter dans chaque fichier source java
- */
- protected String licenseHeaderContent;
- /**
- * le header complet (avec les balises de commentaires)
- */
- protected String boxedLicenseHeaderContent;
- /**
- * la liste des chemin relatifs des sources java a traiter pour chaque repertoire contenant des sources
- */
- protected Map<File, String[]> filesToTreate;
- /**
- * le timestamp utilise pour la generation
- */
- protected long timestamp;
-
- @Override
- public boolean isVerbose() {
- return verbose;
- }
-
- @Override
- public void setVerbose(boolean verbose) {
- this.verbose = verbose;
- }
-
- @Override
- public MavenProject getProject() {
- return project;
- }
-
- @Override
- public void setProject(MavenProject project) {
- this.project = project;
- }
-
- @Override
- public boolean checkPackaging() {
- return true;
- }
-
- @Override
- protected boolean checkSkip() {
- if (skipUpdateHeader) {
- getLog().info("skip flag is on, will skip goal.");
- return false;
- }
- if (filesToTreate == null || filesToTreate.isEmpty()) {
- getLog().info("No file to treate, will skip goal.");
- return false;
- }
- return super.checkSkip();
- }
-
- @Override
- public void init() throws Exception {
-
- if (skipUpdateHeader) {
- return;
- }
- timestamp = System.nanoTime();
-
- if (_generators == null) {
- // should never happen...
- throw new MojoExecutionException("no header generator found");
- }
- if (verbose) {
- for (Entry<String, HeaderGenerator> stringHeaderGeneratorEntry : _generators.entrySet()) {
- Entry<String, HeaderGenerator> next = stringHeaderGeneratorEntry;
- getLog().info("config - available generator : " + next.getKey());
- }
- }
-
- if (!_generators.containsKey(generatorName.trim())) {
- throw new MojoExecutionException("the generator named '" + generatorName + "' is unknown (use generator-list goal to see all of them)");
- }
- HeaderGenerator generator = _generators.get(generatorName);
-
- // obtain all files to be treated
-
- filesToTreate = new HashMap<File, String[]>();
- String[] in = includes.split(",");
- String[] ex = excludes == null ? null : excludes.split(",");
- getFilesToTreateForRoots(in, ex, compileSourceRoots, filesToTreate, null);
- getFilesToTreateForRoots(in, ex, testCompileSourceRoots, filesToTreate, null);
-
- if (filesToTreate.isEmpty()) {
- return;
- }
-
- File templateFile = new File(template);
-
- // verifie que la template existe (dans le class-path ou en tant que fichier)
- checkResource(templateFile);
-
- // recuperation de la license a utiliser
- LicenseRepository factory = LicenseRepositoryFactory.newLicenseRepository(true, true, licenseResolver);
- License license = factory.getLicense(licenseName);
-
- if (verbose) {
- getLog().info("config - use license " + license.getName());
- getLog().info("config - use generator " + generator.getName());
- getLog().info("config - use template " + template);
- }
- // obtain content of license header
- licenseHeaderContent = computeHeader(license, generator);
-
- // build the comment boxed header content
- boxedLicenseHeaderContent = generator.getHeader(licenseHeaderContent);
- if (verbose) {
- getLog().info("config - header to use\n" + boxedLicenseHeaderContent);
- }
-
- }
-
- @Override
- protected void doAction() throws Exception {
-
- // create a licence processor with given header
- LicenseProcessor p = new LicenseProcessor(licenseHeaderContent);
-
- for (Entry<File, String[]> entry : filesToTreate.entrySet()) {
- File src = entry.getKey();
- for (String javaRelativePath : entry.getValue()) {
- File file = new File(src, javaRelativePath);
-
- if (verbose) {
- getLog().info("process file " + file);
- }
-
- // file where to writeFile result
- File processFile = new File(file.getAbsolutePath() + "_" + timestamp);
-
- try {
- p.process(file, processFile);
- boolean foundLicenseHeader = p.getLicenceFilter().wasTouched();
-
- if (!foundLicenseHeader) {
- if (p.getLicenceFilter().isDetectHeader()) {
- getLog().warn("skip file " + file + " (no license footer tag found : '##%*' !)");
- } else {
- // no license header found in file, add it
- getLog().info("adding license header on file " + file);
- String content = PluginHelper.readAsString(file, encoding);
- content = boxedLicenseHeaderContent + content;
- if (!dryRun) {
- writeFile(processFile, content, encoding);
- }
- }
- }
-
- if (keepBackup && !dryRun) {
- File backupFile = new File(file.getAbsolutePath() + "~");
- if (verbose) {
- getLog().debug("backup original file " + file);
- }
- renameFile(file, backupFile);
- }
- if (dryRun) {
- deleteFile(processFile);
- } else {
- renameFile(processFile, file);
-
- }
-
- } catch (Exception e) {
- getLog().warn("skip file " + file + " (could not process for reason : " + e.getMessage() + ")");
- deleteFile(processFile);
- } finally {
- // toujours cleaner les états du filtre du processeur
- p.getLicenceFilter().reset();
- }
- }
- }
- }
-
- /**
- * Construction du header a utiliser.
- * <p/>
- * Le header est généré à partir de la template velocity donnée et de la
- * license donnée.
- *
- * @param license the license to use to compute header
- * @param generator the header generator used to compute header
- * @return le header construit
- * @throws Exception pour toute erreur pendant la construction du header
- */
- protected String computeHeader(License license, HeaderGenerator generator) throws Exception {
-
- // recuperation de la license a mettre dans le header
- String licenseContent = license.getHeaderContent(encoding);
-
- // defined inceptionYear (if year is older than now suffix with a - thisYear)
- Calendar cal = Calendar.getInstance();
- cal.setTime(new Date());
- String thisYear = cal.get(Calendar.YEAR) + "";
- if (!thisYear.equals(inceptionYear)) {
- inceptionYear = inceptionYear + " - " + thisYear;
- }
-
- // preparation de l'environnement velocity
-
- Context context = new VelocityContext();
-
- context.put("inceptionYear", inceptionYear);
- context.put("projectName", projectName);
- context.put("organizationName", organizationName);
- context.put("licenseContent", licenseContent);
-
- if (templateParameters != null) {
- for (Entry<String, String> e : templateParameters.entrySet()) {
- context.put(e.getKey(), e.getValue());
- }
- }
-
- if (verbose) {
- StringBuilder buffer = new StringBuilder();
-
- buffer.append("config - parameters for template : ");
- for (Object key : context.getKeys()) {
- buffer.append("\n * ").append(key).append(" : ").append(context.get(key + ""));
- }
- getLog().info(buffer.toString());
- }
-
- // generation du contenu via velocity
- VelocityEngine engine = velocity.getEngine();
-
- StringWriter writer = new StringWriter();
-
- Template velocityTemplate = engine.getTemplate(template, encoding);
-
- velocityTemplate.merge(context, writer);
-
- writer.flush();
-
- writer.close();
-
- // recuperation du contenu du texte genere
- String r = writer.getBuffer().toString();
-
- // prefixage de toutes les lignes par un " * "
- String result = generator.prefixContent(r.trim() + "\n\n");
-
- return '\n' + result;
- }
-}
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/generator/XmlLicenseHeaderGeneratorImpl.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/generator/XmlLicenseHeaderGeneratorImpl.java 2010-01-21 12:14:14 UTC (rev 1675)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/generator/XmlLicenseHeaderGeneratorImpl.java 2010-01-21 12:35:36 UTC (rev 1676)
@@ -23,7 +23,7 @@
import org.nuiton.processor.filters.LicenseFilter;
/**
- * Le header pour les fichiers xml.
+ * Le generateur de header pour des fichiers xml.
*
* @author chemit
* @since 1.0.1
Deleted: trunk/src/main/resources/META-INF/services/org.nuiton.license.header.generator.HeaderGenerator
===================================================================
--- trunk/src/main/resources/META-INF/services/org.nuiton.license.header.generator.HeaderGenerator 2010-01-21 12:14:14 UTC (rev 1675)
+++ trunk/src/main/resources/META-INF/services/org.nuiton.license.header.generator.HeaderGenerator 2010-01-21 12:35:36 UTC (rev 1676)
@@ -1,3 +0,0 @@
-org.nuiton.license.header.generator.impl.JavaHeaderGenerator
-org.nuiton.license.header.generator.impl.XmlHeaderGenerator
-org.nuiton.license.header.generator.impl.PropertiesHeaderGenerator
Copied: trunk/src/test/java/org/nuiton/license/plugin/AddLicenseFileMojoTest.java (from rev 1674, trunk/src/test/java/org/nuiton/license/plugin/AddLicenseFilePluginTest.java)
===================================================================
--- trunk/src/test/java/org/nuiton/license/plugin/AddLicenseFileMojoTest.java (rev 0)
+++ trunk/src/test/java/org/nuiton/license/plugin/AddLicenseFileMojoTest.java 2010-01-21 12:35:36 UTC (rev 1676)
@@ -0,0 +1,107 @@
+/*
+ * *##%
+ * Maven helper plugin
+ * Copyright (C) 2009 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>.
+ * ##%*
+ */
+package org.nuiton.license.plugin;
+
+import static org.junit.Assert.*;
+import org.junit.Test;
+
+import java.io.File;
+import java.io.IOException;
+import org.nuiton.plugin.AbstractMojoTest;
+
+public class AddLicenseFileMojoTest extends AbstractMojoTest<AddLicenseFileMojo> {
+
+ @Override
+ protected String getGoalName(String methodName) {
+ return "add-license";
+ }
+
+ @Override
+ protected void setUpMojo(AddLicenseFileMojo mojo, File pomFile) throws Exception {
+ super.setUpMojo(mojo, pomFile);
+ // license is where the pom is
+ File outputDirectory = pomFile.getParentFile();
+ mojo.setOutputDirectory(outputDirectory);
+ if (!outputDirectory.exists()) {
+ if (!outputDirectory.mkdirs()) {
+ throw new IOException("could not create directory : " + outputDirectory);
+ }
+ }
+ mojo.setLicenseFile(new File(pomFile.getParentFile(), mojo.getLicenseFile().toString()));
+ log.info("pom : " + getRelativePathFromBasedir(mojo.getProject().getFile()));
+ log.info("outputDirectory : " + getRelativePathFromBasedir(mojo.getOutputDirectory()));
+ log.info("licenseFile : " + getRelativePathFromBasedir(mojo.getLicenseFile()));
+ }
+
+ @Test
+ public void testOne() throws Exception {
+
+ AddLicenseFileMojo mojo = getMojo();
+
+ long t0 = mojo.getLicenseFile().lastModified();
+
+ // always assume pom is older than any file
+ // since we can not ensure order of copy test resources
+ mojo.getProject().getFile().setLastModified(0);
+
+ // then executing the mojo, will do NOT change the licence file
+ mojo.execute();
+
+ long t1 = mojo.getLicenseFile().lastModified();
+
+ assertEquals(t0, t1);
+
+ // force to override the license file
+ mojo.setForce(true);
+
+ mojo.execute();
+ t1 = mojo.getLicenseFile().lastModified();
+
+ assertTrue(t1 > t0);
+ }
+
+ @Test
+ public void testTwo() throws Exception {
+
+ AddLicenseFileMojo mojo = getMojo();
+
+ long t0 = mojo.getLicenseFile().lastModified();
+
+ // always assume pom is older than any file
+ // since we can not ensure order of copy test resources
+ mojo.getProject().getFile().setLastModified(0);
+
+ // then executing the mojo, will do NOT change the licence file
+ mojo.execute();
+
+ long t1 = mojo.getLicenseFile().lastModified();
+
+ assertEquals(t0, t1);
+
+ // force to override the license file
+ mojo.setForce(true);
+
+ mojo.execute();
+ t1 = mojo.getLicenseFile().lastModified();
+
+ assertTrue(t1 > t0);
+ }
+}
Property changes on: trunk/src/test/java/org/nuiton/license/plugin/AddLicenseFileMojoTest.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Deleted: trunk/src/test/java/org/nuiton/license/plugin/AddLicenseFilePluginTest.java
===================================================================
--- trunk/src/test/java/org/nuiton/license/plugin/AddLicenseFilePluginTest.java 2010-01-21 12:14:14 UTC (rev 1675)
+++ trunk/src/test/java/org/nuiton/license/plugin/AddLicenseFilePluginTest.java 2010-01-21 12:35:36 UTC (rev 1676)
@@ -1,107 +0,0 @@
-/*
- * *##%
- * Maven helper plugin
- * Copyright (C) 2009 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>.
- * ##%*
- */
-package org.nuiton.license.plugin;
-
-import static org.junit.Assert.*;
-import org.junit.Test;
-
-import java.io.File;
-import java.io.IOException;
-import org.nuiton.plugin.AbstractMojoTest;
-
-public class AddLicenseFilePluginTest extends AbstractMojoTest<AddLicenseFilePlugin> {
-
- @Override
- protected String getGoalName(String methodName) {
- return "add-license";
- }
-
- @Override
- protected void setUpMojo(AddLicenseFilePlugin mojo, File pomFile) throws Exception {
- super.setUpMojo(mojo, pomFile);
- // license is where the pom is
- File outputDirectory = pomFile.getParentFile();
- mojo.setOutputDirectory(outputDirectory);
- if (!outputDirectory.exists()) {
- if (!outputDirectory.mkdirs()) {
- throw new IOException("could not create directory : " + outputDirectory);
- }
- }
- mojo.setLicenseFile(new File(pomFile.getParentFile(), mojo.getLicenseFile().toString()));
- log.info("pom : " + getRelativePathFromBasedir(mojo.getProject().getFile()));
- log.info("outputDirectory : " + getRelativePathFromBasedir(mojo.getOutputDirectory()));
- log.info("licenseFile : " + getRelativePathFromBasedir(mojo.getLicenseFile()));
- }
-
- @Test
- public void testOne() throws Exception {
-
- AddLicenseFilePlugin mojo = getMojo();
-
- long t0 = mojo.getLicenseFile().lastModified();
-
- // always assume pom is older than any file
- // since we can not ensure order of copy test resources
- mojo.getProject().getFile().setLastModified(0);
-
- // then executing the mojo, will do NOT change the licence file
- mojo.execute();
-
- long t1 = mojo.getLicenseFile().lastModified();
-
- assertEquals(t0, t1);
-
- // force to override the license file
- mojo.setForce(true);
-
- mojo.execute();
- t1 = mojo.getLicenseFile().lastModified();
-
- assertTrue(t1 > t0);
- }
-
- @Test
- public void testTwo() throws Exception {
-
- AddLicenseFilePlugin mojo = getMojo();
-
- long t0 = mojo.getLicenseFile().lastModified();
-
- // always assume pom is older than any file
- // since we can not ensure order of copy test resources
- mojo.getProject().getFile().setLastModified(0);
-
- // then executing the mojo, will do NOT change the licence file
- mojo.execute();
-
- long t1 = mojo.getLicenseFile().lastModified();
-
- assertEquals(t0, t1);
-
- // force to override the license file
- mojo.setForce(true);
-
- mojo.execute();
- t1 = mojo.getLicenseFile().lastModified();
-
- assertTrue(t1 > t0);
- }
-}
Copied: trunk/src/test/java/org/nuiton/license/plugin/UpdateHeaderMojoTest.java (from rev 1674, trunk/src/test/java/org/nuiton/license/plugin/UpdateHeaderPluginTest.java)
===================================================================
--- trunk/src/test/java/org/nuiton/license/plugin/UpdateHeaderMojoTest.java (rev 0)
+++ trunk/src/test/java/org/nuiton/license/plugin/UpdateHeaderMojoTest.java 2010-01-21 12:35:36 UTC (rev 1676)
@@ -0,0 +1,101 @@
+/*
+ * *##%
+ * Maven License Plugin
+ * Copyright (C) 2008 - 2009 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>.
+ * ##%*
+ */
+package org.nuiton.license.plugin;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Map.Entry;
+import static org.junit.Assert.*;
+import org.junit.Test;
+
+import org.nuiton.processor.filters.LicenseFilter;
+import org.nuiton.plugin.PluginHelper;
+import org.nuiton.plugin.AbstractMojoTest;
+
+/** @author chemit */
+public class UpdateHeaderMojoTest extends AbstractMojoTest<UpdateHeaderMojo> {
+
+ public static final String _LICENSE_TO_CHANGE_ = LicenseFilter.HEADER + " license to change " + LicenseFilter.FOOTER;
+ public static final String _MUST_BE_THERE = "// MUST BE THERE!";
+
+ @Override
+ protected String getGoalName(String methodName) {
+ return "update-header";
+ }
+
+ @Test
+ public void bug_28() throws Exception {
+
+ testPom(new String[]{_MUST_BE_THERE}, new String[]{});
+ }
+
+ @Test
+ public void java() throws Exception {
+
+ testPom(new String[]{_MUST_BE_THERE}, new String[]{_LICENSE_TO_CHANGE_});
+ }
+
+ @Test
+ public void xml() throws Exception {
+
+ testPom(new String[]{_MUST_BE_THERE}, new String[]{_LICENSE_TO_CHANGE_});
+ }
+
+ @Test
+ public void properties() throws Exception {
+
+ testPom(new String[]{_MUST_BE_THERE}, new String[]{_LICENSE_TO_CHANGE_});
+ }
+
+ public void testPom(String[] mandatoryPatterns, String[] excludePatterns) throws Exception {
+
+ UpdateHeaderMojo mojo = getMojo();
+
+ mojo.execute();
+
+ for (Entry<File, String[]> entry : mojo.filesToTreate.entrySet()) {
+ File src = entry.getKey();
+ for (String javaRelativePath : entry.getValue()) {
+ File f = new File(src, javaRelativePath);
+
+ assertTrue("generated file " + f + " was not found...", f.exists());
+
+ String content = PluginHelper.readAsString(f, "utf-8");
+
+ if (mojo.isVerbose()) {
+ mojo.getLog().info("check generated file " + f);
+ }
+ for (String p : mandatoryPatterns) {
+ checkPattern(content, p, true, f);
+ }
+ for (String p : excludePatterns) {
+ checkPattern(content, p, false, f);
+ }
+ }
+ }
+ }
+
+ protected void checkPattern(String content, String pattern, boolean required, File f) throws IOException {
+
+ String errorMessage = required ? "could not find the pattern : " : "should not have found pattern :";
+ assertEquals(errorMessage + pattern + " in file " + f, required, content.contains(pattern));
+ }
+}
Property changes on: trunk/src/test/java/org/nuiton/license/plugin/UpdateHeaderMojoTest.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL
Added: svn:mergeinfo
+
Deleted: trunk/src/test/java/org/nuiton/license/plugin/UpdateHeaderPluginTest.java
===================================================================
--- trunk/src/test/java/org/nuiton/license/plugin/UpdateHeaderPluginTest.java 2010-01-21 12:14:14 UTC (rev 1675)
+++ trunk/src/test/java/org/nuiton/license/plugin/UpdateHeaderPluginTest.java 2010-01-21 12:35:36 UTC (rev 1676)
@@ -1,105 +0,0 @@
-/*
- * *##%
- * Maven License Plugin
- * Copyright (C) 2008 - 2009 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>.
- * ##%*
- */
-package org.nuiton.license.plugin;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Map.Entry;
-import static org.junit.Assert.*;
-import org.junit.Test;
-
-import org.nuiton.processor.filters.LicenseFilter;
-import org.nuiton.plugin.PluginHelper;
-import org.nuiton.plugin.AbstractMojoTest;
-
-/** @author chemit */
-public class UpdateHeaderPluginTest extends AbstractMojoTest<UpdateHeaderPlugin> {
-
- public static final String _LICENSE_TO_CHANGE_ = LicenseFilter.HEADER + " license to change " + LicenseFilter.FOOTER;
- public static final String _MUST_BE_THERE = "// MUST BE THERE!";
-
- @Override
- protected String getGoalName(String methodName) {
- return "update-header";
- }
-
- @Test
- public void bug_28() throws Exception {
-
- testPom(new String[]{_MUST_BE_THERE}, new String[]{});
-
- }
-
- @Test
- public void java() throws Exception {
-
- testPom(new String[]{_MUST_BE_THERE}, new String[]{_LICENSE_TO_CHANGE_});
-
- }
-
- @Test
- public void xml() throws Exception {
-
- testPom(new String[]{_MUST_BE_THERE}, new String[]{_LICENSE_TO_CHANGE_});
-
- }
-
- @Test
- public void properties() throws Exception {
-
- testPom(new String[]{_MUST_BE_THERE}, new String[]{_LICENSE_TO_CHANGE_});
-
- }
-
- public void testPom(String[] mandatoryPatterns, String[] excludePatterns) throws Exception {
-
- UpdateHeaderPlugin mojo = getMojo();
-
- mojo.execute();
-
- for (Entry<File, String[]> entry : mojo.filesToTreate.entrySet()) {
- File src = entry.getKey();
- for (String javaRelativePath : entry.getValue()) {
- File f = new File(src, javaRelativePath);
-
- assertTrue("generated file " + f + " was not found...", f.exists());
-
- String content = PluginHelper.readAsString(f, "utf-8");
-
- if (mojo.isVerbose()) {
- mojo.getLog().info("check generated file " + f);
- }
- for (String p : mandatoryPatterns) {
- checkPattern(content, p, true, f);
- }
- for (String p : excludePatterns) {
- checkPattern(content, p, false, f);
- }
- }
- }
- }
-
- protected void checkPattern(String content, String pattern, boolean required, File f) throws IOException {
-
- String errorMessage = required ? "could not find the pattern : " : "should not have found pattern :";
- assertEquals(errorMessage + pattern + " in file " + f, required, content.contains(pattern));
- }
-}
1
0
r1675 - in trunk: . src/main/java/org/nuiton/license/plugin src/main/java/org/nuiton/license/plugin/header/generator
by tchemit@users.nuiton.org 21 Jan '10
by tchemit@users.nuiton.org 21 Jan '10
21 Jan '10
Author: tchemit
Date: 2010-01-21 13:14:14 +0100 (Thu, 21 Jan 2010)
New Revision: 1675
Modified:
trunk/pom.xml
trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFilePlugin.java
trunk/src/main/java/org/nuiton/license/plugin/GeneratorListPlugin.java
trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderPlugin.java
trunk/src/main/java/org/nuiton/license/plugin/header/generator/HeaderGenerator.java
trunk/src/main/java/org/nuiton/license/plugin/header/generator/PropertiesLicenseHeaderGeneratorImpl.java
Log:
- use pluginManagment from mavenpom
- clean code
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-01-19 17:34:02 UTC (rev 1674)
+++ trunk/pom.xml 2010-01-21 12:14:14 UTC (rev 1675)
@@ -328,22 +328,7 @@
<plugins>
<plugin>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-component-metadata</artifactId>
- <version>1.4.0</version>
- </plugin>
-
- <plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.3</version>
- <configuration>
- <encoding>${project.build.sourceEncoding}</encoding>
- </configuration>
- </plugin>
-
- <plugin>
<artifactId>maven-site-plugin</artifactId>
- <version>2.0.1</version>
<dependencies>
<dependency>
<groupId>org.nuiton.jrst</groupId>
Modified: trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFilePlugin.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFilePlugin.java 2010-01-19 17:34:02 UTC (rev 1674)
+++ trunk/src/main/java/org/nuiton/license/plugin/AddThirdPartyFilePlugin.java 2010-01-21 12:14:14 UTC (rev 1675)
@@ -103,7 +103,7 @@
*/
protected boolean keepBackup;
/**
- * Un flag pour farie une copie nommé dans META-INF (prefixe avec le nom de l'artifact).
+ * Un flag pour faire une copie nommé dans META-INF (prefixe avec le nom de l'artifact).
*
* @parameter expression="${helper.copyToMETA_INF}" default-value="false"
* @since 1.0.0
@@ -171,10 +171,6 @@
protected String thirdPartyFileContent;
protected File thirdPartyFile;
-// public AddThirdPartyFilePlugin() {
-// super("all files are up-to-date.");
-// }
-
@Override
protected boolean checkPackaging() {
return rejectPackaging(Packaging.pom);
@@ -183,7 +179,6 @@
@Override
protected void init() throws Exception {
-// protected boolean init() throws Exception {
doGenerate = true;
thirdPartyFile = new File(outputDirectory, thirdPartyFilename);
@@ -219,8 +214,6 @@
} else {
thirdPartyFileContent = PluginHelper.readAsString(thirdPartyFile, encoding);
}
-
-// return true;
}
@Override
@@ -234,7 +227,6 @@
getLog().info("backup " + thirdPartyFile);
}
backupFile(thirdPartyFile);
-// thirdPartyFile.renameTo(new File(thirdPartyFile.getAbsolutePath() + '~'));
}
writeFile(thirdPartyFile, thirdPartyFileContent, encoding);
}
@@ -242,7 +234,6 @@
copyFile(thirdPartyFile, new File(outputDirectory, "META-INF" + File.separator + project.getArtifactId() + "-" + thirdPartyFile.getName()));
}
addResourceDir(outputDirectory,"**/*.txt");
-// addResourceDir(outputDirectory.getAbsolutePath());
}
/** @return resolve the dependency tree */
Modified: trunk/src/main/java/org/nuiton/license/plugin/GeneratorListPlugin.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/GeneratorListPlugin.java 2010-01-19 17:34:02 UTC (rev 1674)
+++ trunk/src/main/java/org/nuiton/license/plugin/GeneratorListPlugin.java 2010-01-21 12:14:14 UTC (rev 1675)
@@ -20,7 +20,6 @@
*/
package org.nuiton.license.plugin;
-import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import org.apache.maven.plugin.AbstractMojo;
@@ -60,7 +59,7 @@
public void execute() throws MojoExecutionException, MojoFailureException {
// display it
- StringBuilder buffer = new StringBuilder('\n');
+ StringBuilder buffer = new StringBuilder("\n");
buffer.append("\n\n-------------------------------------------------------------------------------\n");
buffer.append(" maven-license-plugin\n");
buffer.append("-------------------------------------------------------------------------------\n\n");
@@ -68,9 +67,8 @@
buffer.append("No generator found.\n\n");
} else {
buffer.append("List of available generators :\n\n");
- Iterator<Entry<String, HeaderGenerator>> itr = _generators.entrySet().iterator();
- while (itr.hasNext()) {
- Entry<String, HeaderGenerator> e = itr.next();
+ for (Entry<String, HeaderGenerator> stringHeaderGeneratorEntry : _generators.entrySet()) {
+ Entry<String, HeaderGenerator> e = stringHeaderGeneratorEntry;
HeaderGenerator generator = e.getValue();
buffer.append(" - ").append(e.getKey()).append(" : ").append(generator.getDescription());
buffer.append("\n");
Modified: trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderPlugin.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderPlugin.java 2010-01-19 17:34:02 UTC (rev 1674)
+++ trunk/src/main/java/org/nuiton/license/plugin/UpdateHeaderPlugin.java 2010-01-21 12:14:14 UTC (rev 1675)
@@ -234,10 +234,6 @@
*/
protected long timestamp;
-// public UpdateHeaderPlugin() {
-// super("all files are up-to-date.");
-// }
-
@Override
public boolean isVerbose() {
return verbose;
@@ -278,7 +274,6 @@
@Override
public void init() throws Exception {
-// public boolean init() throws Exception {
if (skipUpdateHeader) {
return;
@@ -288,8 +283,6 @@
if (_generators == null) {
// should never happen...
throw new MojoExecutionException("no header generator found");
-// getLog().warn("no header generator found");
-// return false;
}
if (verbose) {
for (Entry<String, HeaderGenerator> stringHeaderGeneratorEntry : _generators.entrySet()) {
@@ -300,8 +293,6 @@
if (!_generators.containsKey(generatorName.trim())) {
throw new MojoExecutionException("the generator named '" + generatorName + "' is unknown (use generator-list goal to see all of them)");
-// getLog().warn("the generator named '" + generatorName + "' is unknown (use generator-list goal to see all of them)");
-// return false;
}
HeaderGenerator generator = _generators.get(generatorName);
@@ -316,7 +307,6 @@
if (filesToTreate.isEmpty()) {
return;
}
-// if (!filesToTreate.isEmpty()) {
File templateFile = new File(template);
@@ -341,24 +331,10 @@
getLog().info("config - header to use\n" + boxedLicenseHeaderContent);
}
-// } else {
-// getLog().info("no file to treate.");
-// }
-
-// return true;
}
@Override
protected void doAction() throws Exception {
-// if (skipUpdateHeader) {
-// getLog().info("skip flag is on, the goal is skip.");
-// return;
-// }
-//
-// if (filesToTreate.isEmpty()) {
-// getLog().info("No file to treate.");
-// return;
-// }
// create a licence processor with given header
LicenseProcessor p = new LicenseProcessor(licenseHeaderContent);
@@ -399,21 +375,17 @@
getLog().debug("backup original file " + file);
}
renameFile(file, backupFile);
-// file.renameTo(backupFile);
}
if (dryRun) {
deleteFile(processFile);
-// processFile.delete();
} else {
renameFile(processFile, file);
-// processFile.renameTo(file);
}
} catch (Exception e) {
getLog().warn("skip file " + file + " (could not process for reason : " + e.getMessage() + ")");
deleteFile(processFile);
-// processFile.delete();
} finally {
// toujours cleaner les états du filtre du processeur
p.getLicenceFilter().reset();
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/generator/HeaderGenerator.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/generator/HeaderGenerator.java 2010-01-19 17:34:02 UTC (rev 1674)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/generator/HeaderGenerator.java 2010-01-21 12:14:14 UTC (rev 1675)
@@ -63,7 +63,7 @@
*
* @param content
* @return the prefix content
- * @throws IOException
+ * @throws IOException if any io exceptions
*/
String prefixContent(String content) throws IOException;
Modified: trunk/src/main/java/org/nuiton/license/plugin/header/generator/PropertiesLicenseHeaderGeneratorImpl.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/header/generator/PropertiesLicenseHeaderGeneratorImpl.java 2010-01-19 17:34:02 UTC (rev 1674)
+++ trunk/src/main/java/org/nuiton/license/plugin/header/generator/PropertiesLicenseHeaderGeneratorImpl.java 2010-01-21 12:14:14 UTC (rev 1675)
@@ -38,7 +38,7 @@
public static final String PREFIX = "#";
public PropertiesLicenseHeaderGeneratorImpl() {
- super("#", LINE, LINE, LicenseFilter.HEADER, LicenseFilter.FOOTER);
+ super(PREFIX, LINE, LINE, LicenseFilter.HEADER, LicenseFilter.FOOTER);
}
@Override
1
0
Author: tchemit
Date: 2010-01-19 18:34:02 +0100 (Tue, 19 Jan 2010)
New Revision: 1674
Modified:
trunk/pom.xml
Log:
Utilisation de mavenpom4redmine 2.0.2
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-01-17 20:14:48 UTC (rev 1673)
+++ trunk/pom.xml 2010-01-19 17:34:02 UTC (rev 1674)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>mavenpom4redmine</artifactId>
- <version>2.0.1</version>
+ <version>2.0.2</version>
</parent>
<artifactId>maven-license-plugin</artifactId>
1
0
Author: tchemit
Date: 2010-01-17 21:14:48 +0100 (Sun, 17 Jan 2010)
New Revision: 1673
Modified:
trunk/pom.xml
Log:
Utilisation de mavenpom4redmine 2.0.1
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-01-10 23:44:29 UTC (rev 1672)
+++ trunk/pom.xml 2010-01-17 20:14:48 UTC (rev 1673)
@@ -1,6 +1,5 @@
<?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">
+<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>
@@ -11,7 +10,7 @@
<parent>
<groupId>org.nuiton</groupId>
<artifactId>mavenpom4redmine</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>2.0.1</version>
</parent>
<artifactId>maven-license-plugin</artifactId>
1
0
Author: tchemit
Date: 2010-01-11 00:44:29 +0100 (Mon, 11 Jan 2010)
New Revision: 1672
Modified:
trunk/pom.xml
Log:
use mavenpom4redmine
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-01-07 04:38:38 UTC (rev 1671)
+++ trunk/pom.xml 2010-01-10 23:44:29 UTC (rev 1672)
@@ -10,8 +10,8 @@
<parent>
<groupId>org.nuiton</groupId>
- <artifactId>mavenpom</artifactId>
- <version>1.1.4</version>
+ <artifactId>mavenpom4redmine</artifactId>
+ <version>2.0-SNAPSHOT</version>
</parent>
<artifactId>maven-license-plugin</artifactId>
@@ -297,8 +297,6 @@
<build>
- <defaultGoal>install</defaultGoal>
-
<plugins>
<!-- expose new plexus components -->
1
0
r1671 - trunk/src/test/resources/org/nuiton/license/plugin/addLicenseFilePluginTest
by tchemit@users.nuiton.org 07 Jan '10
by tchemit@users.nuiton.org 07 Jan '10
07 Jan '10
Author: tchemit
Date: 2010-01-07 05:38:38 +0100 (Thu, 07 Jan 2010)
New Revision: 1671
Modified:
trunk/src/test/resources/org/nuiton/license/plugin/addLicenseFilePluginTest/testOne.xml
trunk/src/test/resources/org/nuiton/license/plugin/addLicenseFilePluginTest/testTwo.xml
Log:
fix test failed
Modified: trunk/src/test/resources/org/nuiton/license/plugin/addLicenseFilePluginTest/testOne.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/addLicenseFilePluginTest/testOne.xml 2010-01-07 04:23:57 UTC (rev 1670)
+++ trunk/src/test/resources/org/nuiton/license/plugin/addLicenseFilePluginTest/testOne.xml 2010-01-07 04:38:38 UTC (rev 1671)
@@ -17,7 +17,6 @@
<licenseName>lgpl_v3</licenseName>
<licenseFile>licenseOne.txt</licenseFile>
<!--<outputDirectory>test</outputDirectory>-->
- <force>true</force>
<verbose>true</verbose>
</configuration>
<executions>
Modified: trunk/src/test/resources/org/nuiton/license/plugin/addLicenseFilePluginTest/testTwo.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/addLicenseFilePluginTest/testTwo.xml 2010-01-07 04:23:57 UTC (rev 1670)
+++ trunk/src/test/resources/org/nuiton/license/plugin/addLicenseFilePluginTest/testTwo.xml 2010-01-07 04:38:38 UTC (rev 1671)
@@ -18,7 +18,6 @@
<encoding>UTF-8</encoding>
<licenseName>lgpl_v3</licenseName>
<licenseFile>licenseTwo.txt</licenseFile>
- <force>true</force>
<!--<outputDirectory>test</outputDirectory>-->
<verbose>true</verbose>
</configuration>
1
0
r1670 - in trunk: . src/main/java/org/nuiton/license/plugin src/site src/test/resources/org/nuiton/license/plugin/addLicenseFilePluginTest
by tchemit@users.nuiton.org 07 Jan '10
by tchemit@users.nuiton.org 07 Jan '10
07 Jan '10
Author: tchemit
Date: 2010-01-07 05:23:57 +0100 (Thu, 07 Jan 2010)
New Revision: 1670
Added:
trunk/src/site/site_en.xml
Removed:
trunk/src/site/site.xml
Modified:
trunk/pom.xml
trunk/src/main/java/org/nuiton/license/plugin/GeneratorListPlugin.java
trunk/src/main/java/org/nuiton/license/plugin/LicenseListPlugin.java
trunk/src/test/resources/org/nuiton/license/plugin/addLicenseFilePluginTest/testOne.xml
trunk/src/test/resources/org/nuiton/license/plugin/addLicenseFilePluginTest/testTwo.xml
Log:
Evolution #192: Use mavenpom
Evolution #193: Use maven-helper-plugin 1.2.0 with revisited AbstractPlugin api
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-01-01 17:27:34 UTC (rev 1669)
+++ trunk/pom.xml 2010-01-07 04:23:57 UTC (rev 1670)
@@ -8,7 +8,12 @@
<!-- *** POM Relationships *************************************** -->
<!-- ************************************************************* -->
- <groupId>org.nuiton</groupId>
+ <parent>
+ <groupId>org.nuiton</groupId>
+ <artifactId>mavenpom</artifactId>
+ <version>1.1.4</version>
+ </parent>
+
<artifactId>maven-license-plugin</artifactId>
<version>2.0.1-SNAPSHOT</version>
@@ -250,19 +255,6 @@
<inceptionYear>2008</inceptionYear>
<url>http://maven-site.nuiton.org/maven-license-plugin</url>
- <organization>
- <name>CodeLutin</name>
- <url>http://www.codelutin.com/</url>
- </organization>
-
- <licenses>
- <license>
- <name>Lesser General Public License (LGPL)</name>
- <url>${project.basedir}/LICENSE.txt</url>
- <distribution>local</distribution>
- </license>
- </licenses>
-
<developers>
<developer>
@@ -281,32 +273,6 @@
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
- <mailingLists>
- <mailingList>
- <name>maven-license-plugin-commits</name>
- <subscribe>http://list.nuiton.org/cgi-bin/mailman/listinfo/maven-license-plugin-commits</subscribe>
- <unsubscribe>http://list.nuiton.org/cgi-bin/mailman/listinfo/maven-license-plugin-commits</unsubscribe>
- <post>maven-license-plugin-commits(a)list.nuiton.org</post>
- <archive>http://list.nuiton.org/pipermail/maven-license-plugin-commits/</archive>
- </mailingList>
-
- <mailingList>
- <name>maven-license-plugin-devel</name>
- <subscribe>http://list.nuiton.org/cgi-bin/mailman/listinfo/maven-license-plugin-devel</subscribe>
- <unsubscribe>http://list.nuiton.org/cgi-bin/mailman/listinfo/maven-license-plugin-devel</unsubscribe>
- <post>maven-license-plugin-devel(a)list.nuiton.org</post>
- <archive>http://list.nuiton.org/pipermail/maven-license-plugin-devel/</archive>
- </mailingList>
-
- <mailingList>
- <name>maven-license-plugin-users</name>
- <subscribe>http://list.nuiton.org/cgi-bin/mailman/listinfo/maven-license-plugin-users</subscribe>
- <unsubscribe>http://list.nuiton.org/cgi-bin/mailman/listinfo/maven-license-plugin-users</unsubscribe>
- <post>maven-license-plugin-users(a)list.nuiton.org</post>
- <archive>http://list.nuiton.org/pipermail/maven-license-plugin-users/</archive>
- </mailingList>
- </mailingLists>
-
<!-- Source control management. -->
<scm>
<connection>scm:svn:http://svn.nuiton.org/svn/maven-license-plugin/trunk</connection>
@@ -314,31 +280,6 @@
<url>http://www.nuiton.org/repositories/browse/maven-license-plugin/trunk</url>
</scm>
- <issueManagement>
- <system>Redmine</system>
- <url>http://www.nuiton.org/projects/maven-license-plugin/issues/</url>
- </issueManagement>
-
- <distributionManagement>
- <repository>
- <id>nuiton</id>
- <url>scpexe://nuiton.org/var/lib/maven/release</url>
- </repository>
- <snapshotRepository>
- <id>nuiton</id>
- <url>scpexe://nuiton.org/var/lib/maven/snapshot</url>
- </snapshotRepository>
- <site>
- <id>nuiton</id>
- <url>scpexe://nuiton.org/var/lib/redmine-nuiton/project-site/maven-license-plugin</url>
- </site>
- </distributionManagement>
-
- <ciManagement>
- <system>hudson</system>
- <url>http://hudson.nuiton.org/hudson/job/maven-license-plugin</url>
- </ciManagement>
-
<!-- ************************************************************* -->
<!-- *** Build Settings ****************************************** -->
<!-- ************************************************************* -->
@@ -347,55 +288,11 @@
<properties>
- <platform>nuiton.org</platform>
+ <processor.version>1.0.2</processor.version>
- <!-- a proprerty to define the id of the project, in a multi-module
- project, you must use a hard-cored value, otherwise for modules
- the artifactId will be expanded , otherwise, no need to override it
- -->
- <projectId>${project.artifactId}</projectId>
-
- <!-- a property to define list id -->
- <listId>${projectId}</listId>
-
- <maven.src.dir>${basedir}/src</maven.src.dir>
- <maven.compile.source>1.6</maven.compile.source>
- <maven.compile.target>1.6</maven.compile.target>
-
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
-
- <maven.test.skip>false</maven.test.skip>
-
- <!-- to activate generation of reports and javadoc when doing a site -->
- <maven.reports.generate>true</maven.reports.generate>
-
- <license.licenseName>lgpl_v3</license.licenseName>
-
- <repository.home.url>http://maven.nuiton.org/release</repository.home.url>
-
- <helper.version>1.2.0-SNAPSHOT</helper.version>
- <jredmine.version>1.0.0</jredmine.version>
- <processor.version>1.0.1</processor.version>
- <jrst.version>1.0.0</jrst.version>
-
- <maven.version>2.2.1</maven.version>
- <!-- javadoc 2.6 ne fonctionne pas avec doxia-jrst + maven-helper-plugin -->
- <javadoc.version>2.5</javadoc.version>
-
- <!-- redmine configuration -->
- <redmine.safe>false</redmine.safe>
- <redmine.url>http://www.${platform}</redmine.url>
- <redmine.serverId>redmine-${platform}</redmine.serverId>
- <redmine.projectId>maven-license-plugin</redmine.projectId>
- <redmine.xmlPath>target/generated-sources/changes/changes.xml</redmine.xmlPath>
- <redmine.issueLinkTemplate>${redmine.url}/issues/show/%ISSUE%</redmine.issueLinkTemplate>
- <redmine.versionLinkTemplate>${redmine.url}/versions/show/%VERSION%</redmine.versionLinkTemplate>
- <redmine.collectedFiles>target/collect.properties</redmine.collectedFiles>
-
- <!-- extra files to include in release -->
- <redmine.releaseFiles/>
-
+ <!-- documention is in english -->
+ <maven.site.locales>en</maven.site.locales>
+
</properties>
<build>
@@ -448,296 +345,8 @@
</plugin>
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.0.2</version>
- <configuration>
- <source>${maven.compile.source}</source>
- <target>${maven.compile.target}</target>
- <encoding>${project.build.sourceEncoding}</encoding>
- </configuration>
- </plugin>
-
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.4.3</version>
- <configuration>
- <skip>${maven.test.skip}</skip>
- </configuration>
- </plugin>
-
- <plugin>
- <artifactId>maven-source-plugin</artifactId>
- <version>2.1</version>
- </plugin>
-
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.3</version>
- </plugin>
-
- <plugin>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>${javadoc.version}</version>
- <configuration>
- <docencoding>${project.reporting.outputEncoding}</docencoding>
- <encoding>${project.reporting.outputEncoding}</encoding>
- <charset>${project.reporting.outputEncoding}</charset>
- <quiet>true</quiet>
- <!-- uniquement a partir de javadoc 2.5 -->
- <!--skip>${maven.javadoc.skip}</skip-->
- <taglets>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoAggregatorTypeTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoComponentFieldTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoConfiguratorTypeTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoExecuteTypeTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoExecutionStrategyTypeTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoGoalTypeTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoInheritByDefaultTypeTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoInstantiationStrategyTypeTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoParameterFieldTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoPhaseTypeTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoReadOnlyFieldTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoRequiredFieldTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoRequiresDependencyResolutionTypeTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoRequiresDirectInvocationTypeTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoRequiresOnLineTypeTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoRequiresProjectTypeTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoRequiresReportsTypeTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
-
- <taglet>
- <tagletClass>
- org.codehaus.plexus.javadoc.PlexusComponentTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-component-javadoc
- </artifactId>
- <version>1.3.0</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.codehaus.plexus.javadoc.PlexusConfigurationTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-component-javadoc
- </artifactId>
- <version>1.3.0</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.codehaus.plexus.javadoc.PlexusRequirementTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-component-javadoc
- </artifactId>
- <version>1.3.0</version>
- </tagletArtifact>
- </taglet>
- </taglets>
- </configuration>
- </plugin>
-
- <plugin>
<artifactId>maven-site-plugin</artifactId>
<version>2.0.1</version>
- <configuration>
- <locales>fr</locales>
- <siteDirectory>src/site</siteDirectory>
- <inputEncoding>${project.reporting.outputEncoding}</inputEncoding>
- <outputEncoding>${project.reporting.outputEncoding}</outputEncoding>
- <generateReports>${maven.reports.generate}</generateReports>
- </configuration>
<dependencies>
<dependency>
<groupId>org.nuiton.jrst</groupId>
@@ -753,33 +362,6 @@
</dependencies>
</plugin>
- <plugin>
- <artifactId>maven-release-plugin</artifactId>
- <version>2.0-beta-9</version>
- </plugin>
-
- <plugin>
- <artifactId>maven-plugin-plugin</artifactId>
- <version>2.5.1</version>
- </plugin>
-
- <plugin>
- <artifactId>maven-invoker-plugin</artifactId>
- <version>1.3</version>
- </plugin>
-
- <plugin>
- <groupId>org.nuiton</groupId>
- <artifactId>maven-helper-plugin</artifactId>
- <version>${helper.version}</version>
- </plugin>
-
- <plugin>
- <groupId>org.nuiton.jredmine</groupId>
- <artifactId>maven-jredmine-plugin</artifactId>
- <version>${jredmine.version}</version>
- </plugin>
-
</plugins>
</pluginManagement>
@@ -787,359 +369,12 @@
<reporting>
<plugins>
- <!-- The Project Info Reports Plugin has twelve goals:
- see http://maven.apache.org/plugins/maven-project-info-reports-plugin
- -->
- <plugin>
- <artifactId>maven-project-info-reports-plugin</artifactId>
- <version>2.1.2</version>
- <configuration>
- <dependencyDetailsEnabled>${maven.reports.dependencyDetailsEnabled}</dependencyDetailsEnabled>
- <dependencyLocationsEnabled>${maven.reports.dependencyLocationsEnabled}</dependencyLocationsEnabled>
- </configuration>
- <reportSets>
- <reportSet>
- <reports>
- <report>project-team</report>
- <report>mailing-list</report>
- <report>cim</report>
- <report>issue-tracking</report>
- <report>license</report>
- <report>scm</report>
- <report>dependencies</report>
- <report>dependency-convergence</report>
- <report>plugin-management</report>
- <report>plugins</report>
- <report>dependency-management</report>
- <report>summary</report>
- </reports>
- </reportSet>
- </reportSets>
- </plugin>
<plugin>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>${javadoc.version}</version>
- <configuration>
- <quiet>true</quiet>
- <!--<skip>true</skip>-->
- <docencoding>${project.build.sourceEncoding}</docencoding>
- <encoding>${project.build.sourceEncoding}</encoding>
- <charset>${project.reporting.outputEncoding}</charset>
- <excludePackageNames>${maven.javadoc.excludePackageNames}</excludePackageNames>
- <taglets>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoAggregatorTypeTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoComponentFieldTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoConfiguratorTypeTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoExecuteTypeTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoExecutionStrategyTypeTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoGoalTypeTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoInheritByDefaultTypeTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoInstantiationStrategyTypeTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoParameterFieldTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoPhaseTypeTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoReadOnlyFieldTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoRequiredFieldTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoRequiresDependencyResolutionTypeTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoRequiresDirectInvocationTypeTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoRequiresOnLineTypeTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoRequiresProjectTypeTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.apache.maven.tools.plugin.javadoc.MojoRequiresReportsTypeTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.apache.maven.plugin-tools
- </groupId>
- <artifactId>maven-plugin-tools-javadoc
- </artifactId>
- <version>2.5.1</version>
- </tagletArtifact>
- </taglet>
-
- <taglet>
- <tagletClass>
- org.codehaus.plexus.javadoc.PlexusComponentTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-component-javadoc
- </artifactId>
- <version>1.3.0</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.codehaus.plexus.javadoc.PlexusConfigurationTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-component-javadoc
- </artifactId>
- <version>1.3.0</version>
- </tagletArtifact>
- </taglet>
- <taglet>
- <tagletClass>
- org.codehaus.plexus.javadoc.PlexusRequirementTaglet
- </tagletClass>
- <tagletArtifact>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-component-javadoc
- </artifactId>
- <version>1.3.0</version>
- </tagletArtifact>
- </taglet>
- </taglets>
- </configuration>
- <reportSets>
- <reportSet>
- <reports>
- <report>javadoc</report>
- <report>test-javadoc</report>
- </reports>
- </reportSet>
- </reportSets>
- </plugin>
-
- <!-- changelog:changelog
- changelog:dev-activity
- changelog:file-activity -->
- <plugin>
- <artifactId>maven-changelog-plugin</artifactId>
- <version>2.1</version>
- </plugin>
-
- <!-- Implicit add of reportSet to not generate jira reports -->
- <plugin>
- <artifactId>maven-changes-plugin</artifactId>
- <version>2.2</version>
- <configuration>
- <issueLinkTemplatePerSystem>
- <redmine>${redmine.issueLinkTemplate}</redmine>
- </issueLinkTemplatePerSystem>
- <xmlPath>${redmine.xmlPath}</xmlPath>
- </configuration>
- <reportSets>
- <reportSet>
- <reports>
- <report>changes-report</report>
- </reports>
- </reportSet>
- </reportSets>
- </plugin>
-
- <plugin>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>2.3</version>
- <configuration>
- <encoding>${project.reporting.outputEncoding}</encoding>
- </configuration>
- </plugin>
-
- <plugin>
- <artifactId>maven-pmd-plugin</artifactId>
- <version>2.4</version>
- <configuration>
- <linkXRef>true</linkXRef>
- <sourceEncoding>${project.reporting.outputEncoding}</sourceEncoding>
- <minimumTokens>100</minimumTokens>
- <targetJdk>${maven.compile.target}</targetJdk>
- </configuration>
-
- </plugin>
-
- <plugin>
- <artifactId>maven-jxr-plugin</artifactId>
- <version>2.1</version>
- </plugin>
-
- <plugin>
- <artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.4.3</version>
- </plugin>
-
- <plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>2.5.1</version>
</plugin>
-
+
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
@@ -1150,340 +385,7 @@
</reporting>
<profiles>
- <!-- perform only on a release stage when using the maven-release-plugin -->
- <profile>
- <id>release-profile</id>
- <activation>
- <property>
- <name>performRelease</name>
- <value>true</value>
- </property>
- </activation>
- <build>
- <plugins>
-
- <!-- add license and third-party files to build -->
- <plugin>
- <groupId>org.nuiton</groupId>
- <artifactId>maven-license-plugin</artifactId>
- <version>2.0.0</version>
- <executions>
- <execution>
- <id>attach-licenses</id>
- <goals>
- <goal>add-license</goal>
- <goal>add-third-party</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <!-- always compute source jar -->
- <plugin>
- <artifactId>maven-source-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-sources</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <!-- always compute javadoc jar -->
- <plugin>
- <artifactId>maven-javadoc-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-javadocs</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- </plugins>
- </build>
- </profile>
-
- <!-- perform only on a release stage when using the maven-release-plugin -->
- <profile>
- <id>redmine-pre-release-profile</id>
- <activation>
- <property>
- <name>performRelease</name>
- <value>true</value>
- </property>
- </activation>
- <properties>
- <redmine.safe>true</redmine.safe>
- </properties>
-
- <reporting>
- <plugins>
-
- <plugin>
- <groupId>org.nuiton.jredmine</groupId>
- <artifactId>maven-jredmine-plugin</artifactId>
- <version>${jredmine.version}</version>
- <configuration>
- <columnNames>key,summary,status,assignee,tracker,priority,version,category,createdOn
- </columnNames>
- </configuration>
- <reportSets>
- <reportSet>
- <reports>
- <report>issues-report</report>
- </reports>
- </reportSet>
- </reportSets>
- </plugin>
-
- </plugins>
- </reporting>
- <build>
-
- <plugins>
-
- <!--
- - obtain redmine login
- - collect files for jredmine release
- -->
- <plugin>
- <groupId>org.nuiton</groupId>
- <artifactId>maven-helper-plugin</artifactId>
- <executions>
- <execution>
- <id>get-redmine-login</id>
- <goals>
- <goal>share-server-secret</goal>
- </goals>
- <phase>initialize</phase>
- <configuration>
- <serverId>redmine-${platform}</serverId>
- <passwordOut>redmine.password</passwordOut>
- <usernameOut>redmine.username</usernameOut>
- </configuration>
- </execution>
- <execution>
- <id>get-redmine-login-site</id>
- <goals>
- <goal>share-server-secret</goal>
- </goals>
- <phase>pre-site</phase>
- <configuration>
- <serverId>redmine-${platform}</serverId>
- <passwordOut>redmine.password</passwordOut>
- <usernameOut>redmine.username</usernameOut>
- </configuration>
- </execution>
- <execution>
- <id>collect-files</id>
- <goals>
- <goal>collect-files</goal>
- </goals>
- <phase>install</phase>
- <configuration>
- <extraFiles>${redmine.releaseFiles}</extraFiles>
- <descriptionFile>${redmine.collectedFiles}</descriptionFile>
- <!--<copyFiles>false</copyFiles>-->
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <!-- generate the changes.xml from redmine -->
- <plugin>
- <groupId>org.nuiton.jredmine</groupId>
- <artifactId>maven-jredmine-plugin</artifactId>
- <executions>
- <execution>
- <id>jredmine-generate</id>
- <goals>
- <goal>generate-changes</goal>
- <goal>generate-news-announcement</goal>
- <goal>generate-email-announcement</goal>
- </goals>
- <phase>process-classes</phase>
- </execution>
- </executions>
- <configuration>
-
- <!-- generate-changes -->
- <generateOnce>true</generateOnce>
- <actionMapping>fix:1, add:2</actionMapping>
- <statusIds>3,4,5</statusIds>
-
- <!-- generate announcements -->
- <urlDownload>${redmine.url}/projects/list_files/${projectId}</urlDownload>
-
- <!--<changesTitle>Release note of Maven pom project</changesTitle>-->
- <!--<releaseDescription>Description of first release</releaseDescription>-->
- <!--<verbose>true</verbose>-->
- </configuration>
- </plugin>
-
- </plugins>
-
- </build>
- </profile>
-
- <!-- perform a redmine release after a successfull release -->
- <profile>
- <id>redmine-release-profile</id>
- <activation>
- <property>
- <name>performRedmineRelease</name>
- <value>true</value>
- </property>
- </activation>
-
- <properties>
- <dryRun>true</dryRun>
- <redmine.dryRun>${dryRun}</redmine.dryRun>
- </properties>
- <build>
-
- <plugins>
-
-
- <!--
- - obtain redmine login
- - send release email
- -->
- <plugin>
- <groupId>org.nuiton</groupId>
- <artifactId>maven-helper-plugin</artifactId>
- <executions>
- <execution>
- <id>get-redmine-login</id>
- <goals>
- <goal>share-server-secret</goal>
- </goals>
- <phase>validate</phase>
- <configuration>
- <serverId>redmine-${platform}</serverId>
- <passwordOut>redmine.password</passwordOut>
- <usernameOut>redmine.username</usernameOut>
- </configuration>
- </execution>
- <execution>
- <id>send-release-email</id>
- <goals>
- <goal>send-email</goal>
- </goals>
- <phase>validate</phase>
- </execution>
- </executions>
- <configuration>
-
- <!-- for a multi-module just run on root project -->
- <runOnce>true</runOnce>
-
- <emailTitle>[ANNOUNCEMENT] - ${project.name} ${project.version} released</emailTitle>
- <emailContentFile>target/generated-sources/announcement/release-email-announcement.vm
- </emailContentFile>
- <mailSender>
- <name>${platform} Release Notification</name>
- <email>noreply@${platform}</email>
- </mailSender>
- <toAddresses>
- <item>${listId}-users(a)list.${platform}</item>
- <item>${listId}-devel(a)list.${platform}</item>
- <item>dev(a)codelutin.com</item>
- </toAddresses>
- <smtpHost>smtp</smtpHost>
- </configuration>
- </plugin>
-
- <!--
- - update version in redmine
- - publish release files to redmine
- - publish a release news in redmine
- -->
- <plugin>
- <groupId>org.nuiton.jredmine</groupId>
- <artifactId>maven-jredmine-plugin</artifactId>
- <executions>
- <execution>
- <id>jredmine-release</id>
- <goals>
- <goal>update-version</goal>
- <goal>publish-attachments</goal>
- <goal>publish-news</goal>
- </goals>
- <phase>validate</phase>
- </execution>
- </executions>
- <configuration>
-
- <!-- for a multi-module just run on root project -->
- <runOnce>true</runOnce>
-
- <!-- update-version -->
- <closeVersion>true</closeVersion>
-
- <!-- publish-attachments -->
- <filesFromProperties>${redmine.collectedFiles}</filesFromProperties>
-
- <!-- publish-news -->
- <newsContentFile>target/generated-sources/announcement/release-news-announcement.vm
- </newsContentFile>
- <newsSummary>${project.description}</newsSummary>
- <newsTitle>${project.name} ${project.version} released</newsTitle>
-
- </configuration>
- </plugin>
-
- </plugins>
-
- </build>
- </profile>
-
- <!-- do not execute tests (generaly a bad idea...) -->
- <profile>
- <id>notests</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <properties>
- <maven.test.skip>true</maven.test.skip>
- </properties>
- </profile>
- <!-- do not build reports (speedup site generation in dev) -->
- <profile>
- <id>noreports</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <properties>
- <maven.reports.generate>false</maven.reports.generate>
- </properties>
- </profile>
- <!-- do not build dependencies detail in maven-project-info-report (speedup site generation in dev) -->
- <profile>
- <id>nodepdetails</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <properties>
- <maven.reports.dependencyDetailsEnabled>false</maven.reports.dependencyDetailsEnabled>
- </properties>
- </profile>
- <!-- do not build locations of dependencies in maven-project-info-report (speedup site generation in dev) -->
- <profile>
- <id>nodeplocations</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <properties>
- <maven.reports.dependencyLocationsEnabled>false</maven.reports.dependencyLocationsEnabled>
- </properties>
- </profile>
-
<!--profile>
<id>run-its</id>
<build>
Modified: trunk/src/main/java/org/nuiton/license/plugin/GeneratorListPlugin.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/GeneratorListPlugin.java 2010-01-01 17:27:34 UTC (rev 1669)
+++ trunk/src/main/java/org/nuiton/license/plugin/GeneratorListPlugin.java 2010-01-07 04:23:57 UTC (rev 1670)
@@ -29,7 +29,7 @@
import org.nuiton.license.plugin.header.generator.HeaderGenerator;
/**
- * The goal display all the knwon generators.
+ * Displays all the available generators.
*
* @author chemit
*
Modified: trunk/src/main/java/org/nuiton/license/plugin/LicenseListPlugin.java
===================================================================
--- trunk/src/main/java/org/nuiton/license/plugin/LicenseListPlugin.java 2010-01-01 17:27:34 UTC (rev 1669)
+++ trunk/src/main/java/org/nuiton/license/plugin/LicenseListPlugin.java 2010-01-07 04:23:57 UTC (rev 1670)
@@ -31,7 +31,7 @@
import org.nuiton.license.plugin.repository.LicenseRepositoryFactory;
/**
- * Le goal pour afficher dans la console les differentes licenses connues.
+ * Display all available licenses.
*
* @author chemit
* @goal license-list
Deleted: trunk/src/site/site.xml
===================================================================
--- trunk/src/site/site.xml 2010-01-01 17:27:34 UTC (rev 1669)
+++ trunk/src/site/site.xml 2010-01-07 04:23:57 UTC (rev 1670)
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="${project.name}">
-
- <publishDate format="dd/MM/yyyy"/>
-
- <skin>
- <groupId>org.nuiton</groupId>
- <artifactId>maven-nuiton-skin</artifactId>
- <version>1.0.0</version>
- </skin>
-
- <bannerLeft>
- <name>${project.name}</name>
- <href>index.html</href>
- </bannerLeft>
-
-
- <bannerRight>
- <src>http://www.codelutin.com/images/lutinorange-codelutin.png</src>
- <href>${project.organization.url}</href>
- </bannerRight>
-
- <poweredBy>
- <logo href="http://maven.apache.org" name="Maven" img="images/logos/maven-feather.png"/>
- <logo href="http://maven-nuiton.org/jrst" name="JRst" img="images/jrst-logo.png"/>
- <logo href="http://docutils.sourceforge.net/rst.html" name="ReStructuredText"
- img="images/restructuredtext-logo.png"/>
- </poweredBy>
-
- <body>
-
- <links>
- <item name="Chorem" href="http://www.chorem.org"/>
- <item name="Nuiton" href="http://www.nuiton.org"/>
- <item name="Labs" href="http://labs.libre-entreprise.org"/>
- <item name="${project.organization.name}" href="${project.organization.url}"/>
- <item name="Dépôt maven" href="${repository.home.url}"/>
- </links>
-
- <breadcrumbs>
- <item name="${project.name}" href="${project.url}" />
- </breadcrumbs>
-
- <menu name="Utilisateur">
- <item name="Introduction" href="index.html"/>
- <item name="Usage" href="usage.html"/>
- <item name="Goals" href="plugin-info.html">
- <item name="update-header" href="update-header-mojo.html"/>
- <item name="generator-list" href="generator-list-mojo.html"/>
- <item name="license-list" href="license-list-mojo.html"/>
- <item name="help" href="help-mojo.html"/>
- </item>
- </menu>
-
- <menu name="Téléchargement">
- <item href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}.jar"
- name="Librairie (jar)"/>
- <item href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}-javadoc.jar"
- name="Javadoc (jar)"/>
- <item href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}-sources.jar"
- name="Sources (jar)"/>
- </menu>
-
- <menu ref="reports"/>
-
- </body>
-</project>
Copied: trunk/src/site/site_en.xml (from rev 1669, trunk/src/site/site.xml)
===================================================================
--- trunk/src/site/site_en.xml (rev 0)
+++ trunk/src/site/site_en.xml 2010-01-07 04:23:57 UTC (rev 1670)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="${project.name}">
+
+ <bannerLeft>
+ <name>${project.name}</name>
+ <href>index.html</href>
+ </bannerLeft>
+
+ <poweredBy>
+ <logo href="http://maven.apache.org" name="Maven" img="images/logos/maven-feather.png"/>
+ <logo href="http://maven-nuiton.org/jrst" name="JRst" img="images/jrst-logo.png"/>
+ <logo href="http://docutils.sourceforge.net/rst.html" name="ReStructuredText"
+ img="images/restructuredtext-logo.png"/>
+ </poweredBy>
+
+ <body>
+
+ <breadcrumbs>
+ <item name="${project.name}" href="index.html" />
+ </breadcrumbs>
+
+ <menu name="User">
+ <item name="Introduction" href="index.html"/>
+ <item name="Usage" href="usage.html"/>
+ <item name="Goals" href="plugin-info.html">
+ <item name="add-license" href="add-license-mojo.html"/>
+ <item name="add-third-party" href="add-third-party-mojo.html"/>
+ <item name="update-header" href="update-header-mojo.html"/>
+ <item name="generator-list" href="generator-list-mojo.html"/>
+ <item name="license-list" href="license-list-mojo.html"/>
+ <item name="help" href="help-mojo.html"/>
+ </item>
+ </menu>
+
+ <menu name="Downloads">
+ <item href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}.jar"
+ name="Librairie (jar)"/>
+ <item href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}-javadoc.jar"
+ name="Javadoc (jar)"/>
+ <item href="${repository.home.url}/org/nuiton/${project.artifactId}/${project.version}/${project.build.finalName}-sources.jar"
+ name="Sources (jar)"/>
+ </menu>
+
+ <menu ref="reports"/>
+
+ </body>
+</project>
Modified: trunk/src/test/resources/org/nuiton/license/plugin/addLicenseFilePluginTest/testOne.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/addLicenseFilePluginTest/testOne.xml 2010-01-01 17:27:34 UTC (rev 1669)
+++ trunk/src/test/resources/org/nuiton/license/plugin/addLicenseFilePluginTest/testOne.xml 2010-01-07 04:23:57 UTC (rev 1670)
@@ -17,6 +17,7 @@
<licenseName>lgpl_v3</licenseName>
<licenseFile>licenseOne.txt</licenseFile>
<!--<outputDirectory>test</outputDirectory>-->
+ <force>true</force>
<verbose>true</verbose>
</configuration>
<executions>
Modified: trunk/src/test/resources/org/nuiton/license/plugin/addLicenseFilePluginTest/testTwo.xml
===================================================================
--- trunk/src/test/resources/org/nuiton/license/plugin/addLicenseFilePluginTest/testTwo.xml 2010-01-01 17:27:34 UTC (rev 1669)
+++ trunk/src/test/resources/org/nuiton/license/plugin/addLicenseFilePluginTest/testTwo.xml 2010-01-07 04:23:57 UTC (rev 1670)
@@ -18,6 +18,7 @@
<encoding>UTF-8</encoding>
<licenseName>lgpl_v3</licenseName>
<licenseFile>licenseTwo.txt</licenseFile>
+ <force>true</force>
<!--<outputDirectory>test</outputDirectory>-->
<verbose>true</verbose>
</configuration>
1
0
Author: tchemit
Date: 2010-01-01 18:27:34 +0100 (Fri, 01 Jan 2010)
New Revision: 1669
Modified:
trunk/pom.xml
Log:
update javadoc taglets
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-01-01 16:52:22 UTC (rev 1668)
+++ trunk/pom.xml 2010-01-01 17:27:34 UTC (rev 1669)
@@ -487,106 +487,147 @@
<!--skip>${maven.javadoc.skip}</skip-->
<taglets>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoAggregatorTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoAggregatorTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoComponentFieldTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoComponentFieldTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoConfiguratorTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoConfiguratorTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoExecuteTypeTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoExecuteTypeTaglet
+ </tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoExecutionStrategyTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoExecutionStrategyTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoGoalTypeTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoGoalTypeTaglet
+ </tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoInheritByDefaultTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoInheritByDefaultTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoInstantiationStrategyTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoInstantiationStrategyTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoParameterFieldTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoParameterFieldTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoPhaseTypeTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoPhaseTypeTaglet
+ </tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoReadOnlyFieldTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoReadOnlyFieldTaglet
+ </tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiredFieldTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoRequiredFieldTaglet
+ </tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -594,9 +635,11 @@
org.apache.maven.tools.plugin.javadoc.MojoRequiresDependencyResolutionTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -604,61 +647,81 @@
org.apache.maven.tools.plugin.javadoc.MojoRequiresDirectInvocationTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresOnLineTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoRequiresOnLineTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresProjectTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoRequiresProjectTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresReportsTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoRequiresReportsTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.codehaus.plexus.javadoc.PlexusComponentTaglet</tagletClass>
+ <tagletClass>
+ org.codehaus.plexus.javadoc.PlexusComponentTaglet
+ </tagletClass>
<tagletArtifact>
<groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-javadoc</artifactId>
- <version>1.0</version>
+ <artifactId>plexus-component-javadoc
+ </artifactId>
+ <version>1.3.0</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.codehaus.plexus.javadoc.PlexusConfigurationTaglet</tagletClass>
+ <tagletClass>
+ org.codehaus.plexus.javadoc.PlexusConfigurationTaglet
+ </tagletClass>
<tagletArtifact>
<groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-javadoc</artifactId>
- <version>1.0</version>
+ <artifactId>plexus-component-javadoc
+ </artifactId>
+ <version>1.3.0</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.codehaus.plexus.javadoc.PlexusRequirementTaglet</tagletClass>
+ <tagletClass>
+ org.codehaus.plexus.javadoc.PlexusRequirementTaglet
+ </tagletClass>
<tagletArtifact>
<groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-javadoc</artifactId>
- <version>1.0</version>
+ <artifactId>plexus-component-javadoc
+ </artifactId>
+ <version>1.3.0</version>
</tagletArtifact>
</taglet>
</taglets>
@@ -766,102 +829,147 @@
<excludePackageNames>${maven.javadoc.excludePackageNames}</excludePackageNames>
<taglets>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoAggregatorTypeTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoAggregatorTypeTaglet
+ </tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoComponentFieldTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoComponentFieldTaglet
+ </tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoConfiguratorTypeTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoConfiguratorTypeTaglet
+ </tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoExecuteTypeTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoExecuteTypeTaglet
+ </tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoExecutionStrategyTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoExecutionStrategyTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoGoalTypeTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoGoalTypeTaglet
+ </tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoInheritByDefaultTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoInheritByDefaultTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoInstantiationStrategyTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoInstantiationStrategyTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoParameterFieldTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoParameterFieldTaglet
+ </tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoPhaseTypeTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoPhaseTypeTaglet
+ </tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoReadOnlyFieldTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoReadOnlyFieldTaglet
+ </tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiredFieldTaglet</tagletClass>
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoRequiredFieldTaglet
+ </tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
@@ -869,70 +977,93 @@
org.apache.maven.tools.plugin.javadoc.MojoRequiresDependencyResolutionTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresDirectInvocationTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoRequiresDirectInvocationTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresOnLineTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoRequiresOnLineTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresProjectTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoRequiresProjectTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresReportsTypeTaglet
+ <tagletClass>
+ org.apache.maven.tools.plugin.javadoc.MojoRequiresReportsTypeTaglet
</tagletClass>
<tagletArtifact>
- <groupId>org.apache.maven.plugin-tools</groupId>
- <artifactId>maven-plugin-tools-javadoc</artifactId>
- <version>2.4.2</version>
+ <groupId>org.apache.maven.plugin-tools
+ </groupId>
+ <artifactId>maven-plugin-tools-javadoc
+ </artifactId>
+ <version>2.5.1</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.codehaus.plexus.javadoc.PlexusComponentTaglet</tagletClass>
+ <tagletClass>
+ org.codehaus.plexus.javadoc.PlexusComponentTaglet
+ </tagletClass>
<tagletArtifact>
<groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-javadoc</artifactId>
- <version>1.0</version>
+ <artifactId>plexus-component-javadoc
+ </artifactId>
+ <version>1.3.0</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.codehaus.plexus.javadoc.PlexusConfigurationTaglet</tagletClass>
+ <tagletClass>
+ org.codehaus.plexus.javadoc.PlexusConfigurationTaglet
+ </tagletClass>
<tagletArtifact>
<groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-javadoc</artifactId>
- <version>1.0</version>
+ <artifactId>plexus-component-javadoc
+ </artifactId>
+ <version>1.3.0</version>
</tagletArtifact>
</taglet>
<taglet>
- <tagletClass>org.codehaus.plexus.javadoc.PlexusRequirementTaglet</tagletClass>
+ <tagletClass>
+ org.codehaus.plexus.javadoc.PlexusRequirementTaglet
+ </tagletClass>
<tagletArtifact>
<groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-javadoc</artifactId>
- <version>1.0</version>
+ <artifactId>plexus-component-javadoc
+ </artifactId>
+ <version>1.3.0</version>
</tagletArtifact>
</taglet>
</taglets>
1
0