Am 28.10.2011 20:07 schrieb "KARR, DAVID" <[email protected]>:
>
> If I have a build with a lot of modules, and I end up with two transitive
dependency references to "commons-lang", one for version 2.2, and one for
version 2.4, does the "versions" plugin let me define rules that will let me
choose either the older or newer version to actually use?

The versions plugin deals with direct dependencies, not transitive ones.

>
> From the documentation, I would think that "versions:use-latest-versions"
comes close, but the documentation is vague.  It just says "Replaces any
version with the latest version."

Yes, but only those which are defined in the pom of your project, not inside
the poms of dependencies referenced by your project.

It just updates the text of the pom file, which cannot be done easily with
released poms from some maven repository. After all, that's why we have
releases first hand: to count on the released artifacts as unmodifiable.

To manage transitive dependencies, enable dependency convergence using
maven-enforcer-plugin. You will be notified about version clashes between
different versions of the same transitive dependency. To remove these
clashes, define <exclusions> for those transitive dependencies you don't
want in your classpath.

Best regards,

Ansgar

>
> Does the "versions" plugin work with maven 3.x?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

Reply via email to