You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Trent Rosenbaum <tr...@yahoo.co.uk> on 2005/05/30 15:25:30 UTC

Maven 2 excluding dependencies from WAR artifact

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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven 2 excluding dependencies from WAR artifact

Posted by Brett Porter <br...@gmail.com>.
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 <tr...@yahoo.co.uk> 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: 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