On Thu, May 30, 2013 at 6:39 PM, Stephen Colebourne
<[email protected]> wrote:
> Forcing child projects, when tightly linked, to duplicate the version
> of the parent is a design bug in Maven.

The problem is that Maven does not have the notion of "project" (like
Gradle or SBT have): the reactor POM knows its child modules, but not
the other way around; the parent link is independent.
I'm starting to believe that using the same descriptor (pom.xml) for
the build and for deployment (to later resolve dependencies) doesn't
work well either.
That must be why Gradle is buzzing… (still have to try it myself)

> Use of the versions plugins to
> automatically update it is just a workaround hack.
>
> And anyway, "mvn versions:set -D..." run in an aggregator pom only
> updates the aggregator, not the children. Another bug then...

Did work very well for me. From my bash history: "mvn versions:set
-DnewVersion=1.0.1-SNAPSHOT" (followed by "find . -name
pom.xml.versionsBackup -delete" because I forget
-DgenerateBackupPoms=false)
My aggregator POM is also my parent POM though… maybe
-DartifactId=the-parent would help? or maybe run versions:set on the
parent POM rather than the aggregator ("-f the-parent/pom.xml", see
http://mojo.codehaus.org/versions-maven-plugin/examples/set.html)

--
Thomas Broyer
/tɔ.ma.bʁwa.je/

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to