maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Olivier Lamy" <olivier.l...@accor.com>
Subject RE : war not excluding files in listed in excludes
Date Wed, 23 Nov 2005 18:36:29 GMT
Hi,
If you want to exclude some artifacts dependencies from the generated
web app.
Add dependencies exclusions after the war plugin configuration

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-war-plugin</artifactId>
	<version>2.0-beta-3-SNAPSHOT</version>
	<configuration>
<warSourceExcludes>**/logkit*.jar,**/avalon-framework*.jar,**/spring*.ja
r,**/ant*.jar,**/mx4j*.jar,**/qdox-1.5.jar,**/oro*.jar</warSourceExclude
s>
	</configuration>

        <dependencies>
          <dependency>
            <dependency>
		  <!-- artifact with transitive dependencies -->
              <groupId></groupId>
              <artifactId></artifactId>
              <version></version>
              <exclusions>
		    <!-- list of transitive artifact dependencies you
don't want in the generated web app no version to specified -->
                <exclusion>
                  <groupId></groupId>
                  <artifactId></artifactId>
                </exclusion>
              </exclusions>                
            </dependency>
          </dependency>
        </dependencies>

</plugin>

- Olivier

-----Message d'origine-----
De : Brian Bonner [mailto:bkbonner@gmail.com] 
Envoyé : mercredi 23 novembre 2005 19:17
À : Maven Users List
Objet : war:war not excluding files in listed in excludes


I have the following config:

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-war-plugin</artifactId>
	<version>2.0-beta-3-SNAPSHOT</version>
	<configuration>
<warSourceExcludes>**/logkit*.jar,**/avalon-framework*.jar,**/spring*.ja
r,**/ant*.jar,**/mx4j*.jar,**/qdox-1.5.jar,**/oro*.jar</warSourceExclude
s>
	</configuration>
</plugin>

The output of mvn clean install shows:

[DEBUG] maven-archiver: using locally installed snapshot [DEBUG]
Configuring mojo
'org.apache.maven.plugins:maven-war-plugin:2.0-beta-3-SNAPSHOT:war'
-->
[DEBUG]   (s) classesDirectory =
C:\mvneclipse\paraware-ws\target\paraware-ws\WEB-INF\classes
[DEBUG]   (f) outputDirectory = C:\mvneclipse\paraware-ws\target
[DEBUG]   (s) project = org.apache.maven.project.MavenProject@ef32744a
[DEBUG]   (f) warName = paraware-ws-1.0-SNAPSHOT
[DEBUG]   (s) warSourceDirectory =
C:\mvneclipse\paraware-ws\src\main\webapp
[DEBUG]   (f) warSourceExcludes =
**/logkit*.jar,**/avalon-framework*.jar,**/spring*.jar,**/ant*.jar,**/mx
4j*.jar,**/qdox-1.5.jar,**/oro*.jar
[DEBUG]   (s) webappDirectory =
C:\mvneclipse\paraware-ws\target\paraware-ws-1.0-SNAPSHOT
[DEBUG] -- end configuration --
[INFO] [war:war]
[INFO] Exploding webapp...
[INFO] Copy webapp resources to
C:\mvneclipse\paraware-ws\target\paraware-ws-1.0-SNAPSHOT
[INFO] Assembling webapp paraware-ws in
C:\mvneclipse\paraware-ws\target\paraware-ws-1.0-SNAPSHOT
[INFO] Generating war
C:\mvneclipse\paraware-ws\target\paraware-ws-1.0-SNAPSHOT.war
[INFO] Brian was here
[INFO] Building war:
C:\mvneclipse\paraware-ws\target\paraware-ws-1.0-SNAPSHOT.war

However, later it clearly shows:

..
[DEBUG] adding entry WEB-INF/lib/logkit-1.0.1.jar
[DEBUG] adding entry WEB-INF/lib/mx4j-3.0.1.jar
[DEBUG] adding entry WEB-INF/lib/oro-2.0.8.jar
[DEBUG] adding entry WEB-INF/lib/qdox-1.5.jar
[DEBUG] adding entry WEB-INF/lib/spring-1.2.4.jar
...

Any ideas of why this is happening?

btw, I see that 'excludes' is an alias of 'warSourceExcludes'.  Why are
many of the posts referring it to as warSourceExcludes when it isn't
documented that way here: 
http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html ?

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



This e-mail, any attachments and the information contained therein ("this message") are confidential
and intended solely for the use of the addressee(s). If you have received this message in
error please send it back to the sender and delete it. Unauthorized publication, use, dissemination
or disclosure of this message, either in whole or in part is strictly prohibited.
--------------------------------------------------------------------------------------------------------------
Ce message électronique et tous les fichiers joints ainsi que  les informations contenues
dans ce message ( ci après "le message" ), sont confidentiels et destinés exclusivement
à l'usage de la  personne à laquelle ils sont adressés. Si vous avez reçu ce message par
erreur, merci  de le renvoyer à son émetteur et de le détruire. Toutes diffusion, publication,
totale ou partielle ou divulgation sous quelque forme que se soit non expressément autorisées
de ce message, sont interdites.
-------------------------------------------------------------------------------------------------------------


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


Mime
View raw message