maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Schildbach (JIRA)" <j...@codehaus.org>
Subject [jira] Reopened: (MWAR-52) WAR plugin does not honor the webXml configuration setting [patch included!]
Date Tue, 27 Jun 2006 07:12:40 GMT
     [ http://jira.codehaus.org/browse/MWAR-52?page=all ]
     
Andreas Schildbach reopened MWAR-52:
------------------------------------


Here is my testcase:

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-war-plugin</artifactId>
	<version>2.0</version>
	<configuration>
		<webXml>myWeb.xml</webXml>
	</configuration>
</plugin>

[INFO] Error assembling WAR: Deployment descriptor: C:\[...]\WEB-INF\web.xml does not exist.

The plugin asks for web.xml, although I have configured myWeb.xml.


> 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
>        Time Spent: 30 minutes
>         Remaining: 0 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


Mime
View raw message