Hi
I'm using the versions-maven-plugin during our semi-automated release process
to set a version.
However, I have a problem whenever the version of the project is the same as
the one in the parent.
Maven 3 shows a warning if the versions are the same, but if I remove the
version (which seems reasonable), I get an error from the versions plugin:
Failed to execute goal org.codehaus.mojo:versions-maven-plugin:1.3.1:set
(default-cli) on project external-versions: Project version is inherited from
parent.
Here's the POM I'm trying to modify:
<parent>
<groupId>whatever</groupId>
<artifactId>my-parent</artifactId>
<version>1.13.0-SNAPSHOT</version>
<relativePath />
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
<artifactId>external-versions</artifactId>
...
And I try to modify it with
mvn org.codehaus.mojo:versions-maven-plugin:1.3.1:set
-DnewVersion=1.13.0-SNAPSHOT
If I create an identical version with
<parent>
<groupId>whatever</groupId>
<artifactId>my-parent</artifactId>
<version>1.13.0-SNAPSHOT</version>
<relativePath />
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
<version>1.13.0-SNAPSHOT</version>
<artifactId>external-versions</artifactId>
then it works.
What am I doing wrong?
(Yes, what I'm trying to do seems stupid, but I don't want to change the
command depending on whether the child inherits the version from its parent or
not - besides I don't know how I would find out whether it has its own version
or not. Also, sometimes the version is inherited from the parent and sometimes
not.)
Best regards,
Eric
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]