You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Andreas Schildbach (JIRA)" <ji...@codehaus.org> on 2006/06/26 10:16:40 UTC

[jira] Updated: (MWAR-52) WAR plugin does not honor the webXml configuration setting [patch included!]

     [ http://jira.codehaus.org/browse/MWAR-52?page=all ]

Andreas Schildbach updated MWAR-52:
-----------------------------------

    Attachment: patch.txt

> 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
>  Attachments: patch.txt
>
>
> 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