Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: 2.1
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:Java version: 1.6.0_18
Java home: C:...\jdk6_18\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
-
Number of attachments :
Description
Here are the steps to reproduce issue; the first example creates a proper WAR with 1 /WEB-INF/web.xml. The second scenario creates 2 web.xml's - or at least 2 entries in the WAR catalog. The project WAR will then not deploy.
----------------------------------------------------------------
From a Windows XP command window:
set M2_HOME=C:\apache-maven\apache-maven-2.2.1
set PATH=%PATH%;%M2_HOME%\bin
>mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-webapp -DarchetypeArtifactId=maven-archetype-webapp
>mvn -version
Apache Maven 2.2.1 (r801777; 2009-08-06 15:16:01-0400)
Java version: 1.6.0_18
Java home: C:...\jdk6_18\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
>mvn package
1 web.xml
----------------------------------------------------------------
To reproduce error
set M2_HOME=C:\apache-maven\apache-maven-3.0
set PATH=%PATH%;%M2_HOME%\bin
>mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-webapp -DarchetypeArtifactId=maven-archetype-webapp
>mvn -version
Apache Maven 3.0 (r1004208; 2010-10-04 07:50:56-0400)
Java version: 1.6.0_18
Java home: C:...\jdk6_18\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
>mvn package
2 web.xml's in /WEB-INF WAR.
Issue Links
- duplicates
-
MWAR-235
The web.xml file included twice into the result war
-
The generated project doesn't specify the plugin version, and as such is subject to the default plugin version and any of its bugs.