You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Douglas Ferguson <do...@epsiia.com> on 2006/09/26 20:41:32 UTC

War: Exclude A Transitive Dependency

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-



Re: War: Exclude A Transitive Dependency

Posted by Max Cooper <ma...@maxcooper.com>.
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:franz.see@gmail.com] 
> Sent: Tuesday, September 26, 2006 10:16 PM
> To: users@maven.apache.org
> 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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: War: Exclude A Transitive Dependency

Posted by Douglas Ferguson <do...@epsiia.com>.
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:franz.see@gmail.com] 
Sent: Tuesday, September 26, 2006 10:16 PM
To: users@maven.apache.org
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
-- 
View this message in context: http://www.nabble.com/War%3A-Exclude-A-Transitive-Dependency-tf2340250.html#a6519812
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



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


Re: War: Exclude A Transitive Dependency

Posted by franz see <fr...@gmail.com>.


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
-- 
View this message in context: http://www.nabble.com/War%3A-Exclude-A-Transitive-Dependency-tf2340250.html#a6519812
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


Re: War: Exclude A Transitive Dependency

Posted by Wayne Fay <wa...@gmail.com>.
You can use an exclude on the dependency which is bringing in the j2ee
jar instead, assuming you know which dep to attach the exclusion to.

Otherwise the provided approach is probably best/easiest.

Wayne

On 9/26/06, Douglas Ferguson <do...@epsiia.com> 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-
>
>
>
>

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