Maven 2 excluding dependencies from WAR artifact

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Maven 2 excluding dependencies from WAR artifact

Trent Rosenbaum
I am using Maven 2 to generate my WAR artifact to be deployed under
Tomcat.  I have followed the getting started guidelines for creating a
WAR project and have been able to deploy a simple set of JSP resources.  
I wanted to explore the use of Spring 1.2.1 and so started to follow the
set-up of example application.  When I came to develop the controllers I
needed the servletapi to be a dependency of the project for
compilation.  Now this is all straight forward, but I found that my
resulting artifact also included the servletapi-2.3.jar in the
WEB-INF/lib.  Within Maven 1 I remember being able to set a dependency
element called <war.bundle> to be true/false and this allowed me to
exclude dependencies from the finished artifact.  How is this achieved
in Maven 2?  I can exclude my JUnit-3.8.1.jar by saying that it has a
test scope, but what scope would I give the servletapi jar?

Trent


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.322 / Virus Database: 267.2.0 - Release Date: 27/05/2005


       
       
               
___________________________________________________________
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Maven 2 excluding dependencies from WAR artifact

Brett Porter
Excuse my brevity but we've been answering this a bit lately. You'll
find more in the archives, but can expect a comprehensive solution in
alpha-3.

We're discussing it on IRC shortly, in fact.

Cheers,
Brett

On 5/30/05, Trent Rosenbaum <[hidden email]> wrote:

> I am using Maven 2 to generate my WAR artifact to be deployed under
> Tomcat.  I have followed the getting started guidelines for creating a
> WAR project and have been able to deploy a simple set of JSP resources.
> I wanted to explore the use of Spring 1.2.1 and so started to follow the
> set-up of example application.  When I came to develop the controllers I
> needed the servletapi to be a dependency of the project for
> compilation.  Now this is all straight forward, but I found that my
> resulting artifact also included the servletapi-2.3.jar in the
> WEB-INF/lib.  Within Maven 1 I remember being able to set a dependency
> element called <war.bundle> to be true/false and this allowed me to
> exclude dependencies from the finished artifact.  How is this achieved
> in Maven 2?  I can exclude my JUnit-3.8.1.jar by saying that it has a
> test scope, but what scope would I give the servletapi jar?
>
> Trent
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.322 / Virus Database: 267.2.0 - Release Date: 27/05/2005
>
>
>
>
>
> ___________________________________________________________
> Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]