web.xml is missing and <failOnMissingWebXml> is set to true

The eclipse oxgen that just came out has practiced my hands. When I use eclipse to create a maven project, this problem sometimes occurs.

web.xml is missing and <failOnMissingWebXml> is set to true

 

Baidu took a look and it turned out that there is no web.xml file in resoures/webapp. At this time, you can create a new WEB-INF/web.xml file in resoures/webapp  to solve the problem. Another solution is to add it to the pom. 

<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> This configuration problem can also be solved. I have tried both, and they are all ok

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326609683&siteId=291194637
Recommended