Hi Robert,
you can't use properties within the project's artifactId or the parent
declaration (except for a few exceptions where it is expected to be
provided by command line, see https://issues.apache.org/jira/browse/MNG-5576
)
I would recommend you to have a look at the maven-release layout on
https://github.com/apache/maven-release. It is implementing the standard
versioning scheme to deal with this with maven.
Vincent
2015-10-06 22:01 GMT+02:00 Robert Patrick :
> Hi,
>
>
>
> I am trying to use the release plugin with a new project where I want the
> entire project to use a single version number (vs. one version number per
> module). I have the single version number part working like this:
>
>
>
> 1.)In my parent pom, I do the following:
>
> test
>
> snapshots-parent
>
> 1.0.1-SNAPSHOT
>
> pom
>
>
>
>
>
> ${project.version}
>
>
>
>
>
> 2.)In my submodule POMs, I do the following:
>
> snapshots-consumer
>
> jar
>
> snapshots-consumer
>
>
>
>
>
> test
>
> snapshots-parent
>
> ${my-project-version}
>
> ../parent/pom.xml
>
>
>
>
>
>
>
>
>
> ${project.parent.groupId}
>
> snapshots-util
>
> ${project.parent.version}
>
>
>
>
>
>
>
> This all works fine. Unfortunately, when I run the release plugin's
> release:prepare goal, it replaces gthe parent version in all of my
> submodule POMs with the hard-coded value:
>
>
>
> test
>
> snapshots-parent
>
> 1.0.1
>
> ../parent/pom.xml
>
>
>
>
>
> It should would be nice if I could figure out a way to get it to not do
> this.
>
>
>
> Any thoughts?
>
> Robert
>
>
>