Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
2.2
-
None
-
None
Description
Trying to exclude files using the exec-war-only goal of the tomcat7-maven-plugin does not actually exclude anything. Instead, matched exclude directives should exclude matching files. For example:
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>tomcat-run</id>
<goals>
<goal>exec-war-only</goal>
</goals>
<phase>package</phase>
<configuration>
<path>/oases</path>
<contextFile>applicationContext.xml</contextFile>
<extraDependencies>
<extraDependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>sqljdbc4</artifactId>
<version>4.0</version>
</extraDependency>
</extraDependencies>
<excludes>
<exclude>META-INF/MSFTSIG.RSA</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>
Does not prevent META-INF/MSFTSIG.RSA from being included in the WAR.
The problem looks to be in AbstractExecWarMojo.extractJarToArchive. There is an inner for loop with a continue statement that has no effect. Instead, the statement should be changed to continue on the outer while loop.
This issue was raised because of the following Stack Overflow question: http://stackoverflow.com/questions/29686124/how-do-i-exclude-extradependency-meta-inf-files-for-exec-war-goal