You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Lewandowski, Eric" <er...@cgi.com> on 2007/01/22 19:13:11 UTC

Understandings maven2 dependency computation

Hi,
 
I use Hibernate3 in my project. Hibernate3 needs cglib/cglib as
dependent jar. This was a problem for us because cglib/cglib use asm/asm
1.5.3 as dependent jar.
So, we decide to exclude cglib/cglib form Hibernate3 dependencies and
add cglib/cglib-nodep. This works fine.... but sometimes maven add
cglib/cglib and cglib/cglib-nodep as dependencies in our war file. 
 
We generate maven site and saw that all our Hibernate dependencies used
cglib/cglib-nodep. cglib/cglib is indicated as transitive dependency but
we do not know which artifact needs cglib/cglib.
 
So, is there a maven command to understand why maven add cglib/cglib as
transitive dependency ? For example, I look for a such explanation :
cglib/cglic is added because required by artifact XXX 
 
Sincerely,
Eric Lewandowski

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


Re: Understandings maven2 dependency computation

Posted by Wayne Fay <wa...@gmail.com>.
mvn -X site > out.txt

Then scan out.txt in a file editor for cglib references. At the top,
it will show all your dependencies, and all their transitive
dependencies, and all THEIR transitive dependencies etc in a little
text tree. You'll probably see that one of those has cglib/cglib as a
dependency, which is bringing it in. Add the excludes node to that
artifact to eliminate it.

Wayne

On 1/22/07, Lewandowski, Eric <er...@cgi.com> wrote:
> Hi,
>
> I use Hibernate3 in my project. Hibernate3 needs cglib/cglib as
> dependent jar. This was a problem for us because cglib/cglib use asm/asm
> 1.5.3 as dependent jar.
> So, we decide to exclude cglib/cglib form Hibernate3 dependencies and
> add cglib/cglib-nodep. This works fine.... but sometimes maven add
> cglib/cglib and cglib/cglib-nodep as dependencies in our war file.
>
> We generate maven site and saw that all our Hibernate dependencies used
> cglib/cglib-nodep. cglib/cglib is indicated as transitive dependency but
> we do not know which artifact needs cglib/cglib.
>
> So, is there a maven command to understand why maven add cglib/cglib as
> transitive dependency ? For example, I look for a such explanation :
> cglib/cglic is added because required by artifact XXX
>
> Sincerely,
> Eric Lewandowski
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: Understandings maven2 dependency computation

Posted by franz see <fr...@gmail.com>.
Good day to you, Eric,

Since you've already generated the site documentation, go to the project
dependencies report again and look at the dependency tree. You can see there
which direct dependency depends on cglib/cglib. 

After you've located that dependency, use the <exclude> tag to exclude
cglib/cglib from that dep. 

Cheers,
Franz


Lewandowski, Eric wrote:
> 
> Hi,
>  
> I use Hibernate3 in my project. Hibernate3 needs cglib/cglib as
> dependent jar. This was a problem for us because cglib/cglib use asm/asm
> 1.5.3 as dependent jar.
> So, we decide to exclude cglib/cglib form Hibernate3 dependencies and
> add cglib/cglib-nodep. This works fine.... but sometimes maven add
> cglib/cglib and cglib/cglib-nodep as dependencies in our war file. 
>  
> We generate maven site and saw that all our Hibernate dependencies used
> cglib/cglib-nodep. cglib/cglib is indicated as transitive dependency but
> we do not know which artifact needs cglib/cglib.
>  
> So, is there a maven command to understand why maven add cglib/cglib as
> transitive dependency ? For example, I look for a such explanation :
> cglib/cglic is added because required by artifact XXX 
>  
> Sincerely,
> Eric Lewandowski
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Understandings-maven2-dependency-computation-tf3059326s177.html#a8515654
Sent from the Maven - Users mailing list archive at Nabble.com.


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