You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Craig McClanahan <cr...@apache.org> on 2006/06/10 20:25:57 UTC
Tracing Maven2 Transitive Dependencies
I'm working on the Maven2 build for the shale-usecases example (on the
mvn_reorg branch). Currently, the application buids, but it fails on some
XML parsing errors when you deploy it. In turn, this happens because
xml-apis-1.0.b2.jar and xercesImpl-2.2.1.jar are getting picked up as
dependencies that need to be included in the war. Now, the challenge is to
identify where they are coming from so they can be excluded.
I've tried Wendy's suggestion of using -X on the mvn execution, which gives
a pretty copious amount of output ... and still doesn't make it clear from
which POM the dependency is actually getting inherited. Is there some
mechanism in Maven2 that just lists out the dependency tree, so you can
figure stuff like this out easily?
Craig
Re: Tracing Maven2 Transitive Dependencies
Posted by Craig McClanahan <cr...@apache.org>.
On 6/10/06, Wendy Smoak <ws...@gmail.com> wrote:
>
> On 6/10/06, Wendy Smoak <ws...@gmail.com> wrote:
>
> > You get rid of them by adding a <dependency> in the webapp pom marked
> > provided or optional. Maven constructs a dependency graph and uses
> > the "closest" definition.
>
> Missed a word there. :) You _can_ get rid of them this way, though
> <exclude>s are more correct.
Actually, I was thinking of the "provided" approach ... and I can even
rationalize it :-). Shale requires a JDK 1.4 or later environment, which
includes (among other things) a built-in XML parser. Therefore, marking
these two dependencies as "provided" would make sense. Probably in the
shale-parent POM (or possibly the one for apps, since we have control over
the dependency declarations in the core libraries).
--
> Wendy
Craig
Re: Tracing Maven2 Transitive Dependencies
Posted by Wendy Smoak <ws...@gmail.com>.
On 6/10/06, Wendy Smoak <ws...@gmail.com> wrote:
> You get rid of them by adding a <dependency> in the webapp pom marked
> provided or optional. Maven constructs a dependency graph and uses
> the "closest" definition.
Missed a word there. :) You _can_ get rid of them this way, though
<exclude>s are more correct.
--
Wendy
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Tracing Maven2 Transitive Dependencies
Posted by Wendy Smoak <ws...@gmail.com>.
On 6/10/06, Craig McClanahan <cr...@apache.org> wrote:
> I've tried Wendy's suggestion of using -X on the mvn execution, which gives
> a pretty copious amount of output ... and still doesn't make it clear from
> which POM the dependency is actually getting inherited. Is there some
> mechanism in Maven2 that just lists out the dependency tree, so you can
> figure stuff like this out easily?
Ask on users@maven? I usually redirect the output of -X to a file so
I can scroll and search through it. The indentation levels show
what's coming from where, and it's hard to follow when it wraps on the
console.
You get rid of them by adding a <dependency> in the webapp pom marked
provided or optional. Maven constructs a dependency graph and uses
the "closest" definition.
I don't see xercesImpl, but I think xerces 2.4.0 is coming from
commons-pool by way of spring-aop:
(Extra lines removed)
[DEBUG] org.apache.struts.shale:shale-spring:jar:1.0.3-SNAPSHOT:compile
(selected for compile)
[DEBUG] org.springframework:spring-context:jar:1.2.2:compile
(selected for compile)
[DEBUG] org.springframework:spring-aop:jar:1.2.2:compile
(selected for compile)
[DEBUG] commons-pool:commons-pool:jar:1.2:compile (selected for compile)
[DEBUG] xerces:xerces:jar:2.0.2:compile (selected for compile)
Commons Pool should probably mark that 'provided' or 'optional'
depending on the situation.
--
Wendy
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Tracing Maven2 Transitive Dependencies
Posted by Niall Pemberton <ni...@gmail.com>.
Commons Digester has this dependency.
Niall
On 6/10/06, Craig McClanahan <cr...@apache.org> wrote:
> I'm working on the Maven2 build for the shale-usecases example (on the
> mvn_reorg branch). Currently, the application buids, but it fails on some
> XML parsing errors when you deploy it. In turn, this happens because
> xml-apis-1.0.b2.jar and xercesImpl-2.2.1.jar are getting picked up as
> dependencies that need to be included in the war. Now, the challenge is to
> identify where they are coming from so they can be excluded.
>
> I've tried Wendy's suggestion of using -X on the mvn execution, which gives
> a pretty copious amount of output ... and still doesn't make it clear from
> which POM the dependency is actually getting inherited. Is there some
> mechanism in Maven2 that just lists out the dependency tree, so you can
> figure stuff like this out easily?
>
> Craig
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org