eclipse ear project error "the deployment descriptor of the module cannot be loaded or found"

1.1k views Asked by At

When importing a fully working maven ear project to eclipse I get a validation error for each included module. The messages all say:

The deployment descriptor of the module XXX cannot be loaded or found.

The project can be built successfully from the command line and the packaged EAR deploys perfectly.

1

There are 1 answers

0
Akro On

The issue seems to be related to the way the wtp-m2e plugin loads the maven-ear-plugin configuration. It does not take the default EAR version into account and sets the project EAR facet version to 1.3.

The solution is to include the version explicitely in the maven -ear-plugin configuration.

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-ear-plugin</artifactId>
    <configuration>
        <version>7</version>
    </configuration>
</plugin>