Author: tchemit Date: 2012-11-11 19:04:30 +0100 (Sun, 11 Nov 2012) New Revision: 887 Url: http://nuiton.org/repositories/revision/maven-helper-plugin/887 Log: refs #2422: Introduce a new mojo to transform a project version (add mojo doc) Modified: trunk/helper-maven-plugin/src/site/apt/index.apt trunk/helper-maven-plugin/src/site/apt/mojo-examples.apt trunk/helper-maven-plugin/src/site/apt/mojo-usages.apt Modified: trunk/helper-maven-plugin/src/site/apt/index.apt =================================================================== --- trunk/helper-maven-plugin/src/site/apt/index.apt 2012-11-11 13:03:02 UTC (rev 886) +++ trunk/helper-maven-plugin/src/site/apt/index.apt 2012-11-11 18:04:30 UTC (rev 887) @@ -43,6 +43,8 @@ * {{{./check-auto-container-mojo.html} helper:check-auto-container}} to check if project is auto-contained in some repositories. + * {{{./transform-project-version-mojo.html} helper:transform-project-version}} to compute a version using a revision and a pattern and store it in your model. + Consult the {{{./mojo-usages.html}usages}} page to have more details of mojos. Consult the {{{./mojo-examples.html}examples}} page to have some examples of mojos. Modified: trunk/helper-maven-plugin/src/site/apt/mojo-examples.apt =================================================================== --- trunk/helper-maven-plugin/src/site/apt/mojo-examples.apt 2012-11-11 13:03:02 UTC (rev 886) +++ trunk/helper-maven-plugin/src/site/apt/mojo-examples.apt 2012-11-11 18:04:30 UTC (rev 887) @@ -129,21 +129,21 @@ -------------------------------------------------------------------------------- <plugin> -<groupId>org.nuiton</groupId> -<artifactId>helper-maven-plugin</artifactId> -<executions> - <execution> - <id>check-central-safe</id> - <inherited>true</inherited> - <goals> - <goal>check-auto-container</goal> - </goals> - <phase>validate</phase> - <configuration> - <addMavenCentral>true</addMavenCentral> - </configuration> - </execution> -</executions> + <groupId>org.nuiton</groupId> + <artifactId>helper-maven-plugin</artifactId> + <executions> + <execution> + <id>check-central-safe</id> + <inherited>true</inherited> + <goals> + <goal>check-auto-container</goal> + </goals> + <phase>validate</phase> + <configuration> + <addMavenCentral>true</addMavenCentral> + </configuration> + </execution> + </executions> </plugin> -------------------------------------------------------------------------------- @@ -155,24 +155,48 @@ -------------------------------------------------------------------------------- <plugin> -<groupId>org.nuiton</groupId> -<artifactId>helper-maven-plugin</artifactId> -<executions> - <execution> - <id>check-central-safe</id> - <inherited>true</inherited> - <goals> - <goal>check-auto-container</goal> - </goals> - <phase>validate</phase> - <configuration> - <repositories> - <nuiton-central-releases> - http://nexus.nuiton.org/nexus/content/repositories/nuiton-central-releases - </nuiton-central-releases> - </repositories> - </configuration> - </execution> -</executions> + <groupId>org.nuiton</groupId> + <artifactId>helper-maven-plugin</artifactId> + <executions> + <execution> + <id>check-central-safe</id> + <inherited>true</inherited> + <goals> + <goal>check-auto-container</goal> + </goals> + <phase>validate</phase> + <configuration> + <repositories> + <nuiton-central-releases> + http://nexus.nuiton.org/nexus/content/repositories/nuiton-central-releases + </nuiton-central-releases> + </repositories> + </configuration> + </execution> + </executions> </plugin> -------------------------------------------------------------------------------- + +transform-project-version + + Compute your project version {1.0} with a injected scm revision + +-------------------------------------------------------------------------------- +<plugin> + <groupId>org.nuiton</groupId> + <artifactId>helper-maven-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>transform-project-version</goal> + </goals> + <phase>validate</phase> + <configuration> + <revision>2</revision> + </configuration> + </execution> + </executions> +</plugin> +-------------------------------------------------------------------------------- + + The result {1.0-rev-2} will be stored in property {newVersion}. Modified: trunk/helper-maven-plugin/src/site/apt/mojo-usages.apt =================================================================== --- trunk/helper-maven-plugin/src/site/apt/mojo-usages.apt 2012-11-11 13:03:02 UTC (rev 886) +++ trunk/helper-maven-plugin/src/site/apt/mojo-usages.apt 2012-11-11 18:04:30 UTC (rev 887) @@ -106,4 +106,12 @@ [] See {{{./mojo-examples.html#check-auto-container}examples page}}. - \ No newline at end of file + +transform-project-version + + This mojo permits to transform your project version and store the result in a + model property. + + Note that the version is not changed in your pom, but just computed. + + See {{{./mojo-examples.html#transform-project-version}examples page}}.