maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Connolly <>
Subject Re: Making parent pom the absolute authority over it's children's versioning
Date Wed, 14 Aug 2013 09:14:05 GMT
This is currently impossible.

The best you can currently do is inherit xpath:/project/version from

The primary historical driver for this requirement is that with some SCM
systems (especially subversion) people can checkout only the child module,
so there would be no way to build the child project without the parent
project being checked out also.

A long standing RFE is to permit inference of xpath:/project/parent/version
provided that there is a pom on disk at the path specified by
xpath:/project/parent/relativePath *and* that project's
xpath:/project/(groupId,artifactId) match the child's
xpath:/project/parent/(groupId,artifactId) my understanding of one of the
blockers for this RFE is that the deployed pom to the remote repository
would need to include at least xpath:/project/parent/version so that legacy
and non-maven clients can parse the pom correctly *and* the GPG signing
issue that plagued Maven 2.1.0 and 2.2.0 resulting from trying to resolve
portions of the pom at run-time before deployment to the remote repository,
resulting in invalid GPG signatures, has still not been fully resolved
(hence the rollback of that "feature" in 2.2.1)

The reality is that the maven release plugin (or the versions maven plugin)
will handle updating the versions for you.

On 14 August 2013 10:01, TenLeftFingers <> wrote:

> I have a project laid out like this:
> +parent-project
>  -child-project1
>  +child-project2
>   -src
>   -child-project2.pom
>  parent-project.pom
> The parent defines its own version:
>   <version>4.4.5-SNAPSHOT</version>
> And child-project two has in it's pom:
>   <parent>
>                   <groupId></groupId>
>                   <artifactId>parent-project</artifactId>
>                   <version>4.4.5-SNAPSHOT</version>
>   </parent>
> The issue I'm having is that I want the person doing the builds to only
> have
> to change the <version> in the parent-project. I want the child-projects to
> *take* their version from there so that he only has to make one change. But
> if I change the child to declare it's own version as:
>   <version>${parent.version}</version>
> this actually takes it from the version declared in the child .pom. Yet, if
> I don't delcare the version in the child pom it won't know which version of
> the parent to go for...
> Am I trying to do the impossible? I don't want to have every child's pom
> modified to go from SNAPSHOT to release because in reality the projects are
> much larger.
> Thanks & regards,
> Ten
> --
> View this message in context:
> Sent from the Maven - Users mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message