You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Dixit, Sandeep (ProSource Solutions)" <Sa...@contractors.nationalcity.com> on 2006/03/08 20:41:34 UTC

How to specify multiple excludes in war-plugin?

I am trying to exclude few libraries (.jar) from getting packaged into
war. How do I specify it using <excludes> tag? I tried using comma,
space as well as multiple <excludes> tags. Nothing worked. It is only
able to exclude a single jar. Please advise.

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
	  <version>2.0-beta-2</version>
        <configuration>
		<warSourceDirectory>JavaSource</warSourceDirectory>
		<webappDirectory>WebContent</webappDirectory >
		<excludes>WEB-INF/lib/commons-collections-2.1.jar,
WEB-INF/lib/anttasks-6.0.jar </excludes>
          <archive>
		<manifest>
		<addClasspath>true</addClasspath> 
		</manifest>
          </archive>
        </configuration>
      </plugin>

Thanks,
Sandeep

-------------------------------------------------------------------------------------------
***National City made the following annotations
-------------------------------------------------------------------------------------------
This communication is a confidential and proprietary business communication.  
It is intended solely for the use of the designated recipient(s).  If this
communication is received in error, please contact the sender and delete 
this communication.
===========================================================================================

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


Re: How to specify multiple excludes in war-plugin?

Posted by ia...@jpmchase.com.
If you set the scope of the dependency for the library to "provided", the
JAR for that dependency will not be included within the packaged WAR.  You
do need to specify this scope on a per-dependency basis.

Wayne or Stephen,

Is there a better place to document this than the (exceedingly sparse)
Guide to Webapps[1] ?


Ian

[1] http://maven.apache.org/guides/mini/guide-webapp.html

It's better to be hated for who you are
than loved for who you are not

Ian D. Stewart
Appl Dev Analyst-Advisory, DCS Automation
JPMorganChase Global Technology Infrastructure
Phone: (614) 244-2564
Pager: (888) 260-0078


|---------+-------------------------------------------->
|         |           "Dixit, Sandeep (ProSource       |
|         |           Solutions)"                      |
|         |           <Sandeep.Dixit@contractors.nation|
|         |           alcity.com>                      |
|         |                                            |
|         |           03/08/2006 02:41 PM              |
|         |           Please respond to "Maven Users   |
|         |           List"                            |
|---------+-------------------------------------------->
  >----------------------------------------------------------------------------------------------|
  |                                                                                              |
  |       To:       "Maven Users List" <us...@maven.apache.org>                                  |
  |       cc:                                                                                    |
  |       Subject:  How to specify multiple excludes in war-plugin?                              |
  >----------------------------------------------------------------------------------------------|




I am trying to exclude few libraries (.jar) from getting packaged into
war. How do I specify it using <excludes> tag? I tried using comma,
space as well as multiple <excludes> tags. Nothing worked. It is only
able to exclude a single jar. Please advise.

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
               <version>2.0-beta-2</version>
        <configuration>

<warSourceDirectory>JavaSource</warSourceDirectory>
                         <webappDirectory>WebContent</webappDirectory >
                         <excludes>WEB-INF/lib/commons-collections-2.1.jar,
WEB-INF/lib/anttasks-6.0.jar </excludes>
          <archive>
                         <manifest>
                         <addClasspath>true</addClasspath>
                         </manifest>
          </archive>
        </configuration>
      </plugin>

Thanks,
Sandeep

-------------------------------------------------------------------------------------------

***National City made the following annotations
-------------------------------------------------------------------------------------------

This communication is a confidential and proprietary business
communication.
It is intended solely for the use of the designated recipient(s).  If this
communication is received in error, please contact the sender and delete
this communication.
===========================================================================================


---------------------------------------------------------------------
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: How to specify multiple excludes in war-plugin?

Posted by Mang Jun Lau <Ma...@otpp.com>.
Please refer to this thread:
http://www.nabble.com/WAR-plugin-in-M2%3A-excludes-not-all-files-t1140057.html

It could be a bug though.


_Mang Lau





"Dixit, Sandeep (ProSource Solutions)" 
<Sa...@contractors.nationalcity.com> 
03/08/2006 02:41 PM
Please respond to
"Maven Users List" <us...@maven.apache.org>


To
"Maven Users List" <us...@maven.apache.org>
cc

Subject
How to specify multiple excludes in war-plugin?






I am trying to exclude few libraries (.jar) from getting packaged into
war. How do I specify it using <excludes> tag? I tried using comma,
space as well as multiple <excludes> tags. Nothing worked. It is only
able to exclude a single jar. Please advise.

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
                   <version>2.0-beta-2</version>
        <configuration>
 <warSourceDirectory>JavaSource</warSourceDirectory>
 <webappDirectory>WebContent</webappDirectory >
 <excludes>WEB-INF/lib/commons-collections-2.1.jar,
WEB-INF/lib/anttasks-6.0.jar </excludes>
          <archive>
                                 <manifest>
                                 <addClasspath>true</addClasspath> 
                                 </manifest>
          </archive>
        </configuration>
      </plugin>

Thanks,
Sandeep

-------------------------------------------------------------------------------------------
***National City made the following annotations
-------------------------------------------------------------------------------------------
This communication is a confidential and proprietary business 
communication. 
It is intended solely for the use of the designated recipient(s).  If this
communication is received in error, please contact the sender and delete 
this communication.
===========================================================================================

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