maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Hardy" <Adam.Ha...@bbc.co.uk>
Subject RE: [m2] how to exclude compile time only jars from .war?
Date Thu, 12 May 2005 09:31:02 GMT
I think even I can answer this one (unless M2 has changed radically from
M1)

    <dependency>
      <groupId>servletapi</groupId>
      <artifactId>servletapi</artifactId>
      <version>2.3</version>
      <type>jar</type>
      <properties>
        <war.bundle>false</war.bundle>
      </properties>
    </dependency>

> -----Original Message-----
> From: Chalermpong Chaiyawan [mailto:chalermpongc@ar.co.th] 
> Sent: 12 May 2005 10:18
> To: Maven Users List
> Subject: [m2] how to exclude compile time only jars from .war?
> 
> 
> Hi,
> 
> In maven2, is there a way to exclude compile time only jars file from 
> .war file?
> 
> I created web project using command
> 
> $ m2 archetype:create -DgroupId=[gid] -DartifactId=[aid] 
> -DarchetypeArtifactId=maven-archetype-webapp
> 
> I created a simple servlet in the src/main/java directory.  I add a 
> dependency to the servlet-api in the pom.xml like this
> 
> <model>
> ...
> <dependency>
>   <groupId>servletapi</groupId>
>   <artfiactId>servletapi</artifactId>
>   <version>2.4.public_draft</version>
>   <scope>compile</scope>
> </dependency>
> ...
> </model>
> 
> I built using this command
> 
> $ m2 package
> 
> maven2 built smoothly but when I look into the 
> target/output.war file, I 
> found that maven2 put servletapi-2.4.public_draft.jar into the 
> WEB-INF/lib !  which I don't want it to include in the 
> output.war file. 
>  Since most of the JSP/Servlet containers should already 
> provided these 
> APIs (JSP API & Servlet API) for us.
> 
> How can I use these APIs for compile only by not including it in the 
> output.war?
> 
> Thanks in advanced for any help.
> 
> Regards,
> Chalermpong Chaiyawan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 

http://www.bbc.co.uk/

This e-mail (and any attachments) is confidential and may contain
personal views which are not the views of the BBC unless specifically
stated.
If you have received it in error, please delete it from your system. 
Do not use, copy or disclose the information in any way nor act in
reliance on it and notify the sender immediately. Please note that the
BBC monitors e-mails sent or received. 
Further communication will signify your consent to this.

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


Mime
View raw message