[ 
https://jira.codehaus.org/browse/MWAR-248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=309210#comment-309210
 ] 

Valentin Jacquemin commented on MWAR-248:
-----------------------------------------

Starting with an empty war project containing only the web.xml file I still get 
the warning.

> mvn --version
Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
Maven home: C:\utils\apache-maven\bin\..
Java version: 1.6.0_20, vendor: Sun Microsystems Inc.
Java home: C:\Program Files (x86)\Java\jdk1.6.0_20\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"

> more pom.xml
<?xml version="1.0" encoding="UTF-8" ?>
<project xmlns="http://maven.apache.org/POM/4.0.0";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                      http://maven.apache.org/xsd/maven-4.0.0.xsd";>
  <modelVersion>4.0.0</modelVersion>
  <groupId>test</groupId>
  <artifactId>maven-war-warning</artifactId>
  <packaging>war</packaging>
  <version>1.0</version>
</project>

> mvn package
...
[WARNING] Warning: selected war files include a WEB-INF/web.xml which will be ig
nored
(webxml attribute is missing from war task, or ignoreWebxml attribute is specifi
ed as 'true')

To get rid of the warning I had to modify the pom to include this unintuitive 
addition:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-war-plugin</artifactId>
  <configuration>
    <packagingExcludes>WEB-INF/web.xml</packagingExcludes>
  </configuration>
</plugin>
                
> Plugin warns about missing webxml attribute even if one exists
> --------------------------------------------------------------
>
>                 Key: MWAR-248
>                 URL: https://jira.codehaus.org/browse/MWAR-248
>             Project: Maven 2.x WAR Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1.1
>            Reporter: Gili
>            Assignee: Dennis Lundberg
>             Fix For: 2.2
>
>         Attachments: debug.log
>
>
> I am attaching a debug log that clearly demonstrates how the WAR plugin warns 
> about a missing webxml attribute which exists. I am attempting to let the 
> plugin know that the web.xml file it is encountering is the same one 
> specified by the webxml attribute.
> My pom file contains:
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-war-plugin</artifactId>
>         <version>2.1.1</version>
>         <configuration>
>           <failOnMissingWebXml>true</failOnMissingWebXml>
>           <webXml>src/main/webapp/WEB-INF/web.xml</webXml>
>         </configuration>
>       </plugin>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to