Actually I am doing the same way by calling
mvn org.apache.maven.plugins:maven-release-plugin:2.0-beta-9:clean
org.apache.maven.plugins:maven-release-plugin:2.0-beta-9:prepare
-Dtest.version=5
org.apache.maven.plugins:maven-release-plugin:2.0-beta-9:perform
-DdryRun=true -Dtest.version=5
But it doesnot work
Below is how my actual pom.xml look like
<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">
<parent>
<artifactId>test</artifactId>
<groupId>com.test</groupId>
<version>2.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.test.data</groupId>
<artifactId>DataManager</artifactId>
<name>Data Manager</name>
<version>2.1-SNAPSHOT</version>
<description />
<scm>
<url>http://<hostname>/test/trunk/DataManager</url>
<connection>scm:svn:https://<hostname>/test/trunk/DataManager</connection>
<developerConnection>scm:svn:https://<hostname>/test/trunk/DataManager</developerConnection>
</scm>
<dependencies>
<dependency>
<groupId>com.test.data</groupId>
<artifactId>UtilLib</artifactId>
<version>${test.version}</version>
</dependency>
</dependencies>
</project>
Parent pom.xml is given below
<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>com.test</groupId>
<artifactId>test</artifactId>
<packaging>pom</packaging>
<name>Test</name>
<version>2.1-SNAPSHOT</version>
<properties>
<test.version>1.0-SNAPSHOT</test.version>
</properties>
<modules>
<module>DataManager</module>
</modules>
<scm>
<url>http://<hostname>/test/trunk</url>
<connection>scm:svn:https://<hostname>/test/trunk</connection>
<developerConnection>scm:svn:https://<hostname>/test/trunk</developerConnection>
</scm>
</project>
Post by Brian FoxThe problem is that this version isn't being passed to the forked
execution of Maven that is actually performing the release. There is a
way to do that, I'll have to look it up, but generally you would be
better off with your source representing what you intend to release,
and only have the command line overrides for one-offs in development.
Otherwise your tag represents something other than what you released.
A big problem in my book...
http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html#arguments
Post by arulanandI am overriding from the command prompt using -Dtest.version=5
How are you overriding it? With
-Dtest.version=5
?
I'm assuming that you don't have that value in your settings.xml file.
mvn help:effective-pom -Dtest.version=5
Jim
On Wed, Sep 2, 2009 at 2:45 PM, Arul Anand S P
Post by Arul Anand S Phi all,
I am having a property named test.version in parent pom.xml
<properties>
<test.version>8</test.version>
</properties>
and I have a the below entry in child pom.xml
<dependencies>
<dependency>
<groupId>com.test.data</groupId>
<artifactId>UtilLibrary</artifactId>
<version>${test.version}</version>
</dependency>
</dependencies>
While executing the release:prepare from the command prompt I am over-riding
the value of the property test.version to 5
But the child pom.xml still takes the value 8 instead of 5 and is
trying
to
download the file UtilLibrary-8.jar instead of UtilLibrary-5.jar
Please help in resolving this
--
http://www.nabble.com/Overriding-the-property-value-in-child-pom.xml-tp25271120p25280841.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
---------------------------------------------------------------------
--
View this message in context: http://www.nabble.com/Overriding-the-property-value-in-child-pom.xml-tp25271120p25299898.html
Sent from the Maven - Users mailing list archive at Nabble.com.