Hi,

On 9/16/15 1:50 AM, Jordan Zimmerman wrote:
Is there any way (using plugins, whatever) to get a stable reference to the 
root project version? Here is what I’m trying to do. I have a reactor project:

pom.xml
         module1/pom.xml
         module2/pom.xml

The wrinkle is that the root pom.xml has a parent (for example foo:bar:1.2).
> foo.bar has several of its own modules that I want to use.
>  So, in the root pom.xml I want to have a dependency from foo,
> in module1’s pom I want to have a dependency from foo etc.

If you are making a multi module build you can always use ${project.version} ...? Can you make an example project of what you have tried and put it on github or something similar that we have something concrete where we can talk about...

Kind regards
Karl Heinz Marbaise

>
There seems to be no way to create a Maven property that matches foo’s version. If in the root pom I have:

<properties>
         <foo-version>${project.parent.version}</foo-version>
</properties>
                
This won’t work in module1/2’s pom as it will reference the root pom’s version, 
not foo. The only thing that works is to hard code:

<properties>
         <foo-version>1.2</foo-version>
</properties>

But this means that I’m specifying foo’s version twice. Once in the parent tag 
and once as a property. Is there no way around this?

-Jordan



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to