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 the correct version numbers, etc. in my git repository at the right tags, etc. and using a dynamic property would prevent that, since only at maven-runtime, the property would be filled and in git, it would be whatever default it has.

So, my build should run the version:set, update the numbers, commit&push, create the correct tag, etc. This wouldn't work when I just set the property during runtime without writing it back in the pom.

> Another way that you might solve the problem is simply by chaining
> properties.
> In any one of the parent hierarchy POMs, set
> <grandparent.version>...</grandparent.version>
> and then in the module POM, just say
> <version>${grandparent.version}</version>.

Sorry, I don't get this.

> For example, if you put this in the parent POM, just set
> <grandparent.version>${project.parent.version}</grandparent.version>.

...yes? Wouldn't that be the same as using <version>${project.parent.version}</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...

Regards,

Flo

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

Reply via email to