[ http://jira.codehaus.org/browse/MWAR-52?page=all ] Brett Porter closed MWAR-52: ----------------------------
Assign To: Brett Porter Resolution: Cannot Reproduce the code is correct. the custom web.xml is copied to WEB-INF/web.xml in the exploded webapp, which is what the code you intended to change is referring to. I have enhanced the test to ensure the bundled web.xml is correct. If you have a test case for something that fails, please reopen the issue. > WAR plugin does not honor the webXml configuration setting [patch included!] > ---------------------------------------------------------------------------- > > Key: MWAR-52 > URL: http://jira.codehaus.org/browse/MWAR-52 > Project: Maven 2.x War Plugin > Type: Bug > Versions: 2.0 > Reporter: Andreas Schildbach > Assignee: Brett Porter > Attachments: patch.txt > > Original Estimate: 15 minutes > Remaining: 15 minutes > > The WAR plugin does not honor the webXml configuration setting. I think this > comes from web.xml being hardcoded into WarMojo, rather than using the > default-value mechanism for the MOJO attribute. > Here is a patch: > Index: > C:/cc/sd_area51_3/OcToPuS/tools/maven/plugins/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java > =================================================================== > --- > C:/cc/sd_area51_3/OcToPuS/tools/maven/plugins/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java > (revision 416739) > +++ > C:/cc/sd_area51_3/OcToPuS/tools/maven/plugins/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java > (working copy) > @@ -102,7 +102,7 @@ > /** > * The path to the web.xml file to use. > * > - * @parameter expression="${maven.war.webxml}" > + * @parameter expression="${maven.war.webxml}" > default-value="WEB-INF/web.xml" > */ > private File webXml; > > Index: > C:/cc/sd_area51_3/OcToPuS/tools/maven/plugins/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/WarMojo.java > =================================================================== > --- > C:/cc/sd_area51_3/OcToPuS/tools/maven/plugins/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/WarMojo.java > (revision 416739) > +++ > C:/cc/sd_area51_3/OcToPuS/tools/maven/plugins/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/WarMojo.java > (working copy) > @@ -177,7 +177,7 @@ > > warArchiver.addDirectory( getWebappDirectory() ); > > - warArchiver.setWebxml( new File( getWebappDirectory(), > "WEB-INF/web.xml" ) ); > + warArchiver.setWebxml( getWebXml() ); > > // create archive > archiver.createArchive( getProject(), archive ); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira