ripper234
ripper234

Reputation: 229988

Two web.xml files in war, built using Maven

In my war, built by Maven, I find two identical copies of web.xml file, in the same exact path. This is shown by opening the war in 7-ZIP.

How can I debug this and find what exactly is causing this duplication?

Upvotes: 1

Views: 905

Answers (2)

Dragos Geornoiu
Dragos Geornoiu

Reputation: 557

In case someone else gets here, encountered same problem and turned out that the maven-war-plugin was set to an older version. Add the following to your pom.xml:

<dependency>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-war-plugin</artifactId>
    <version>3.0.0</version>
</dependency>

<plugins>
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>3.0.0</version>
    </plugin>
</plugins>

Upvotes: 1

lexicore
lexicore

Reputation: 43651

  • Try mvn -X first to get more logs.
  • This may be relevant.

Upvotes: 1

Related Questions