I have the third party jar's in my WEB project placed at /src/main/webapp/WEB-INF/lib/
I have mentioned the dependency for all the required JAR's in the pom.xml.
Now, Since the dependencies are defined in POM, the JAR's will be automatically packed in the lib
folder.
lib
.I CANT DELETE THE LIB
FROM WEB-INF BECAUSE ITS USED IN LOCAL DEVELOPMENT
This is what I've tried so far:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<packagingExcludes>META-INF/context.xml</packagingExcludes>
<webResources>
<resource>
<directory>src/main/webapp/WEB-INF/lib</directory>
<excludes>
<exclude>**/**</exclude>
</excludes>
</resource>
</webResources>
</configuration>
</plugin>
Any Idea?
It should be "packagingExcludes" instead of "warSourceExcludes":
<configuration>
<packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
....
</configuration>
From http://maven.apache.org/plugins/maven-war-plugin/examples/skinny-wars.html :
In version 2.1-alpha-1, this was incorrectly named warSourceExcludes