You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by WDS <wo...@gmail.com> on 2010/03/30 00:12:18 UTC

transient dependency conflict

Given the following project hierarchy:
   D-1.0   D-2.0
    \      /
     B   C
      \  /
       A

'A' depends on 'B' and 'C', both of which depend on different versions of 'D'.

When 'A' is built as an executable .jar with all dependencies on the
CLASSPATH, won't there be an issue with 2 different versions of 'D'?

What would be the best way to avoid these issues via project
re-arrangement or otherwise?

-wds

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


Re: transient dependency conflict

Posted by Mert Çalışkan <mc...@gmail.com>.
maven will go for the "sequential first at the same distance".
so if  you have declared B as a dependency above C, you will get D:1.0 in
your classpath (whichever that you're using by specifying the scope).
use the dependencyManagement tag for handling transitive dependencies more
reasonably.

Mert.

On Tue, Mar 30, 2010 at 1:12 AM, WDS <wo...@gmail.com> wrote:

> Given the following project hierarchy:
>   D-1.0   D-2.0
>    \      /
>     B   C
>      \  /
>       A
>
> 'A' depends on 'B' and 'C', both of which depend on different versions of
> 'D'.
>
> When 'A' is built as an executable .jar with all dependencies on the
> CLASSPATH, won't there be an issue with 2 different versions of 'D'?
>
> What would be the best way to avoid these issues via project
> re-arrangement or otherwise?
>
> -wds
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>