Thanks Wayne & Wendy for your comments, they were very helpful.

Wayne: I don't think this is necessarily a bug.  I have a two different 
dependencies:  A.jar depends on Z.jar, and B.jar also depends on Z.jar.  I'm 
marking A.jar as "provided" and including it in the manifest classpath, which 
also included Z.jar in the manifest classpath.

Since B.jar is packaged in the war, and also depends on Z.jar, Z.jar shows up 
in WEB-INF/classes as well.

At least that's my guess as to what's happening.


Thanks again for the helpful tips!

----- Original Message ----
From: Wayne Fay <[EMAIL PROTECTED]>
To: Maven Users List <[email protected]>
Sent: Wednesday, May 3, 2006 1:24:12 PM
Subject: Re: Transitive dependencies and duplicate jars....

Quickest/easiest fix is probably to add those dependencies to your WAR
pom with scope provided.

Sounds like a possible bug... if a dep is declared as scope provided,
then I'd think its dependencies should also come in as provided. Are
you saying these are instead coming in as compile scope, and being
included in WEB-INF/lib?

Wayne

On 5/3/06, Sean McNamara <[EMAIL PROTECTED]> wrote:
> I'm fighting with some classloading issues, and am hoping someone can help me 
> resolve this.
>
> We have an application composed of a WAR, several EJB jars, and some shared 
> support jars.
>
> Following the J2EE best practices, the shared jars are packaged at the EAR 
> level, and the EJB jar contains references to those jars in it's MANIFEST.MF 
> via the Class-Path parameter.
>
> For the WAR, the jar dependencies are listed <scope>provided</provided>.  The 
> WAR also has several other dependencies which are bundled in it's WEB-INF/lib 
> directory.
>
> The problem I'm having involves transitive dependencies.  There are some 
> support libraries such as xml-apis.jar that are apparently used by various 
> jars.  These libraries are ending up at both the EAR level, and also the 
> WEB-INF/lib level.  At runtime, I'm getting the dreaded "ClassCastException" 
> that usually occurs when there is a mismatch in classfiles/loaders.
>
> I need to get rid of the duplicates in the WEB-INF/lib directory, but am not 
> sure quite how to accomplish this.  Can anyone provide some direction?
>
> Thanks.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to