Right, it looks at versions to try to find the latest version number. 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). 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>. For example, if you put this in the parent POM, just set <grandparent.version>${project.parent.version}</grandparent.version>.
-----Original Message----- From: Florian Schätz [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. 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 does some strange range stuff, etc. > Sent from my iDevice > > > On Dec 4, 2016, at 8:22 AM, Florian Schätz <m...@florian-schaetz.de> wrote: > > > > Hello, > > > >> For now, you can make that property a constant in the grandparent > >> like "<grandparent.version>1.0.0-SNAPSHOT</grandparent.version>" > >> and use that property itself in the grandparent like > >> "<version>${grandparent.version}</version>". Should not override > >> that property in modules, of course. > > > > But that would require me to always update that property somehow whenever I > > call versions:set, too. Will have to search for an easy way to do so. Any > > suggestions? > > > > Regards, > > > > Florian > > > > -------------------------------------------------------------------- > > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > > For additional commands, e-mail: users-h...@maven.apache.org > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org