r5 - in trunk: . nuiton-mojo-goal nuiton-mojo-goal/src nuiton-mojo-goal/src/main nuiton-mojo-goal/src/main/resources nuiton-mojo-goal/src/main/resources/META-INF nuiton-mojo-goal/src/main/resources/META-INF/maven nuiton-mojo-goal/src/main/resources/archetype-resources nuiton-mojo-goal/src/main/resources/archetype-resources/src nuiton-mojo-goal/src/main/resources/archetype-resources/src/main nuiton-mojo-goal/src/main/resources/archetype-resources/src/main/java nuiton-mojo-goal/src/main/r
Author: tchemit Date: 2009-09-04 14:56:37 +0200 (Fri, 04 Sep 2009) New Revision: 5 Added: trunk/nuiton-mojo-goal/ trunk/nuiton-mojo-goal/LICENSE.txt trunk/nuiton-mojo-goal/README.txt trunk/nuiton-mojo-goal/changelog.txt trunk/nuiton-mojo-goal/pom.xml trunk/nuiton-mojo-goal/src/ trunk/nuiton-mojo-goal/src/main/ trunk/nuiton-mojo-goal/src/main/resources/ trunk/nuiton-mojo-goal/src/main/resources/META-INF/ trunk/nuiton-mojo-goal/src/main/resources/META-INF/maven/ trunk/nuiton-mojo-goal/src/main/resources/META-INF/maven/archetype-metadata.xml trunk/nuiton-mojo-goal/src/main/resources/META-INF/maven/archetype.xml trunk/nuiton-mojo-goal/src/main/resources/archetype-resources/ trunk/nuiton-mojo-goal/src/main/resources/archetype-resources/pom.xml trunk/nuiton-mojo-goal/src/main/resources/archetype-resources/src/ trunk/nuiton-mojo-goal/src/main/resources/archetype-resources/src/main/ trunk/nuiton-mojo-goal/src/main/resources/archetype-resources/src/main/java/ trunk/nuiton-mojo-goal/src/main/resources/archetype-resources/src/main/java/__mojoName__.java trunk/nuiton-mojo-goal/src/main/resources/archetype-resources/src/test/ trunk/nuiton-mojo-goal/src/main/resources/archetype-resources/src/test/java/ trunk/nuiton-mojo-goal/src/main/resources/archetype-resources/src/test/java/__mojoName__Test.java trunk/nuiton-mojo-goal/src/main/resources/archetype-resources/src/test/resources/ trunk/nuiton-mojo-goal/src/main/resources/archetype-resources/src/test/resources/__mojoName__Test/ trunk/nuiton-mojo-goal/src/main/resources/archetype-resources/src/test/resources/__mojoName__Test/__mojoGoal__.xml trunk/nuiton-mojo-goal/src/site/ trunk/nuiton-mojo-goal/src/site/apt/ trunk/nuiton-mojo-goal/src/site/apt/Todo.apt trunk/nuiton-mojo-goal/src/site/apt/examples.apt trunk/nuiton-mojo-goal/src/site/apt/index.apt trunk/nuiton-mojo-goal/src/site/site.xml trunk/nuiton-mojo-pom/ trunk/nuiton-mojo-pom/LICENSE.txt trunk/nuiton-mojo-pom/README.txt trunk/nuiton-mojo-pom/changelog.txt trunk/nuiton-mojo-pom/pom.xml trunk/nuiton-mojo-pom/src/ trunk/nuiton-mojo-pom/src/main/ trunk/nuiton-mojo-pom/src/main/resources/ trunk/nuiton-mojo-pom/src/main/resources/META-INF/ trunk/nuiton-mojo-pom/src/main/resources/META-INF/maven/ trunk/nuiton-mojo-pom/src/main/resources/META-INF/maven/archetype-metadata.xml trunk/nuiton-mojo-pom/src/main/resources/META-INF/maven/archetype.xml trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/ trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/LICENSE.txt trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/README.txt trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/changelog.txt trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/pom.xml trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/src/ trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/src/main/ trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/src/main/resources/ trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/src/main/resources/log4j.properties trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/src/site/ trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/src/site/rst/ trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/src/site/rst/Todo.rst trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/src/site/rst/index.rst trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/src/site/rst/usage.rst trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/src/site/site.xml trunk/nuiton-mojo-pom/src/site/ trunk/nuiton-mojo-pom/src/site/apt/ trunk/nuiton-mojo-pom/src/site/apt/Todo.apt trunk/nuiton-mojo-pom/src/site/apt/examples.apt trunk/nuiton-mojo-pom/src/site/apt/index.apt trunk/nuiton-mojo-pom/src/site/site.xml Modified: trunk/pom.xml trunk/src/site/apt/index.apt Log: [Evolution #43] Cr?\195?\169ation d'un mojo Property changes on: trunk/nuiton-mojo-goal ___________________________________________________________________ Added: svn:ignore + target Added: trunk/nuiton-mojo-goal/LICENSE.txt =================================================================== --- trunk/nuiton-mojo-goal/LICENSE.txt (rev 0) +++ trunk/nuiton-mojo-goal/LICENSE.txt 2009-09-04 12:56:37 UTC (rev 5) @@ -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/nuiton-mojo-goal/README.txt =================================================================== --- trunk/nuiton-mojo-goal/README.txt (rev 0) +++ trunk/nuiton-mojo-goal/README.txt 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,2 @@ +To deploy new version of pom: mvn deploy +To install localy: mvn install Added: trunk/nuiton-mojo-goal/changelog.txt =================================================================== --- trunk/nuiton-mojo-goal/changelog.txt (rev 0) +++ trunk/nuiton-mojo-goal/changelog.txt 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,5 @@ +archetype-nuiton-mojo-goal (1.0.0) stable; urgency=low + + * First release + +-- chemit -- Tue, 01 Sep 2009 19:56:44 +0200 Added: trunk/nuiton-mojo-goal/pom.xml =================================================================== --- trunk/nuiton-mojo-goal/pom.xml (rev 0) +++ trunk/nuiton-mojo-goal/pom.xml 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <modelVersion>4.0.0</modelVersion> + + + <!-- ************************************************************* --> + <!-- *** POM Relationships *************************************** --> + <!-- ************************************************************* --> + + <parent> + <groupId>org.nuiton</groupId> + <artifactId>archetype</artifactId> + <version>1.0.0-SNAPSHOT</version> + </parent> + + <groupId>org.nuiton.archetype</groupId> + <artifactId>nuiton-mojo-goal</artifactId> + + <!-- ************************************************************* --> + <!-- *** Project Information ************************************* --> + <!-- ************************************************************* --> + + <name>Nuiton mojo goal archetype</name> + <description>Archetype to add a goal in a nuiton mojo project</description> + + <!-- ************************************************************* --> + <!-- *** Build Settings ****************************************** --> + <!-- ************************************************************* --> + + <packaging>maven-archetype</packaging> + + <build> + <!--extensions> + <extension> + <groupId>org.apache.maven.archetype</groupId> + <artifactId>archetype-packaging</artifactId> + <version>${archetype.version}</version> + </extension> + </extensions--> + <plugins> + <plugin> + <artifactId>maven-archetype-plugin</artifactId> + <!--version>${archetype.version}</version--> + <!--extensions>true</extensions--> + </plugin> + </plugins> + </build> + + <!-- ************************************************************* --> + <!-- *** Build Environment ************************************** --> + <!-- ************************************************************* --> + +</project> Added: trunk/nuiton-mojo-goal/src/main/resources/META-INF/maven/archetype-metadata.xml =================================================================== --- trunk/nuiton-mojo-goal/src/main/resources/META-INF/maven/archetype-metadata.xml (rev 0) +++ trunk/nuiton-mojo-goal/src/main/resources/META-INF/maven/archetype-metadata.xml 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<archetype-descriptor name="archetype-nuiton-mojo-goal" partial="true"> + <requiredProperties> + <requiredProperty key="projectAuthor"/> + <requiredProperty key="mojoName"/> + <requiredProperty key="mojoGoal"/> + <requiredProperty key="mojoDescription"/> + </requiredProperties> + <fileSets> + <fileSet filtered="true" packaged="true" encoding="UTF-8"> + <directory>src/main/java</directory> + <includes> + <include>**/*.java</include> + </includes> + </fileSet> + <fileSet filtered="true" packaged="true" encoding="UTF-8"> + <directory>src/test/java</directory> + <includes> + <include>**/*.java</include> + </includes> + </fileSet> + <fileSet encoding="UTF-8" packaged="true" filtered="true"> + <directory>src/test/resources</directory> + <includes> + <include>**/*.xml</include> + </includes> + </fileSet> + </fileSets> +</archetype-descriptor> \ No newline at end of file Added: trunk/nuiton-mojo-goal/src/main/resources/META-INF/maven/archetype.xml =================================================================== --- trunk/nuiton-mojo-goal/src/main/resources/META-INF/maven/archetype.xml (rev 0) +++ trunk/nuiton-mojo-goal/src/main/resources/META-INF/maven/archetype.xml 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<archetype> + <id>archetype-nuiton-mojo-goal</id> + <sources> + <source>src/main/java/__mojoName__.java</source> + </sources> + <testSources> + <source>src/test/java/__mojoName__Test.java</source> + </testSources> + <testResources> + <resource>src/test/resources/__mojoName__Test/__mojoName__.xml</resource> + </testResources> +</archetype> \ No newline at end of file Added: trunk/nuiton-mojo-goal/src/main/resources/archetype-resources/pom.xml =================================================================== --- trunk/nuiton-mojo-goal/src/main/resources/archetype-resources/pom.xml (rev 0) +++ trunk/nuiton-mojo-goal/src/main/resources/archetype-resources/pom.xml 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,149 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <!-- ************************************************************* --> + <!-- *** POM Relationships *************************************** --> + <!-- ************************************************************* --> + <parent> + <groupId>org.nuiton</groupId> + <artifactId>mavenpom</artifactId> + <version>${mavenpomversion}</version> + </parent> + + <artifactId>${artifactId}</artifactId> + + <groupId>${groupId}</groupId> + <version>${version}</version> + + <dependencies> + + <dependency> + <groupId>org.nuiton</groupId> + <artifactId>maven-helper-plugin</artifactId> + <version>${helper.version}</version> + <scope>compile</scope> + </dependency> + + <!-- FIXME si on ne le rajoute pas, on se retrouve avec la version 1.1 qui ne convient pas --> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-utils</artifactId> + <version>1.5.15</version> + <scope>compile</scope> + </dependency> + + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-project</artifactId> + <version>${maven.version}</version> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-plugin-api</artifactId> + <version>${maven.version}</version> + <scope>provided</scope> + </dependency> + + <!-- tests dependencies --> + + <dependency> + <groupId>org.nuiton</groupId> + <artifactId>maven-helper-plugin</artifactId> + <version>${helper.version}</version> + <scope>test</scope> + <classifier>tests</classifier> + </dependency> + + <dependency> + <groupId>org.apache.maven.shared</groupId> + <artifactId>maven-plugin-testing-harness</artifactId> + <version>1.1</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.6</version> + <scope>test</scope> + </dependency> + + </dependencies> + + <!-- ************************************************************* --> + <!-- *** Project Information ************************************* --> + <!-- ************************************************************* --> + <name>${projectName}</name> + + <description>${projectDescription}</description> + + <inceptionYear>${projectInceptionYear}</inceptionYear> + + <url>http://maven-site.nuiton.org/${artifactId}</url> + + <!-- ************************************************************* --> + <!-- *** Build Settings ****************************************** --> + <!-- ************************************************************* --> + + <packaging>maven-plugin</packaging> + + <build> + + <defaultGoal>install</defaultGoal> + + <plugins> + + <plugin> + <artifactId>maven-plugin-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>helpmojo</goal> + </goals> + </execution> + </executions> + </plugin> + + </plugins> + + <pluginManagement> + <plugins> + <plugin> + <artifactId>maven-site-plugin</artifactId> + <dependencies> + <dependency> + <groupId>org.nuiton.jrst</groupId> + <artifactId>doxia-module-jrst</artifactId> + <version>${jrst.version}</version> + </dependency> + </dependencies> + </plugin> + </plugins> + </pluginManagement> + + </build> + + <reporting> + <plugins> + <plugin> + <artifactId>maven-plugin-plugin</artifactId> + </plugin> + </plugins> + </reporting> + + <!-- ************************************************************* --> + <!-- *** Build Environment ************************************** --> + <!-- ************************************************************* --> + + <!-- Source control management. --> + <scm> + <connection>scm:svn:http://svn.nuiton.org/svn/${artifactId}/trunk</connection> + <developerConnection>scm:svn:http://svn.nuiton.org/svn/${artifactId}/trunk</developerConnection> + <url>http://www.nuiton.org/repositories/browse/${artifactId}/trunk</url> + </scm> + +</project> Added: trunk/nuiton-mojo-goal/src/main/resources/archetype-resources/src/main/java/__mojoName__.java =================================================================== --- trunk/nuiton-mojo-goal/src/main/resources/archetype-resources/src/main/java/__mojoName__.java (rev 0) +++ trunk/nuiton-mojo-goal/src/main/resources/archetype-resources/src/main/java/__mojoName__.java 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,76 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + +package ${package}; + +import org.apache.maven.project.MavenProject; +import org.nuiton.AbstractPlugin; + +/** + * ${mojoDescription} + * + * @author ${projectAuthor} + * @goal ${mojoGoal} + * @requiresProject true + * @requiresDirectInvocation + * + * @since ${version} + */ +public class ${mojoName}Plugin extends AbstractPlugin { + + /** + * Dependance du projet. + * + * @parameter default-value="${symbol_dollar}{project}" + * @required + * @since ${version} + */ + protected MavenProject project; + /** + * Un flag pour activer le mode verbeux. + * + * @parameter expression="${symbol_dollar}{${mojoGoal}.verbose}" default-value="${symbol_dollar}{maven.verbose}" + * @since ${version} + */ + protected boolean verbose; + + public ${mojoName}Plugin() { + super("skip message"); + } + + @Override + protected boolean ensurePackaging() { + return false; + } + + @Override + protected boolean init() throws Exception { + return true; + } + + @Override + protected void doAction() throws Exception { + //TODO-FILL_ME + } + + @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/nuiton-mojo-goal/src/main/resources/archetype-resources/src/main/java/__mojoName__.java ___________________________________________________________________ Added: svn:keywords + "Author Date Id Revision HeadURL Added: trunk/nuiton-mojo-goal/src/main/resources/archetype-resources/src/test/java/__mojoName__Test.java =================================================================== --- trunk/nuiton-mojo-goal/src/main/resources/archetype-resources/src/test/java/__mojoName__Test.java (rev 0) +++ trunk/nuiton-mojo-goal/src/main/resources/archetype-resources/src/test/java/__mojoName__Test.java 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,48 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +package ${package}; + +import org.nuiton.util.PluginConfig; +import static org.junit.Assert.*; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +import org.junit.AfterClass; +import org.nuiton.util.BasePluginTestCase; + +/** + * @author ${projectAuthor} + * @since ${version} + */ +public class ${mojoName}PluginTest extends BasePluginTestCase { + + ${mojoName}Plugin plugin; + + @BeforeClass + public static void initClass() throws Exception { + initConfigs(${mojoName}PluginTest.class, "test${mojoName}"); + } + + @AfterClass + public static void afterClass() throws Exception { + configItr = null; + testDir = null; + } + + @Before + @Override + public void setUp() throws Exception { + super.setUp(); + assertNotNull(mojo); + plugin = (${mojoName}Plugin) mojo; + } + + @Test + @PluginConfig(pomName = "${mojoGoal}.xml", goalName = "${mojoGoal}") + public void test${mojoName}() throws Exception { + + plugin.execute(); + } +} Property changes on: trunk/nuiton-mojo-goal/src/main/resources/archetype-resources/src/test/java/__mojoName__Test.java ___________________________________________________________________ Added: svn:keywords + "Author Date Id Revision HeadURL Added: trunk/nuiton-mojo-goal/src/main/resources/archetype-resources/src/test/resources/__mojoName__Test/__mojoGoal__.xml =================================================================== --- trunk/nuiton-mojo-goal/src/main/resources/archetype-resources/src/test/resources/__mojoName__Test/__mojoGoal__.xml (rev 0) +++ trunk/nuiton-mojo-goal/src/main/resources/archetype-resources/src/test/resources/__mojoName__Test/__mojoGoal__.xml 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <groupId>${groupId}.${artifactId}</groupId> + <artifactId>test-${mojoGoal}</artifactId> + <version>0</version> + + <name>${mojoGoal}</name> + + <build> + + <plugins> + <plugin> + <groupId>${groupId}</groupId> + <artifactId>${artifactId}</artifactId> + <configuration> + + </configuration> + <executions> + <execution> + <goals> + <goal>${mojoGoal}</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> \ No newline at end of file Added: trunk/nuiton-mojo-goal/src/site/apt/Todo.apt =================================================================== --- trunk/nuiton-mojo-goal/src/site/apt/Todo.apt (rev 0) +++ trunk/nuiton-mojo-goal/src/site/apt/Todo.apt 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,7 @@ +---- +TODO +---- +---- +2009-09-01 +---- + \ No newline at end of file Added: trunk/nuiton-mojo-goal/src/site/apt/examples.apt =================================================================== --- trunk/nuiton-mojo-goal/src/site/apt/examples.apt (rev 0) +++ trunk/nuiton-mojo-goal/src/site/apt/examples.apt 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,110 @@ +------ +Example +------ +------ +2009-09-01 +------ + +Se mettre dans un projet de type nuiton mojo et lancer la commande de création : + +------------------------------------------------------------------------------- + +mvn archetype:generate -DarchetypeCatalog=http://maven.nuiton.org/release \ + -DarchetypeGroupId=org.nuiton.archetype \ + -DarchetypeArtifactId=nuiton-mojo-goal + +[INFO] Scanning for projects... +[INFO] Searching repository for plugin with prefix: 'archetype'. +[INFO] ------------------------------------------------------------------------ +[INFO] Building Maven Default Project +[INFO] task-segment: [archetype:generate] (aggregator-style) +[INFO] ------------------------------------------------------------------------ +[INFO] Preparing archetype:generate +[INFO] No goals needed for project - skipping +[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'. +[INFO] Setting property: velocimacro.messages.on => 'false'. +[INFO] Setting property: resource.loader => 'classpath'. +[INFO] Setting property: resource.manager.logwhenfound => 'false'. +[INFO] [archetype:generate] +[INFO] Generating project in Interactive mode +[INFO] Archetype [org.nuiton.archetype:nuiton-mojo-goal:1.0.0] found in catalog http://maven.nuiton.org/release/ +------------------------------------------------------------------------------- + +Renseigner les valeurs requises + +------------------------------------------------------------------------------- +Define value for projectAuthor: : tchemit +Define value for mojoName: : GetUsersMojo +Define value for mojoGoal: : get-users +Define value for mojoDescription: : Obtain the list of users +Define value for groupId: : org.nuiton +Define value for artifactId: : maven-redmine-plugin +Define value for version: 1.0-SNAPSHOT: : 1.0.0-SNAPSHOT +Define value for package: org.nuiton: : org.nuiton.redmine.plugin +------------------------------------------------------------------------------- + +Confirmer les valeurs + +------------------------------------------------------------------------------- +Confirm properties configuration: +projectAuthor: tchemit +mojoName: GetUsersMojo +mojoGoal: get-users +mojoDescription: Obtain the list of users +groupId: org.nuiton +artifactId: maven-redmine-plugin +version: 1.0.0-SNAPSHOT +package: org.nuiton.redmine.plugin + Y: : y +------------------------------------------------------------------------------- + +Au final, on aura en plus dans le projet : + + - un Mojo de nom <mojoName> ayant pour goal <mojoGoal>. + + - un test unitaire de nom <mojoName>Test et ses resources + +------------------------------------------------------------------------------- +maven-redmine-plugin/ +`-- src + |-- main + | |-- java + | | `-- org + | | `-- nuiton + | | `-- redmine + | | `-- plugin + | | `-- GetUsersMojo.java + `-- test + |-- java + | `-- org + | `-- nuiton + | `-- redmine + | `-- plugin + | `-- GetUsersMojoTest.java + `-- resources + `-- org + `-- nuiton + `-- redmine + `-- plugin + `-- GetUsersMojoTest + `-- get-users.xml +------------------------------------------------------------------------------- + +Note + + Il est aussi possible de lancer la commande de création en passant tous les + paramètres requis comme des variables d'environnement : + +------------------------------------------------------------------------------- +mvn archetype:generate -DarchetypeCatalog=http://maven.nuiton.org/release \ + -DarchetypeGroupId=org.nuiton.archetype \ + -DarchetypeArtifactId=nuiton-mojo-goal \ + -DprojectAuthor=tchemit \ + -DmojoName=GetUsersMojo \ + -DmojoGoal=get-users \ + -DmojoDescription="Obtain the list of users" \ + -DgroupId=org.nuiton \ + -DartifactId=maven-redmine-plugin \ + -Dversion=1.0.0-SNAPSHOT \ + -Dpackage=org.nuiton.redmine.plugin +------------------------------------------------------------------------------- Added: trunk/nuiton-mojo-goal/src/site/apt/index.apt =================================================================== --- trunk/nuiton-mojo-goal/src/site/apt/index.apt (rev 0) +++ trunk/nuiton-mojo-goal/src/site/apt/index.apt 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,31 @@ +------ +Archetype Nuiton Mojo Goal +------ +------ +2009-09-01 +------ + +Présentation + + Un archetype pour générer dans un module de type <maven-plugin> basé sur + {{{http://maven-site.nuiton.org/mavenpom}mavenpom}} et la plateforme + {{{http://www.nuiton.org}nuiton}}, un goal et son test unitaire. + + Le projet généré possèdera un <mojo> et le test unitaire associé. + + + <Note :> Cet archetype est de type <partiel>, i.e qu'il faut le lancer dans un projet déjà existant. + +Les propriétés de l'archetype + + * <<projectAuthor>> : l'auteur du module (sera ajouté dans le tag javadoc author des classes générées) + + * <<mojoName>> : Le nom du Mojo a créer (sera ensuite suffixé par Plugin) + + * <<mojoGoal>> : Le nom du goal a créer (dans le mojo du dessus) + + * <<mojoDescription>> : La description du goal à créer (se retrouvera dans la javadoc du plugin) + +Exemples + + Voir la page des {{{examples.html}exemples}}. Added: trunk/nuiton-mojo-goal/src/site/site.xml =================================================================== --- trunk/nuiton-mojo-goal/src/site/site.xml (rev 0) +++ trunk/nuiton-mojo-goal/src/site/site.xml 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="${project.name}"> + + <bannerLeft> + <name>${project.name}</name> + <href>index.html</href> + </bannerLeft> + + <body> + + <breadcrumbs> + <item name="${project.name}" href="${project.url}" /> + </breadcrumbs> + + <menu name="Utilisateur"> + <item name="Accueil" href="index.html"/> + <item name="Exemples" href="examples.html"/> + </menu> + + <menu name="Développeur"> + <item name="A faire" href="Todo.html"/> + </menu> + + <menu ref="reports"/> + + </body> +</project> Property changes on: trunk/nuiton-mojo-pom ___________________________________________________________________ Added: svn:ignore + target Added: trunk/nuiton-mojo-pom/LICENSE.txt =================================================================== --- trunk/nuiton-mojo-pom/LICENSE.txt (rev 0) +++ trunk/nuiton-mojo-pom/LICENSE.txt 2009-09-04 12:56:37 UTC (rev 5) @@ -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/nuiton-mojo-pom/README.txt =================================================================== --- trunk/nuiton-mojo-pom/README.txt (rev 0) +++ trunk/nuiton-mojo-pom/README.txt 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,2 @@ +To deploy new version of pom: mvn deploy +To install localy: mvn install Added: trunk/nuiton-mojo-pom/changelog.txt =================================================================== --- trunk/nuiton-mojo-pom/changelog.txt (rev 0) +++ trunk/nuiton-mojo-pom/changelog.txt 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,5 @@ +1.0.0 chemit 20090901 + + * First release + +-- chemit -- Tue, 01 Sep 2009 19:56:44 +0200 Added: trunk/nuiton-mojo-pom/pom.xml =================================================================== --- trunk/nuiton-mojo-pom/pom.xml (rev 0) +++ trunk/nuiton-mojo-pom/pom.xml 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <modelVersion>4.0.0</modelVersion> + + + <!-- ************************************************************* --> + <!-- *** POM Relationships *************************************** --> + <!-- ************************************************************* --> + + <parent> + <groupId>org.nuiton</groupId> + <artifactId>archetype</artifactId> + <version>1.0.0-SNAPSHOT</version> + </parent> + + <groupId>org.nuiton.archetype</groupId> + <artifactId>nuiton-mojo-pom</artifactId> + + <!-- ************************************************************* --> + <!-- *** Project Information ************************************* --> + <!-- ************************************************************* --> + + <name>Nuiton mojo project archetype</name> + <description>Archetype to generate an empty nuiton mojo project</description> + + <!-- ************************************************************* --> + <!-- *** Build Settings ****************************************** --> + <!-- ************************************************************* --> + + <packaging>maven-archetype</packaging> + + <build> + <!--extensions> + <extension> + <groupId>org.apache.maven.archetype</groupId> + <artifactId>archetype-packaging</artifactId> + <version>${archetype.version}</version> + </extension> + </extensions--> + <plugins> + <plugin> + <artifactId>maven-archetype-plugin</artifactId> + <!--extensions>true</extensions--> + </plugin> + </plugins> + + </build> + + <!-- ************************************************************* --> + <!-- *** Build Environment ************************************** --> + <!-- ************************************************************* --> + +</project> Added: trunk/nuiton-mojo-pom/src/main/resources/META-INF/maven/archetype-metadata.xml =================================================================== --- trunk/nuiton-mojo-pom/src/main/resources/META-INF/maven/archetype-metadata.xml (rev 0) +++ trunk/nuiton-mojo-pom/src/main/resources/META-INF/maven/archetype-metadata.xml 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<archetype-descriptor name="nuiton-mojo-pom"> + <requiredProperties> + <requiredProperty key="projectName"/> + <requiredProperty key="projectDescription"/> + <requiredProperty key="projectInceptionYear"/> + <requiredProperty key="mavenpomversion"/> + </requiredProperties> + <fileSets> + <fileSet encoding="UTF-8" filtered="true"> + <directory>src/main/resources</directory> + <includes> + <include>log4j.properties</include> + </includes> + </fileSet> + <fileSet encoding="UTF-8" filtered="true"> + <directory>src/site</directory> + <includes> + <include>**/*.rst</include> + <include>**/*.xml</include> + </includes> + </fileSet> + <fileSet encoding="UTF-8"> + <directory></directory> + <includes> + <include>LICENSE.txt</include> + <include>README.txt</include> + </includes> + </fileSet> + <fileSet encoding="UTF-8" filtered="true"> + <directory></directory> + <includes> + <include>changelog.txt</include> + </includes> + </fileSet> + </fileSets> +</archetype-descriptor> \ No newline at end of file Added: trunk/nuiton-mojo-pom/src/main/resources/META-INF/maven/archetype.xml =================================================================== --- trunk/nuiton-mojo-pom/src/main/resources/META-INF/maven/archetype.xml (rev 0) +++ trunk/nuiton-mojo-pom/src/main/resources/META-INF/maven/archetype.xml 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<archetype> + <id>nuiton-mojo-pom</id> + <resources> + <resource>src/main/resources/log4j.properties</resource> + <resource>LICENSE.txt</resource> + <resource>README.txt</resource> + <resource>changelog.txt</resource> + </resources> + <siteResources> + <resource>src/site/rst/Todo.rst</resource> + <resource>src/site/rst/usage.rst</resource> + <resource>src/site/rst/index.rst</resource> + <resource>src/site/site.xml</resource> + </siteResources> +</archetype> \ No newline at end of file Added: trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/LICENSE.txt =================================================================== --- trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/LICENSE.txt (rev 0) +++ trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/LICENSE.txt 2009-09-04 12:56:37 UTC (rev 5) @@ -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/nuiton-mojo-pom/src/main/resources/archetype-resources/README.txt =================================================================== --- trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/README.txt (rev 0) +++ trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/README.txt 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,2 @@ +To deploy new version of pom: mvn deploy +To install localy: mvn install Added: trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/changelog.txt =================================================================== --- trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/changelog.txt (rev 0) +++ trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/changelog.txt 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,5 @@ +${artifactId} (${version}) stable; urgency=low + + * //TODO_FILL_ME + + -- author -- date -R Added: trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/pom.xml =================================================================== --- trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/pom.xml (rev 0) +++ trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/pom.xml 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,149 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <!-- ************************************************************* --> + <!-- *** POM Relationships *************************************** --> + <!-- ************************************************************* --> + <parent> + <groupId>org.nuiton</groupId> + <artifactId>mavenpom</artifactId> + <version>${mavenpomversion}</version> + </parent> + + <artifactId>${artifactId}</artifactId> + + <groupId>${groupId}</groupId> + <version>${version}</version> + + <dependencies> + + <dependency> + <groupId>org.nuiton</groupId> + <artifactId>maven-helper-plugin</artifactId> + <version>${helper.version}</version> + <scope>compile</scope> + </dependency> + + <!-- FIXME si on ne le rajoute pas, on se retrouve avec la version 1.1 qui ne convient pas --> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-utils</artifactId> + <version>1.5.15</version> + <scope>compile</scope> + </dependency> + + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-project</artifactId> + <version>${maven.version}</version> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-plugin-api</artifactId> + <version>${maven.version}</version> + <scope>provided</scope> + </dependency> + + <!-- tests dependencies --> + + <dependency> + <groupId>org.nuiton</groupId> + <artifactId>maven-helper-plugin</artifactId> + <version>${helper.version}</version> + <scope>test</scope> + <classifier>tests</classifier> + </dependency> + + <dependency> + <groupId>org.apache.maven.shared</groupId> + <artifactId>maven-plugin-testing-harness</artifactId> + <version>1.1</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.6</version> + <scope>test</scope> + </dependency> + + </dependencies> + + <!-- ************************************************************* --> + <!-- *** Project Information ************************************* --> + <!-- ************************************************************* --> + <name>${projectName}</name> + + <description>${projectDescription}</description> + + <inceptionYear>${projectInceptionYear}</inceptionYear> + + <url>http://maven-site.nuiton.org/${artifactId}</url> + + <!-- ************************************************************* --> + <!-- *** Build Settings ****************************************** --> + <!-- ************************************************************* --> + + <packaging>maven-plugin</packaging> + + <build> + + <defaultGoal>install</defaultGoal> + + <plugins> + + <plugin> + <artifactId>maven-plugin-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>helpmojo</goal> + </goals> + </execution> + </executions> + </plugin> + + </plugins> + + <pluginManagement> + <plugins> + <plugin> + <artifactId>maven-site-plugin</artifactId> + <dependencies> + <dependency> + <groupId>org.nuiton.jrst</groupId> + <artifactId>doxia-module-jrst</artifactId> + <version>${jrst.version}</version> + </dependency> + </dependencies> + </plugin> + </plugins> + </pluginManagement> + + </build> + + <reporting> + <plugins> + <plugin> + <artifactId>maven-plugin-plugin</artifactId> + </plugin> + </plugins> + </reporting> + + <!-- ************************************************************* --> + <!-- *** Build Environment ************************************** --> + <!-- ************************************************************* --> + + <!-- Source control management. --> + <scm> + <connection>scm:svn:http://svn.nuiton.org/svn/${artifactId}/trunk</connection> + <developerConnection>scm:svn:http://svn.nuiton.org/svn/${artifactId}/trunk</developerConnection> + <url>http://www.nuiton.org/repositories/browse/${artifactId}/trunk</url> + </scm> + +</project> Added: trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/src/main/resources/log4j.properties =================================================================== --- trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/src/main/resources/log4j.properties (rev 0) +++ trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/src/main/resources/log4j.properties 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,11 @@ +# Global logging configuration +log4j.rootLogger=ERROR, stdout +# Console output... +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) %M - %m%n + +# package level + +log4j.logger.org.nuiton=INFO +log4j.logger.${package}=INFO \ No newline at end of file Added: trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/src/site/rst/Todo.rst =================================================================== --- trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/src/site/rst/Todo.rst (rev 0) +++ trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/src/site/rst/Todo.rst 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,4 @@ +TODO +==== + +Any idea ? Added: trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/src/site/rst/index.rst =================================================================== --- trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/src/site/rst/index.rst (rev 0) +++ trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/src/site/rst/index.rst 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,38 @@ +Introduction +------------ + +${artifactId} +==================== + +//TODO-FILL_ME + + +Presentation +~~~~~~~~~~~~ + +//TODO-FILL_ME + +Goals Overview +~~~~~~~~~~~~~~ + +The plugin has the following goals: + +//TODO-FILL_ME + + + * `help`_ display help about the plugin (goals, usage). + +Usage +~~~~~ + + Instructions on how to use the Plugin can be found on `usage`_ page + +Examples +~~~~~~~~ + + to be done. + +.. _help: help-mojo.html + +.. _usage: usage.html + \ No newline at end of file Added: trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/src/site/rst/usage.rst =================================================================== --- trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/src/site/rst/usage.rst (rev 0) +++ trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/src/site/rst/usage.rst 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,41 @@ +Usage +----- + +${mojoGoal} goal +================ + +${mojoDescription} + +:: + + //TODO-FILL_ME + +How does it work ? +~~~~~~~~~~~~~~~~~~ + +//TODO-FILL_ME + + +help goal +========= + + +This goal display the help of the plugin (available goals). + +Use it directly (and only) from commandline : + +:: + + mvn license:help + +To display verbose help : + +:: + + mvn license:help -Ddetail + +for full detail see `help`_ detail page. + +.. _${mojoGoal}: ${mojoGoal}-mojo.html + +.. _help: help-mojo.html Added: trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/src/site/site.xml =================================================================== --- trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/src/site/site.xml (rev 0) +++ trunk/nuiton-mojo-pom/src/main/resources/archetype-resources/src/site/site.xml 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,42 @@ +<?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://jrst.labs.libre-entreprise.org" 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="${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="${mojoGoal}" href="${mojoGoal}-mojo.html"/> + <item name="help" href="help-mojo.html"/> + </item> + </menu> + + <menu name="Téléchargement"> + <item href="${repository.home.url}/org/nuiton/${artifactId}/${project.version}/${project.build.finalName}.jar" + name="Librairie (jar)"/> + <item href="${repository.home.url}/org/nuiton/${artifactId}/${project.version}/${project.build.finalName}-javadoc.jar" + name="Javadoc (jar)"/> + <item href="${repository.home.url}/org/nuiton/${artifactId}/${project.version}/${project.build.finalName}-sources.jar" + name="Sources (jar)"/> + </menu> + + <menu ref="reports"/> + + </body> +</project> Added: trunk/nuiton-mojo-pom/src/site/apt/Todo.apt =================================================================== --- trunk/nuiton-mojo-pom/src/site/apt/Todo.apt (rev 0) +++ trunk/nuiton-mojo-pom/src/site/apt/Todo.apt 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,7 @@ +---- +TODO +---- +---- +2009-09-01 +---- + \ No newline at end of file Added: trunk/nuiton-mojo-pom/src/site/apt/examples.apt =================================================================== --- trunk/nuiton-mojo-pom/src/site/apt/examples.apt (rev 0) +++ trunk/nuiton-mojo-pom/src/site/apt/examples.apt 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,104 @@ +------ +Example +------ +------ +2009-09-01 +------ + +Lancer la commande de création + +------------------------------------------------------------------------------- + +mvn archetype:generate -DarchetypeCatalog=http://maven.nuiton.org/release \ + -DarchetypeGroupId=org.nuiton.archetype \ + -DarchetypeArtifactId=nuiton-mojo-pom + +[INFO] Scanning for projects... +[INFO] Searching repository for plugin with prefix: 'archetype'. +[INFO] ------------------------------------------------------------------------ +[INFO] Building Maven Default Project +[INFO] task-segment: [archetype:generate] (aggregator-style) +[INFO] ------------------------------------------------------------------------ +[INFO] Preparing archetype:generate +[INFO] No goals needed for project - skipping +[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'. +[INFO] Setting property: velocimacro.messages.on => 'false'. +[INFO] Setting property: resource.loader => 'classpath'. +[INFO] Setting property: resource.manager.logwhenfound => 'false'. +[INFO] [archetype:generate] +[INFO] Generating project in Interactive mode +[INFO] Archetype [org.nuiton:archetype-nuiton-mojo:1.0.0] found in catalog http://maven.nuiton.org/realse/ +------------------------------------------------------------------------------- + +Renseigner les valeurs requises + +------------------------------------------------------------------------------- +Define value for projectName: : Redmine maven Plugin +Define value for projectDescription: : Maven plugin to interact with a redmine server +Define value for projectInceptionYear: : 2009 +Define value for mavenpomversion: : 1.0.2 +Define value for groupId: : org.nuiton +Define value for artifactId: : maven-redmine-plugin +Define value for version: 1.0-SNAPSHOT: : 1.0.0-SNAPSHOT +Define value for package: org.nuiton: : org.nuiton.redmine.plugin +------------------------------------------------------------------------------- + +Confirmer les valeurs + +------------------------------------------------------------------------------- +Confirm properties configuration: +projectName: Redmine maven Plugin +projectDescription: Maven plugin to interact with a redmine server +projectInceptionYear: 2009 +mavenpomversion: 1.0.2 +groupId: org.nuiton +artifactId: maven-redmine-plugin +version: 1.0.0-SNAPSHOT +package: org.nuiton.redmine.plugin + Y: : y +------------------------------------------------------------------------------- + +Au final + + Le projet est créé dans le répertoire <maven-redmine-plugin> : + +------------------------------------------------------------------------------- +maven-redmine-plugin/ +|-- LICENSE.txt +|-- README.txt +|-- changelog.txt +|-- pom.xml +`-- src + |-- main + | |-- java + | `-- resources + | `-- log4j.properties + |-- site + | |-- rst + | | |-- Todo.rst + | | |-- index.rst + | | `-- usage.rst + | `-- site.xml + `-- test + |-- java + `-- resources +------------------------------------------------------------------------------- + +Note + + Il est aussi possible de lancer la commande de création en passant tous les + paramètres requis comme des variables d'environnement : + +------------------------------------------------------------------------------- +mvn archetype:generate -DarchetypeCatalog=http://maven.nuiton.org/release \ + -DarchetypeGroupId=org.nuiton.archetype \ + -DarchetypeArtifactId=nuiton-mojo-pom \ + -DprojectName="Redmine maven Plugin" \ + -DprojectDescription="Maven plugin to interact with a redmine server" \ + -DprojectInceptionYear=2009\ + -Dmavenpomversion=1.0.2-SNAPSHOT \ + -DgroupId=org.nuiton \ + -DartifactId=maven-redmine-plugin \ + -Dversion=1.0.0-SNAPSHOT \ + -Dpackage=org.nuiton.redmine.plugin +------------------------------------------------------------------------------- Added: trunk/nuiton-mojo-pom/src/site/apt/index.apt =================================================================== --- trunk/nuiton-mojo-pom/src/site/apt/index.apt (rev 0) +++ trunk/nuiton-mojo-pom/src/site/apt/index.apt 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,28 @@ +------ +Archetype Nuiton Mojo +------ +------ +2009-09-01 +------ + +Présentation + + Un archetype pour générer un module de type <maven-plugin> basé sur + {{{http://maven-site.nuiton.org/mavenpom}mavenpom}} et la plateforme + {{{http://www.nuiton.org}nuiton}}. + + Le projet généré possèdera un <mojo> et le test unitaire associé. + +Les propriétés de l'archetype + + * <<projectName>> : le nom du projet (contenu de la balise <name> du pom.xml) + + * <<projectDescription>> : la description du projet (contenu de la balise <description> du pom.xml) + + * <<projectInceptionYear>> : l'année de création du projet (contenu de la balise <inceptionYear> du pom.xml) + + * <<mavenpomversion>> : la version de mavenpom à utiliser dans le pom.xml + +Exemples + + Voir la page des {{{examples.html}exemples}}. Added: trunk/nuiton-mojo-pom/src/site/site.xml =================================================================== --- trunk/nuiton-mojo-pom/src/site/site.xml (rev 0) +++ trunk/nuiton-mojo-pom/src/site/site.xml 2009-09-04 12:56:37 UTC (rev 5) @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="${project.name}"> + + <bannerLeft> + <name>${project.name}</name> + <href>index.html</href> + </bannerLeft> + + <body> + + <breadcrumbs> + <item name="${project.name}" href="${project.url}" /> + </breadcrumbs> + + <menu name="Utilisateur"> + <item name="Accueil" href="index.html"/> + <item name="Exemples" href="examples.html"/> + </menu> + + <menu name="Développeur"> + <item name="A faire" href="Todo.html"/> + </menu> + + <menu ref="reports"/> + + </body> +</project> Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2009-09-04 12:00:55 UTC (rev 4) +++ trunk/pom.xml 2009-09-04 12:56:37 UTC (rev 5) @@ -15,15 +15,15 @@ <artifactId>archetype</artifactId> <version>1.0.0-SNAPSHOT</version> - <!--modules> + <modules> <module>nuiton-mojo-pom</module> <module>nuiton-mojo-goal</module> - </modules--> + </modules> <!-- ************************************************************* --> <!-- *** Project Information ************************************* --> <!-- ************************************************************* --> - <name>nuiton archetypes</name> + <name>Nuiton archetypes</name> <description>Nuiton archetype project</description> <inceptionYear>2009</inceptionYear> <url>http://maven-site.nuiton.org/archetypes</url> Modified: trunk/src/site/apt/index.apt =================================================================== --- trunk/src/site/apt/index.apt 2009-09-04 12:00:55 UTC (rev 4) +++ trunk/src/site/apt/index.apt 2009-09-04 12:56:37 UTC (rev 5) @@ -8,16 +8,16 @@ Présentation Ce projet contient l'ensemble des <archetypes> utilisés pour créer de nouveaux - projets basé sur la platefrom - {{{http://maven-site.nuiton.org/mavenpom}mavenpom}}. + projets basé sur la platefrom {{{http://www.nuiton.org}Nuiton}} ou + {{{http://www.chorem.org}Chorem}}. Créer un project de type <maven-plugin> Pour créer un projet de type <maven-plugin>, on dispose de deux archetypes à utiliser : - * {{{nuiton-mojo-pom/index.html}nuiton-mojo-pom} : pour initier le projet (création de la structure du projet sans aucune source). + * {{{nuiton-mojo-pom/index.html}nuiton-mojo-pom}} : pour initier le projet (création de la structure du projet sans aucune source). - * {{{nuiton-mojo-goal/index.html}nuiton-mojo-goal} : pour ajouter un goal dans le projet (ajout d'un mojo et du test unitaire associé). + * {{{nuiton-mojo-goal/index.html}nuiton-mojo-goal}} : pour ajouter un goal dans le projet (ajout d'un mojo et du test unitaire associé). Exemples
participants (1)
-
tchemit@users.nuiton.org