You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Klaus Brunner <kl...@e175.net> on 2007/06/06 16:52:49 UTC

Re: Detecting version conflicts of (direct and transitive) dependencies

> This shouldn't happen if you're clean packaging.

Not sure what you mean by "clean packaging". I can reproduce this problem
with a simple "mvn clean install" run - both JAR versions end up in the
WEB-INF/lib directory. The commons-xxx JARs are straight from the central
repository.

> The default conflict resolution is nearest-wins, see MNG-612 for more
> info.

So as I understand it, it's not just the default, it's the *only* conflict
resolution method (as of 2.0.x).

> I'm currently working on some dependency diagnostic tools to be
> included in the dependency plugin which should help track down these
> types of problems.

That would be quite helpful. I'd be happy to test it.

OTOH, shouldn't it be simple to get a configurable warning (or even error)
right from Maven's dependency handling code, without additional plugins? I
think many people would find it useful if they could set Maven to "strict
mode" to throw an error if there isn't 100% convergence.

Thanks,

Klaus



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Detecting version conflicts of (direct and transitive) dependencies

Posted by Mark Hobson <ma...@gmail.com>.
On 06/06/07, Klaus Brunner <kl...@e175.net> wrote:
> > This shouldn't happen if you're clean packaging.
>
> Not sure what you mean by "clean packaging". I can reproduce this problem
> with a simple "mvn clean install" run - both JAR versions end up in the
> WEB-INF/lib directory. The commons-xxx JARs are straight from the central
> repository.

Yep, as in mvn clean package.  If you can produce a minimal test
project that replicates the problem then raise an issue and attach it.

> > The default conflict resolution is nearest-wins, see MNG-612 for more
> > info.
>
> So as I understand it, it's not just the default, it's the *only* conflict
> resolution method (as of 2.0.x).

Unfortunately yes..

> > I'm currently working on some dependency diagnostic tools to be
> > included in the dependency plugin which should help track down these
> > types of problems.
>
> That would be quite helpful. I'd be happy to test it.
>
> OTOH, shouldn't it be simple to get a configurable warning (or even error)
> right from Maven's dependency handling code, without additional plugins? I
> think many people would find it useful if they could set Maven to "strict
> mode" to throw an error if there isn't 100% convergence.

You can if you use ranges, the most simplistic of which are known as
'hard versions', e.g. [3.0], only 3.0 and fail the build otherwise.
See:

http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution#DependencyMediationandConflictResolution-DependencyVersionRanges

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org