[Lutinutil-commits] r1047 - in trunk/maven-license-switcher-plugin: . src/main/java/org/codelutin/license src/main/resources src/site/apt
Author: tchemit Date: 2008-08-18 14:25:26 +0000 (Mon, 18 Aug 2008) New Revision: 1047 Added: trunk/maven-license-switcher-plugin/THIRD-PARTY.txt trunk/maven-license-switcher-plugin/src/main/java/org/codelutin/license/ThirdPartyMojo.java trunk/maven-license-switcher-plugin/src/main/resources/LICENSE.txt trunk/maven-license-switcher-plugin/src/main/resources/THIRD-PARTY.txt Modified: trunk/maven-license-switcher-plugin/pom.xml trunk/maven-license-switcher-plugin/src/main/java/org/codelutin/license/SwitchLicenseMojo.java trunk/maven-license-switcher-plugin/src/site/apt/index.apt trunk/maven-license-switcher-plugin/src/site/apt/usage.apt Log: ajout d'un goal pour construire le third-party file recopie des fichiers vers src/main/resources Added: trunk/maven-license-switcher-plugin/THIRD-PARTY.txt =================================================================== --- trunk/maven-license-switcher-plugin/THIRD-PARTY.txt (rev 0) +++ trunk/maven-license-switcher-plugin/THIRD-PARTY.txt 2008-08-18 14:25:26 UTC (rev 1047) @@ -0,0 +1,29 @@ +List of third-party dependencies grouped by their license type. + +Common Public License Version 1.0 : + * JUnit (junit:junit:3.8.1 - http://junit.org) + +LGPL : + * Lutin file processor (org.codelutin:lutinprocessor:0.14 - http://labs.libre-entreprise.org/projects/lutinbuilder) + * Lutin plugin utilities library (org.codelutin:lutinpluginutil:0.1 - http://labs.libre-entreprise.org/projects/lutinutil) + +The Apache Software License, Version 2.0 : + * Commons Logging (commons-logging:commons-logging:1.1.1 - http://commons.apache.org/logging) + * Maven Artifact (org.apache.maven:maven-artifact:2.0.4 - http://maven.apache.org/maven-artifact) + * Maven Artifact Manager (org.apache.maven:maven-artifact-manager:2.0.4 - http://maven.apache.org/maven-artifact-manager) + * Maven Dependency Tree (org.apache.maven.shared:maven-dependency-tree:1.1 - http://maven.apache.org/shared/maven-dependency-tree) + * Maven Local Settings Model (org.apache.maven:maven-settings:2.0.4 - http://maven.apache.org/maven-settings) + * Maven Model (org.apache.maven:maven-model:2.0.4 - http://maven.apache.org/maven-model) + * Maven Plugin API (org.apache.maven:maven-plugin-api:2.0.4 - http://maven.apache.org/maven-plugin-api) + * Maven Profile Model (org.apache.maven:maven-profile:2.0.4 - http://maven.apache.org/maven-profile) + * Maven Project Builder (org.apache.maven:maven-project:2.0.4 - http://maven.apache.org/maven-project) + * Maven Project Builder (org.apache.maven:maven-project:2.0.8 - http://maven.apache.org/maven-project) + * Maven Repository Metadata Model (org.apache.maven:maven-repository-metadata:2.0.4 - http://maven.apache.org/maven-repository-metadata) + * Maven Wagon API (org.apache.maven.wagon:wagon-provider-api:1.0-alpha-6 - no url defined) + * Unnamed - ant:ant:jar:1.6.5 (ant:ant:1.6.5 - http://www.apache.org/ant) + +Unknown license : + * Default Plexus Container (org.codehaus.plexus:plexus-container-default:1.0-alpha-9 - no url defined) + * Plexus Common Utilities (org.codehaus.plexus:plexus-utils:1.0.4 - no url defined) + * Plexus Common Utilities (org.codehaus.plexus:plexus-utils:1.1 - no url defined) + * classworlds (classworlds:classworlds:1.1-alpha-2 - http://classworlds.codehaus.org/) \ No newline at end of file Modified: trunk/maven-license-switcher-plugin/pom.xml =================================================================== --- trunk/maven-license-switcher-plugin/pom.xml 2008-08-18 09:47:49 UTC (rev 1046) +++ trunk/maven-license-switcher-plugin/pom.xml 2008-08-18 14:25:26 UTC (rev 1047) @@ -33,6 +33,12 @@ </dependency> <dependency> + <groupId>org.apache.maven.shared</groupId> + <artifactId>maven-dependency-tree</artifactId> + <version>1.1</version> + </dependency> + + <dependency> <groupId>org.codelutin</groupId> <artifactId>lutinprocessor</artifactId> <version>0.14</version> Modified: trunk/maven-license-switcher-plugin/src/main/java/org/codelutin/license/SwitchLicenseMojo.java =================================================================== --- trunk/maven-license-switcher-plugin/src/main/java/org/codelutin/license/SwitchLicenseMojo.java 2008-08-18 09:47:49 UTC (rev 1046) +++ trunk/maven-license-switcher-plugin/src/main/java/org/codelutin/license/SwitchLicenseMojo.java 2008-08-18 14:25:26 UTC (rev 1047) @@ -1,17 +1,17 @@ /** * *##% Plugin maven pour switcher les licenses * Copyright (C) 2008 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>. ##%* @@ -120,6 +120,13 @@ protected boolean keepBackup; /** + * un flag pour indiquer la recopie vers le repertoire des resources. + * + * @parameter expression="${license-switcher.copyToResource}" default-value="true" + */ + protected boolean copyToResource; + + /** * un flag pour avoir les traces * * @parameter expression="${license-switcher.verbose}" default-value="false" @@ -179,6 +186,16 @@ } try { FileUtil.writeString(licenseFile, licenseFileContent, encoding); + if (copyToResource) { + File target = new File(project.getBasedir(), "src" + File.separator + "main" + File.separator + "resources" + File.separator + licenseFile.getName()); + if (target.exists() && keepBackup) { + if (verbose) { + getLog().info("backup " + target); + } + target.renameTo(new File(target.getAbsolutePath() + '~')); + } + FileUtil.copy(licenseFile, target); + } } catch (IOException e) { throw new MojoExecutionException("could not write license file " + licenseFile + " for reason : " + e.getMessage(), e); } @@ -224,7 +241,7 @@ protected void addLicenseToJavaSourceFile(File sourceFile, File processFile) throws IOException { getLog().warn("no license was found on file " + sourceFile + ", adding one"); String content = FileUtil.readAsString(sourceFile, encoding); - content = "/**\n * " + LicenseFilter.HEADER+ " " + licenseHeaderContent + " " + LicenseFilter.HEADER+ "\n */\n" + content; + content = "/**\n * " + LicenseFilter.HEADER + " " + licenseHeaderContent + " " + LicenseFilter.HEADER + "\n */\n" + content; FileUtil.writeString(processFile, content, encoding); } Copied: trunk/maven-license-switcher-plugin/src/main/java/org/codelutin/license/ThirdPartyMojo.java (from rev 1042, trunk/maven-license-switcher-plugin/src/main/java/org/codelutin/license/SwitchLicenseMojo.java) =================================================================== --- trunk/maven-license-switcher-plugin/src/main/java/org/codelutin/license/ThirdPartyMojo.java (rev 0) +++ trunk/maven-license-switcher-plugin/src/main/java/org/codelutin/license/ThirdPartyMojo.java 2008-08-18 14:25:26 UTC (rev 1047) @@ -0,0 +1,317 @@ +/** + * *##% Plugin maven pour switcher les licenses + * Copyright (C) 2008 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.codelutin.license; + +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.plugin.AbstractMojo; +import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugin.MojoFailureException; +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 org.codelutin.util.FileUtil; + +import java.io.File; +import java.io.IOException; +import java.util.List; +import java.util.SortedSet; +import java.util.TreeSet; + +/** + * Le goal pour ecrire le fichier THIRD-PARTY.txt contenant les licenses de toutes les dependances du projet. + * + * @author chemit + * @goal third-party + * @requiresDependencyResolution test + */ +public class ThirdPartyMojo extends AbstractMojo { + + private static final String unknownLicenseMessage = "Unknown license"; + + /** + * Dependance du projet. + * + * @parameter default-value="${project}" + * @readonly + */ + protected MavenProject project; + + /** + * encoding a utiliser pour lire et ecrire les fichiers. + * + * @parameter expression="${licence-switcher.encoding}" default-value="${maven.compile.encoding}" + * @required + */ + protected String encoding; + + /** + * un flag pour conserver un backup des fichiers modifies + * + * @parameter expression="${license-switcher.keepBackup}" default-value="false" + */ + protected boolean keepBackup; + + /** + * un flag pour indiquer la recopie vers le repertoire des resources. + * + * @parameter expression="${license-switcher.copyToResource}" default-value="true" + */ + protected boolean copyToResource; + + /** + * un flag pour avoir les traces + * + * @parameter expression="${license-switcher.verbose}" default-value="false" + */ + protected boolean verbose; + + /** + * Local Repository. + * + * @parameter expression="${localRepository}" + * @required + * @readonly + */ + protected ArtifactRepository localRepository; + + + /** + * Remote repositories used for the project. + * + * @parameter expression="${project.remoteArtifactRepositories}" + * @required + * @readonly + * @since 2.1 + */ + protected List remoteRepositories; + + /** + * Fichier ou ecrire les licences des dependances. + * + * @parameter expression="${license-switcher.thirdPartyFile}" default-value="${basedir}/THIRD-PARTY.txt" + * @required + * @readonly + */ + protected File thirdPartyFile; + + /** + * 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; + + public void execute() throws MojoExecutionException, MojoFailureException { + + DependencyNode dependencyTreeNode = resolveProject(); + + LicenseMap licenseMap = new LicenseMap(); + + for (Object o : dependencyTreeNode.getChildren()) { + + buildLicenseMap((DependencyNode) o, licenseMap); + } + + String content = buildGroupedLicenses(licenseMap); + try { + if (verbose) { + getLog().info("writing third-party file : " + thirdPartyFile); + } + if (thirdPartyFile.exists() && keepBackup) { + if (verbose) { + getLog().info("backup " + thirdPartyFile); + } + thirdPartyFile.renameTo(new File(thirdPartyFile.getAbsolutePath() + '~')); + } + FileUtil.writeString(thirdPartyFile, content, encoding); + if (copyToResource) { + File target = new File(project.getBasedir(), "src" + File.separator + "main" + File.separator + "resources" + File.separator + thirdPartyFile.getName()); + if (target.exists() && keepBackup) { + if (verbose) { + getLog().info("backup " + target); + } + target.renameTo(new File(target.getAbsolutePath() + '~')); + } + FileUtil.copy(thirdPartyFile, target); + } + } catch (IOException e) { + throw new MojoExecutionException("could not write file " + thirdPartyFile + " for reason : " + e.getMessage(), e); + + } + + } + + /** @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) { + + Artifact artifact = node.getArtifact(); + + if (!Artifact.SCOPE_SYSTEM.equals(artifact.getScope())) { + try { + MavenProject artifactProject = getMavenProjectFromRepository(artifact); + String artifactName = getArtifactName(artifactProject); + + List licenses = artifactProject.getLicenses(); + + if (licenses.isEmpty()) { + + licenseMap.put(unknownLicenseMessage, artifactName); + + } else { + for (Object license : licenses) { + License element = (License) license; + String licenseName = element.getName(); + + licenseMap.put(licenseName, 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 { + Artifact projectArtifact = artifact; + + boolean allowStubModel = false; + if (!"pom".equals(artifact.getType())) { + projectArtifact = factory.createProjectArtifact(artifact.getGroupId(), artifact.getArtifactId(), + artifact.getVersion(), artifact.getScope()); + allowStubModel = true; + } + + // TODO: we should use the MavenMetadataSource instead + return mavenProjectBuilder.buildFromRepository(projectArtifact, remoteRepositories, localRepository, + allowStubModel); + } + + protected class LicenseMap extends java.util.TreeMap<String, SortedSet<String>> { + private static final long serialVersionUID = 864199843545688069L; + + /** {@inheritDoc} */ + 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>(); + } + getLog().debug("key:" + key + ",value: " + value); + valueList.add(value); + return super.put(key, valueList); + } + } +} Added: trunk/maven-license-switcher-plugin/src/main/resources/LICENSE.txt =================================================================== --- trunk/maven-license-switcher-plugin/src/main/resources/LICENSE.txt (rev 0) +++ trunk/maven-license-switcher-plugin/src/main/resources/LICENSE.txt 2008-08-18 14:25:26 UTC (rev 1047) @@ -0,0 +1,166 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. + Added: trunk/maven-license-switcher-plugin/src/main/resources/THIRD-PARTY.txt =================================================================== --- trunk/maven-license-switcher-plugin/src/main/resources/THIRD-PARTY.txt (rev 0) +++ trunk/maven-license-switcher-plugin/src/main/resources/THIRD-PARTY.txt 2008-08-18 14:25:26 UTC (rev 1047) @@ -0,0 +1,29 @@ +List of third-party dependencies grouped by their license type. + +Common Public License Version 1.0 : + * JUnit (junit:junit:3.8.1 - http://junit.org) + +LGPL : + * Lutin file processor (org.codelutin:lutinprocessor:0.14 - http://labs.libre-entreprise.org/projects/lutinbuilder) + * Lutin plugin utilities library (org.codelutin:lutinpluginutil:0.1 - http://labs.libre-entreprise.org/projects/lutinutil) + +The Apache Software License, Version 2.0 : + * Commons Logging (commons-logging:commons-logging:1.1.1 - http://commons.apache.org/logging) + * Maven Artifact (org.apache.maven:maven-artifact:2.0.4 - http://maven.apache.org/maven-artifact) + * Maven Artifact Manager (org.apache.maven:maven-artifact-manager:2.0.4 - http://maven.apache.org/maven-artifact-manager) + * Maven Dependency Tree (org.apache.maven.shared:maven-dependency-tree:1.1 - http://maven.apache.org/shared/maven-dependency-tree) + * Maven Local Settings Model (org.apache.maven:maven-settings:2.0.4 - http://maven.apache.org/maven-settings) + * Maven Model (org.apache.maven:maven-model:2.0.4 - http://maven.apache.org/maven-model) + * Maven Plugin API (org.apache.maven:maven-plugin-api:2.0.4 - http://maven.apache.org/maven-plugin-api) + * Maven Profile Model (org.apache.maven:maven-profile:2.0.4 - http://maven.apache.org/maven-profile) + * Maven Project Builder (org.apache.maven:maven-project:2.0.4 - http://maven.apache.org/maven-project) + * Maven Project Builder (org.apache.maven:maven-project:2.0.8 - http://maven.apache.org/maven-project) + * Maven Repository Metadata Model (org.apache.maven:maven-repository-metadata:2.0.4 - http://maven.apache.org/maven-repository-metadata) + * Maven Wagon API (org.apache.maven.wagon:wagon-provider-api:1.0-alpha-6 - no url defined) + * Unnamed - ant:ant:jar:1.6.5 (ant:ant:1.6.5 - http://www.apache.org/ant) + +Unknown license : + * Default Plexus Container (org.codehaus.plexus:plexus-container-default:1.0-alpha-9 - no url defined) + * Plexus Common Utilities (org.codehaus.plexus:plexus-utils:1.0.4 - no url defined) + * Plexus Common Utilities (org.codehaus.plexus:plexus-utils:1.1 - no url defined) + * classworlds (classworlds:classworlds:1.1-alpha-2 - http://classworlds.codehaus.org/) \ No newline at end of file Modified: trunk/maven-license-switcher-plugin/src/site/apt/index.apt =================================================================== --- trunk/maven-license-switcher-plugin/src/site/apt/index.apt 2008-08-18 09:47:49 UTC (rev 1046) +++ trunk/maven-license-switcher-plugin/src/site/apt/index.apt 2008-08-18 14:25:26 UTC (rev 1047) @@ -16,6 +16,8 @@ * {{{switch-mojo.html}llicense-switcher:switch}} parse Java sources and switch license header. + * {{{third-party-mojo.html}license-switcher:third-party}} write the licenses of all third-party libraries used in project. + * {{{help-mojo.html}license-switcher:help}} display help about the plugin (goals, usage). * {{{help-mojo.html}license-switcher:available-licenses}} display the known licenses of the plugin. Modified: trunk/maven-license-switcher-plugin/src/site/apt/usage.apt =================================================================== --- trunk/maven-license-switcher-plugin/src/site/apt/usage.apt 2008-08-18 09:47:49 UTC (rev 1046) +++ trunk/maven-license-switcher-plugin/src/site/apt/usage.apt 2008-08-18 14:25:26 UTC (rev 1047) @@ -30,6 +30,14 @@ mvn license-switcher:available-licenses +-----+ +* The <<<third-party>>> Mojo + + The <<<third-party>>> write in the <<<THIRD-PARTY.txt>>> the licenses of all third party librairies used by the project. + ++-----+ +mvn license-switcher:third-party ++-----+ + * The <<<help>>> Mojo The <<<help>>> mojo display in the console the help for the plugin.
participants (1)
-
tchemit@users.labs.libre-entreprise.org