Hi,

Thanks for your response but unfortunately, I got this error

TEXT must be immediately followed by END_TAG and not START_TAG (position: START_TAG seen ...<properties>\n <war.bundle>...

Any idea?  Thanks in advance.

Regards,
Chalermpong Chaiyawan


Adam Hardy wrote:

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:[EMAIL PROTECTED] 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






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



Reply via email to