Author: tchemit Date: 2012-11-11 14:03:02 +0100 (Sun, 11 Nov 2012) New Revision: 886 Url: http://nuiton.org/repositories/revision/maven-helper-plugin/886 Log: fixes #2422: Introduce a new mojo to transform a project version Added: trunk/helper-maven-plugin/src/main/java/org/nuiton/helper/plugin/TransformProjectVersionMojo.java trunk/helper-maven-plugin/src/test/java/org/nuiton/helper/plugin/TransformProjectVersionMojoTest.java trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/ trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/badVersionPattern1.xml trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/badVersionPattern2.xml trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/badVersionPattern3.xml trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/keepSnapshot.xml trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/removeSnapshot.xml trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/simple.xml Added: trunk/helper-maven-plugin/src/main/java/org/nuiton/helper/plugin/TransformProjectVersionMojo.java =================================================================== --- trunk/helper-maven-plugin/src/main/java/org/nuiton/helper/plugin/TransformProjectVersionMojo.java (rev 0) +++ trunk/helper-maven-plugin/src/main/java/org/nuiton/helper/plugin/TransformProjectVersionMojo.java 2012-11-11 13:03:02 UTC (rev 886) @@ -0,0 +1,235 @@ +package org.nuiton.helper.plugin; + +/* + * #%L + * Helper Maven Plugin :: Mojos + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2012 CodeLutin, Tony Chemit + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ + +import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.project.MavenProject; +import org.nuiton.plugin.AbstractPlugin; + +import java.util.Properties; + +/** + * Transform the version of the project and store it in a project property. + * + * @author tchemit <chemit@codelutin.com> + * @since 2.0 + */ +@Mojo(name = "transform-project-version", + defaultPhase = LifecyclePhase.INITIALIZE, + aggregator = true, + requiresProject = true) +public class TransformProjectVersionMojo extends AbstractPlugin { + + public static final String SNAPSHOT_SUFFIX = "-SNAPSHOT"; + + /** + * Project. + * + * @since 2.0 + */ + @Component + private MavenProject project; + + /** + * Scm revision to use. + * + * @since 2.0 + */ + @Parameter(property = "helper.revision", required = true) + private String revision; + + + /** + * Pattern of the new version. + * <p/> + * Use {@code #V} for project version (without snapshot suffix) and + * {@code #R} for the given scm revision and #S to add snapshot suffix + * <p/> + * Example: + * <p/> + * <pre> + * #V-rev-#V -> 1.0-rev-1 (version=1.0 and revision=1) + * #V-rev-#V#S -> 1.0-rev-1-SNAPSHOT (version=1.0 and revision=1) + * #V-rev-#V#S -> 1.0-rev-1-SNAPSHOT (version=1.0-SNAPSHOT and revision=1) + * </pre> + * <p/> + * Note that the #S can only be putted at the end of the pattern + * + * @since 2.0 + */ + @Parameter(property = "helper.newVersionPattern", defaultValue = "#V-rev-#R") + private String newVersionPattern = "#V-rev-#R"; + + /** + * The project property where to store the version. + * + * @since 2.0 + */ + @Parameter(property = "helper.versionKey", defaultValue = "newVersion", + required = true) + private String versionKey = "newVersion"; + + /** + * A flag to activate verbose mode. + * + * @since 2.0 + */ + @Parameter(property = "helper.verbose", defaultValue = "${maven.verbose}") + private boolean verbose; + + /** + * A flag to execute only once the mojo. + * <p/> + * <b>Note:</b> By default, value is {@code true} since it is not necessary + * to inject twice secrets in session. + * + * @since 1.1.0 + */ + @Parameter(property = "helper.runOnce", defaultValue = "true") + private boolean runOnce; + + @Override + public boolean checkSkip() { + + boolean result = true; + if (runOnce) { + + // compute the unique key refering to parameters of plugin + String key = "transform-project-version##" + revision; + + // check if plugin was already done. + + if (isVerbose()) { + getLog().info("check if already done for key : " + key); + } + Object value = project.getProperties().get(key); + if (value != null) { + + // ok was already done + getLog().info("Goal was already executed, will skip goal."); + result = false; + } else { + + long timestamp = System.nanoTime(); + project.getProperties().put(key, timestamp + ""); + if (isVerbose()) { + getLog().info("Adding cache key " + key + + " with timestamp " + timestamp); + } + } + } + return result; + } + + @Override + protected void init() throws Exception { + + // validate the newVersionPattern + if (!newVersionPattern.contains("#V") && + !newVersionPattern.contains("#R")) { + throw new MojoExecutionException( + "newVersionPattern (" + newVersionPattern + + ") must at least contains one of those patterns:" + + " *#V* or *#R*."); + } + + if (newVersionPattern.contains("#S")) { + + // check that there is only one of it and at the end + int firstIndex = newVersionPattern.indexOf("#S"); + int lastIndex = newVersionPattern.lastIndexOf("#S"); + + if (firstIndex != lastIndex) { + throw new MojoExecutionException( + "newVersionPattern (" + newVersionPattern + + ") can only contains one pattern *#S*."); + } + + if (lastIndex != newVersionPattern.length() - 2) { + throw new MojoExecutionException( + "newVersionPattern (" + newVersionPattern + + ") can only contains pattern *#S* at his end."); + } + } + + } + + @Override + protected void doAction() throws Exception { + String version = getProject().getVersion(); + + if (isVerbose()) { + getLog().info("Initial version: " + version); + } + + boolean snapshotFound = version.endsWith(SNAPSHOT_SUFFIX); + if (snapshotFound) { + + // remove snapshot + version = version.substring(0, version.length() - + SNAPSHOT_SUFFIX.length()); + } + + String newVersion = newVersionPattern.replaceAll("#V", version); + + newVersion = newVersion.replaceAll("#R", revision); + newVersion = newVersion.replaceAll("#S", SNAPSHOT_SUFFIX); + + if (isVerbose()) { + getLog().info("New version: " + newVersion); + } + + Properties properties = project.getProperties(); + + getLog().info("export newVersion [" + newVersion + "] " + + " in ${" + versionKey + "}"); + + properties.setProperty(versionKey, newVersion); + } + + @Override + public MavenProject getProject() { + return project; + } + + @Override + public void setProject(MavenProject project) { + this.project = project; + } + + @Override + public boolean isVerbose() { + return verbose; + } + + @Override + public void setVerbose(boolean verbose) { + this.verbose = verbose; + } +} Property changes on: trunk/helper-maven-plugin/src/main/java/org/nuiton/helper/plugin/TransformProjectVersionMojo.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/helper-maven-plugin/src/test/java/org/nuiton/helper/plugin/TransformProjectVersionMojoTest.java =================================================================== --- trunk/helper-maven-plugin/src/test/java/org/nuiton/helper/plugin/TransformProjectVersionMojoTest.java (rev 0) +++ trunk/helper-maven-plugin/src/test/java/org/nuiton/helper/plugin/TransformProjectVersionMojoTest.java 2012-11-11 13:03:02 UTC (rev 886) @@ -0,0 +1,127 @@ +package org.nuiton.helper.plugin; + +/* + * #%L + * Helper Maven Plugin :: Mojos + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2012 CodeLutin, Tony Chemit + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.junit.Assert; +import org.junit.Test; +import org.nuiton.plugin.AbstractMojoTest; + +import java.io.File; +import java.util.Properties; + +/** + * @author tchemit <chemit@codelutin.com> + * @since 2.0 + */ +public class TransformProjectVersionMojoTest extends AbstractMojoTest<TransformProjectVersionMojo> { + + /** Logger. */ + private static final Log log = + LogFactory.getLog(TransformProjectVersionMojoTest.class); + + protected boolean canContinue; + + @Override + protected String getGoalName(String methodName) { + return "transform-project-version"; + } + + @Override + protected void setUpMojo(TransformProjectVersionMojo mojo, File pomFile) throws Exception { + super.setUpMojo(mojo, pomFile); + + try { + mojo.init(); + canContinue = true; + } catch (Exception e) { + + canContinue = false; + + if (log.isDebugEnabled()) { + log.debug("Could not init mojo ", e); + } + } + } + + @Test + public void simple() throws Exception { + + Assert.assertTrue(canContinue); + Assert.assertNotNull(getMojo()); + getMojo().doAction(); + + assertNewVersion("newVersion", "1.0-rev-1"); + } + + @Test + public void keepSnapshot() throws Exception { + + Assert.assertTrue(canContinue); + Assert.assertNotNull(getMojo()); + getMojo().doAction(); + + assertNewVersion("newVersion", "2.0-rev-2-SNAPSHOT"); + } + + @Test + public void removeSnapshot() throws Exception { + + Assert.assertTrue(canContinue); + Assert.assertNotNull(getMojo()); + getMojo().doAction(); + + assertNewVersion("newVersion", "2.0-rev-2"); + } + + @Test + public void badVersionPattern1() throws Exception { + + Assert.assertFalse(canContinue); + } + + @Test + public void badVersionPattern2() throws Exception { + + Assert.assertFalse(canContinue); + } + + @Test + public void badVersionPattern3() throws Exception { + + Assert.assertFalse(canContinue); + } + + protected void assertNewVersion(String versionKey, + String expectedNewVersion) { + + Properties properties = getMojo().getProject().getProperties(); + Object newVersion = properties.get(versionKey); + Assert.assertNotNull(newVersion); + Assert.assertEquals(expectedNewVersion, newVersion); + } + +} \ No newline at end of file Property changes on: trunk/helper-maven-plugin/src/test/java/org/nuiton/helper/plugin/TransformProjectVersionMojoTest.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/badVersionPattern1.xml =================================================================== --- trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/badVersionPattern1.xml (rev 0) +++ trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/badVersionPattern1.xml 2012-11-11 13:03:02 UTC (rev 886) @@ -0,0 +1,52 @@ +<!-- + #%L + Helper Maven Plugin :: Mojos + $Id$ + $HeadURL:$ + %% + Copyright (C) 2009 - 2012 CodeLutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + <http://www.gnu.org/licenses/lgpl-3.0.html>. + #L% + --> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + <groupId>org.nuiton.test</groupId> + <artifactId>test-transform-project-version</artifactId> + <version>2.0-SNAPSHOT</version> + <build> + + <plugins> + <plugin> + <groupId>org.nuiton</groupId> + <artifactId>helper-maven-plugin</artifactId> + <configuration> + <revision>2</revision> + <newVersionPattern>#S</newVersionPattern> + </configuration> + <executions> + <execution> + <goals> + <goal>transform-project-version</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> \ No newline at end of file Property changes on: trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/badVersionPattern1.xml ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/badVersionPattern2.xml =================================================================== --- trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/badVersionPattern2.xml (rev 0) +++ trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/badVersionPattern2.xml 2012-11-11 13:03:02 UTC (rev 886) @@ -0,0 +1,52 @@ +<!-- + #%L + Helper Maven Plugin :: Mojos + $Id$ + $HeadURL:$ + %% + Copyright (C) 2009 - 2012 CodeLutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + <http://www.gnu.org/licenses/lgpl-3.0.html>. + #L% + --> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + <groupId>org.nuiton.test</groupId> + <artifactId>test-transform-project-version</artifactId> + <version>2.0-SNAPSHOT</version> + <build> + + <plugins> + <plugin> + <groupId>org.nuiton</groupId> + <artifactId>helper-maven-plugin</artifactId> + <configuration> + <revision>2</revision> + <newVersionPattern>#S#V-rev-#R</newVersionPattern> + </configuration> + <executions> + <execution> + <goals> + <goal>transform-project-version</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> \ No newline at end of file Property changes on: trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/badVersionPattern2.xml ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/badVersionPattern3.xml =================================================================== --- trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/badVersionPattern3.xml (rev 0) +++ trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/badVersionPattern3.xml 2012-11-11 13:03:02 UTC (rev 886) @@ -0,0 +1,52 @@ +<!-- + #%L + Helper Maven Plugin :: Mojos + $Id$ + $HeadURL:$ + %% + Copyright (C) 2009 - 2012 CodeLutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + <http://www.gnu.org/licenses/lgpl-3.0.html>. + #L% + --> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + <groupId>org.nuiton.test</groupId> + <artifactId>test-transform-project-version</artifactId> + <version>2.0-SNAPSHOT</version> + <build> + + <plugins> + <plugin> + <groupId>org.nuiton</groupId> + <artifactId>helper-maven-plugin</artifactId> + <configuration> + <revision>2</revision> + <newVersionPattern>#S#V-rev-#R#S</newVersionPattern> + </configuration> + <executions> + <execution> + <goals> + <goal>transform-project-version</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> \ No newline at end of file Property changes on: trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/badVersionPattern3.xml ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/keepSnapshot.xml =================================================================== --- trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/keepSnapshot.xml (rev 0) +++ trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/keepSnapshot.xml 2012-11-11 13:03:02 UTC (rev 886) @@ -0,0 +1,52 @@ +<!-- + #%L + Helper Maven Plugin :: Mojos + $Id$ + $HeadURL:$ + %% + Copyright (C) 2009 - 2012 CodeLutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + <http://www.gnu.org/licenses/lgpl-3.0.html>. + #L% + --> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + <groupId>org.nuiton.test</groupId> + <artifactId>test-transform-project-version</artifactId> + <version>2.0-SNAPSHOT</version> + <build> + + <plugins> + <plugin> + <groupId>org.nuiton</groupId> + <artifactId>helper-maven-plugin</artifactId> + <configuration> + <revision>2</revision> + <newVersionPattern>#V-rev-#R#S</newVersionPattern> + </configuration> + <executions> + <execution> + <goals> + <goal>transform-project-version</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> \ No newline at end of file Property changes on: trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/keepSnapshot.xml ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/removeSnapshot.xml =================================================================== --- trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/removeSnapshot.xml (rev 0) +++ trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/removeSnapshot.xml 2012-11-11 13:03:02 UTC (rev 886) @@ -0,0 +1,52 @@ +<!-- + #%L + Helper Maven Plugin :: Mojos + $Id$ + $HeadURL:$ + %% + Copyright (C) 2009 - 2012 CodeLutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + <http://www.gnu.org/licenses/lgpl-3.0.html>. + #L% + --> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + <groupId>org.nuiton.test</groupId> + <artifactId>test-transform-project-version</artifactId> + <version>2.0-SNAPSHOT</version> + <build> + + <plugins> + <plugin> + <groupId>org.nuiton</groupId> + <artifactId>helper-maven-plugin</artifactId> + <configuration> + <revision>2</revision> + <newVersionPattern>#V-rev-#R</newVersionPattern> + </configuration> + <executions> + <execution> + <goals> + <goal>transform-project-version</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> \ No newline at end of file Property changes on: trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/removeSnapshot.xml ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/simple.xml =================================================================== --- trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/simple.xml (rev 0) +++ trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/simple.xml 2012-11-11 13:03:02 UTC (rev 886) @@ -0,0 +1,52 @@ +<!-- + #%L + Helper Maven Plugin :: Mojos + $Id$ + $HeadURL:$ + %% + Copyright (C) 2009 - 2012 CodeLutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + <http://www.gnu.org/licenses/lgpl-3.0.html>. + #L% + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + <groupId>org.nuiton.test</groupId> + <artifactId>test-transform-project-version</artifactId> + <version>1.0</version> + <build> + + <plugins> + <plugin> + <groupId>org.nuiton</groupId> + <artifactId>helper-maven-plugin</artifactId> + <configuration> + <revision>1</revision> + </configuration> + <executions> + <execution> + <goals> + <goal>transform-project-version</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> \ No newline at end of file Property changes on: trunk/helper-maven-plugin/src/test/resources/org/nuiton/helper/plugin/transformProjectVersionMojoTest/simple.xml ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native