gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <>
Subject Re: mvn Question: Artifact Version and Inheritance
Date Thu, 29 Jul 2010 19:27:28 GMT
Hi Stefan,

Stefan Bodewig wrote:

> Hi all,
> Gump's trunk contains a tweak to the new <mvn2install> builder (which
> installs POMs to the local repository) where it tries to parse enough of
> the POM so that you no longer need to specify the version inside the
> Gump descriptor.
> The logic I use is:
>  * if an element /project/version exists, use its text content
>  * otherwise if an element /project/parent/version exists, use its text
>    content
>  * otherwise give up, complain that the Gump descriptor must contain a
>    version attribute
> This assumes that if a POM doesn't specify a version it must inherit the
> one from the parent POM.  Unfortunately I don't find any documentation
> on the maven site that would explicitly confirm this assumption (even
> though it seems to be true).
> Can anybody more familiar with mvn than me confirm this is correct?

This is right. However, some folks use properties for /project/version:


In that case you should bail out also. Usage of properties in 
/project/parent/version is not possible, so you do not have to check that, 
but you cannot use it instead if a property is in /project/version  ;-)

- Jörg

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message