Skip to content

Instantly share code, notes, and snippets.

@friek
Created April 13, 2013 21:12
Show Gist options
  • Select an option

  • Save friek/5380102 to your computer and use it in GitHub Desktop.

Select an option

Save friek/5380102 to your computer and use it in GitHub Desktop.
Exclude certain jars in a maven war build.
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<!-- Exclude servlet-api-2.5.jar from the lib dir -->
<packagingExcludes>WEB-INF/lib/servlet-api-2.5.jar</packagingExcludes>
<!-- Exclude all log4j jars from the lib dir -->
<packagingExcludes>WEB-INF/lib/*log4j*.jar</packagingExcludes>
</configuration>
</plugin>
</plugins>
</build>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment