"versions:set" fails to update dependencies when "-f" option points to a file
with more than one subfolder in its path
----------------------------------------------------------------------------------------------------------------------
Key: MVERSIONS-84
URL: http://jira.codehaus.org/browse/MVERSIONS-84
Project: Maven 2.x Versions Plugin
Issue Type: Bug
Affects Versions: 1.1, 1.0
Environment: WinXP, JDK 5, maven 2.2.1
Reporter: Christoffer Børrild
Attachments: testcase.zip
I have an aggregator project that contains sub-modules with multi-level paths,
like e.g.:
aggregator pom:
{code:xml}
<?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>
<groupId>com.acme.corp</groupId>
<artifactId>my-aggregator-project</artifactId>
<packaging>pom</packaging>
<version>1.0</version>
<modules>
<module>SubModules/MySubModule1</module>
<module>SubModules/MySubModule2</module>
</modules>
</project>
{code}
"SubModules/MySubModule1" pom:
{code:xml}
<?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>
<groupId>com.acme.corp</groupId>
<artifactId>MySubModule1</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
</project>
{code}
"SubModules/MySubModule2" pom:
{code:xml}
<?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>
<groupId>com.acme.corp</groupId>
<artifactId>MySubModule2</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>com.acme.corp</groupId>
<artifactId>MySubModule1</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</project>
{code}
When I'm calling
{code}
D:/testcase/bad/mvn org.codehaus.mojo:versions-maven-plugin:1.1:set
-DnewVersion=1.1-SNAPSHOT -f "SubModules\MySubModule1\pom.xml"
{code}
my "SubModules\MySubModule1\pom.xml" gets the new version but the dependency in
"SubModules\MySubModule2\pom.xml" does not get updated.
If I move the "SubModules\MySubModule1\pom.xml" up one level to a direct
subfolder of the aggregator project folder (and adjust the aggregator pom
accordingly) (as in testcase/good) and uses the command:
{code}
D:/testcase/good/mvn org.codehaus.mojo:versions-maven-plugin:1.1:set
-DnewVersion=1.1-SNAPSHOT -f "MySubModule1\pom.xml"
{code}
from the aggregator folder it works as expected and the dependency in
"SubModules\MySubModule2\pom.xml" does get updated!?!
I've added the two to examples "testcase/bad" and "testcase/good" that shows
the error (note that this is not a "junit testcase").
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email