Hi,

I have a multi-module project structure that basically produces an EAR and some 
other artifacts:

<root>
+- pom.xml
|
+- module-common
|  + pom.xml
|  \ ...
|
+- module-war
|  + pom.xml
|  \ ...
|
+- module-ear
|  + pom.xml
|  \ ...
|
...

The project fully uses standard Maven directory layout, and there are some 
inter-module dependencies:
- module-war depends on module-common
- module-ear depends on module-war
- each module has a <parent> entry to reference the project root

The war module's web.xml (src/main/webapp/WEB-INF/web-xml) is automatically 
filtered when building the war so that Maven replaces display name and 
description with the values from my pom:

web.xml:

<?xml version="1.0" encoding="UTF-8"?>

<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
        id="WebApp_ID">

        <display-name>${project.name}</display-name>
        <description>${project.description} ${project.version}</description>
        ...
</web-app>


From the war module's pom.xml:

...
<packaging>war</packaging>
...
<build>
        <plugins>
                <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-war-plugin</artifactId>
                        <version>2.1-beta-1</version>
                        <configuration>
                                
<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
                        </configuration>
                </plugin>
        </plugins>
</build>
...

Everything quite basic, and all according to the docs on 
http://maven.apache.org/plugins/maven-war-plugin/faq.html.

As long as I'm using m-war-p 2.1-beta-1, everything works fine. With m-war-p 
2.1 the WAR suddenly contains duplicate web.xml entries in the WEB-INF folder 
so that the ear module can't be packaged successfully.

Am I doing something wrong? Or is this a bug (feature)?


Environment:
- Maven 3.0
- JDK 1.6.0_22
- Windows XP


Regards

Thorsten

Attachment: PGP.sig
Description: Signierter Teil der Nachricht

Reply via email to