Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.2
-
None
-
None
-
WinXP, jdk1.5.0_07, mvn 2.0.4
Description
My scenario:
I use Eclipse 3.1.1 to develop the web app. I run Tomcat 5.5.17 with it's docbase pointed at the source tree (/src/main/webapp). As a result, I have files that are required by Tomcat to run, but not to be included in the WAR. Specifically, I have a WEB-INF folder with a classes directory that includes classes that will actually be included in the WAR as a JAR (as well as a few other things).
As you can see in the following plugin snippet, I specifically exclude the WEB-INF folder from the source tree because all of its contents will be gathered by the various stages of the build process (process-resources, etc) and included in the WAR when it is "exploded"
I had been using the following plugin snippet for generating my War (war plugin 2.0)
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.0</version>
<configuration>
<webXml>target/jspweb.xml</webXml>
<warName>aims</warName>
<excludes>*/.jsp*, */JasperReports/., **/WEB-INF//.*</excludes>
</configuration>
</plugin>
If you change the version from 2.0 to 2.0.1, you will no longer generate the same WAR file! Instead, v2.0.1 uses the source excludes and applies them to the WAR construction as well. This means that the exploded WEB-INF (the correct one) is also removed from the WAR file.
I don't think that the source excludes should be applied to the WAR construction, only to the stage where the source files are "exploded" (as in v2.0)