I have a project where I am attempting to overlay a pre-built war with a compiled jar from another module and some files in the war project.
+pom.xml
|
+-+depandancy_dir
| |
| + source.war
|
+-+ jar
| |
| + pom.xml
| + src
| ...
|
+-+war_dir
|
+ pom.xml
+ src
.... no jars
I want to exclude some of the jars that are configured as maven dependencies for the jar.
I have tried all of the following exclude lines in the pom for the war. the undesired jar shows up regardless.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<dependentWarExcludes>**/unwanted-core-1.1.jar</dependentWarExcludes>
<overlays>
<overlay>
<groupId>src.war</groupId>
<artifactId>base.war</artifactId>
<excludes>
<exclude>**/unwanted-core-1.1.jar</exclude>
<packagingExcludes>**/unwanted-core-1.1.jar</packagingExcludes>
<exclude>WEB-INF/lib/unwanted-core-1.1.jar</exclude>
<packagingExcludes>WEB-INF/lib/unwanted-core-1.1.jar</packagingExcludes>
</excludes>
</overlay>
</overlays>
</configuration>
</plugin>
I am running maven under eclipse. The war plugin reports version maven-war-plugin:2.2:war