Eclipse ignores user property failOnMissingWebXml

I have created a blank web project using Eclipse Mars and Maven 3.3.3. So far, this project only contains pom.xml:

<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>com.example.project</groupId>
    <artifactId>web-project</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>war</packaging>

    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <failOnMissingWebXml>false</failOnMissingWebXml>
    </properties>

    <build>
        <plugins>
<!--            <plugin> -->
<!--                <groupId>org.apache.maven.plugins</groupId> -->
<!--                <artifactId>maven-war-plugin</artifactId> -->
<!--                <version>2.6</version> -->
<!--                <configuration> -->
<!--                    <failOnMissingWebXml>false</failOnMissingWebXml> -->
<!--                </configuration> -->
<!--            </plugin> -->
        </plugins>
    </build>
</project>

      

Now Eclipse is complaining about a missing file web.xml

. From the documentation of the maven-war plugin it is possible to set a custom property failOnMissingWebXml

, so there is no need to further configure this plugin. This works using Maven from command line, project completed successfully. But Eclipse still complains about missing web.xml.

Does anyone know how to get rid of this Maven configuration error in Eclipse simply by using this user property?

Update: I have another development environment using Eclipse Luna SR1 and Maven 3.2.5 where it doesn't complain about missing web.xml in a newly created web project. So I am wondering how this error is somehow suppressed by the m2e plugin.

+3


source to share


1 answer


Installing wtp-m2e 1.2.1

from http://download.eclipse.org/m2e-wtp/snapshots/mars/ fixes this issue for me.



+3


source







All Articles