Re: ${project.parent.parent.version} does not work

2016-12-05 Thread Christian Schulte
Am 12/05/16 um 21:51 schrieb Florian Schätz: > shared-core pom.xml (pom) > - shared-core module1 pom.xml (jar) > - shared-core module2 pom.xml (jar) > - application1 parent pom.xml (pom) > - application 1 module 1 pom.xml (jar) > - application 1 module 2 pom.xml (jar) > -

Re: ${project.parent.parent.version} does not work

2016-12-05 Thread Christian Schulte
Am 12/05/16 um 21:51 schrieb Florian Schätz: > Hello, > > On 05/12/2016 21:37, Christian Schulte wrote: > >> Only way to get at that would be to declare a property in that >> grandparent's POM. The parent/child hierarchies really are used in the >> opposite way. You inherit versions from

Re: ${project.parent.parent.version} does not work

2016-12-05 Thread Florian Schätz
Hello, On 05/12/2016 21:37, Christian Schulte wrote: Only way to get at that would be to declare a property in that grandparent's POM. The parent/child hierarchies really are used in the opposite way. You inherit versions from parents, for example (top-down, so to say). What use-case is it

Re: ${project.parent.parent.version} does not work

2016-12-05 Thread Christian Schulte
Am 12/05/16 um 20:33 schrieb Florian Schätz: > ${project.parent.version} directly instead? But > unfortunately, I don't need the parent version, but the grand parent > version and I don't see a way to get it this way... Only way to get at that would be to declare a property in that

Re: ${project.parent.parent.version} does not work

2016-12-05 Thread Florian Schätz
On 05/12/2016 15:09, Robert Patrick wrote: > If you don’t want to compute the value dynamically, The simplest way > to set a property is using -Dgrandparent.version=1.2.3 on the > command-line (or in the project's .mvn/maven.config file). Not something I want to do, since I want to have all

Re: ${project.parent.parent.version} does not work

2016-12-05 Thread Christian Schulte
Am 05.12.2016 um 15:09 schrieb Robert Patrick: > Right, it looks at versions to try to find the latest version number. > > Another way that you might solve the problem is simply by chaining > properties. In any one of the parent hierarchy POMs, set > ... and then in the module POM, > just

RE: ${project.parent.parent.version} does not work

2016-12-05 Thread Robert Patrick
[mailto:fscha...@assona.net] Sent: Monday, December 05, 2016 7:51 AM To: users@maven.apache.org Subject: Re: ${project.parent.parent.version} does not work Am Sonntag, den 04.12.2016, 14:56 -0600 schrieb Robert Patrick: > versions:update-property seems like a good choice. Unfortunat

Re: ${project.parent.parent.version} does not work

2016-12-05 Thread Florian Schätz
Am Sonntag, den 04.12.2016, 14:56 -0600 schrieb Robert Patrick: > versions:update-property seems like a good choice. Unfortunately, the important word is "seems". versions:update-property does some complicated stuff, I have not yet found a way to simply use it to set property X to value Y. It

Re: ${project.parent.parent.version} does not work

2016-12-04 Thread Robert Patrick
versions:update-property seems like a good choice. Sent from my iDevice > On Dec 4, 2016, at 8:22 AM, Florian Schätz wrote: > > Hello, > >> For now, you can make that property a constant in the grandparent like >> "1.0.0-SNAPSHOT" and use that >> property itself in

Re: ${project.parent.parent.version} does not work

2016-12-04 Thread Florian Schätz
Hello, For now, you can make that property a constant in the grandparent like "1.0.0-SNAPSHOT" and use that property itself in the grandparent like "${grandparent.version}". Should not override that property in modules, of course. But that would require me to always update that property

Re: ${project.parent.parent.version} does not work

2016-12-03 Thread Christian Schulte
Am 12/02/16 um 21:14 schrieb Florian Schätz: > And this I can't see a way to store the grandparent version in a > property via a ${project.version}, because every child will override it For now, you can make that property a constant in the

Re: ${project.parent.parent.version} does not work

2016-12-02 Thread Florian Schätz
Is there any other chance to get the grandparent version - preferably without writing another maven plugin ;-) If you control the grandparent POM, you can put a property there and set it to ${project.version} and then it should be inherited in the descendants. Erm... Not really? That's why I

Re: ${project.parent.parent.version} does not work

2016-12-02 Thread Curtis Rueden
Hi Flo, > Is there any other chance to get the grandparent version - preferably > without writing another maven plugin ;-) If you control the grandparent POM, you can put a property there and set it to ${project.version} and then it should be inherited in the descendants. If you don't control

Re: ${project.parent.parent.version} does not work

2016-12-02 Thread Florian Schätz
Hello, Was it expected to work with Maven 2, before the whole effective pom calculation was rewritten? Did you try? No, don't have Maven 2 here, it was just referenced as a workaround in https://issues.apache.org/jira/browse/MASSEMBLY-367 and in a comment in...

Re: ${project.parent.parent.version} does not work

2016-12-02 Thread Hervé BOUTEMY
I confirm that it is not expected to work currently: here is the reference documentation for pom interpolation: http://maven.apache.org/ref/3-LATEST/maven-model-builder/ index.html#Model_Interpolation there is not parent element in parent Was it expected to work with Maven 2, before the whole