I think you are right:
* exclude from project-that-depends-on-j2ee
* add dependency for j2ee.jar with 'provided' scope to local project

and maybe:
* contact the project-that-depends-on-j2ee team to ask if they will use scope=provided for their j2ee dependency in future releases

I wonder if you need the exclude if you have a local dependency on j2ee with scope = provided? It might be worth a test if you wish to avoid the exclude.

-Max

Douglas Ferguson wrote:
That only works for war overlay right?
This is a war with jar deps. I am picking up the j2ee.jar through a jar dep.
I want it at compile time but I don't want it in my war.

I think the only solution is to duplicate the transitivbe dependency in the 
local project and mark it provided.

-----Original Message-----
From: franz see [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 26, 2006 10:16 PM
To: [email protected]
Subject: Re: War: Exclude A Transitive Dependency




Douglas Ferguson wrote:
I have a project that generates a war file, the j2ee jar is inheritented
as a transitive dependency, however if the j2ee jar is included, then
tomcat prints a warning but websphere refuses to deploy.

Is there anyway to tell the war plugin not to include this lib?  I know
I could mark the dependency as provided but I thought I would see if
there is a more elegant way to do this without having to specify a
version that I could obtain transitively.

D-





Good day to you, Douglas,

You can try and add the paths (relative paths), of those jars that you don't
want to get included to your warDependencyExcludes (comma separated). For
more info, please see [1] "Configuring the war-overlay" section. However,
[1] is not yet released. But please feel free to let us know what you think
so that we can improve it.
Thanks,
Franz

[1]
http://people.apache.org/~vsiveton/maven-war-plugin/examples/war-overlay.html

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

Reply via email to