maven project to fight the war package error, can not find the file web.xml

1, error conditions are described: Today maven packaged with time, has been an error, suggesting no web.xml, the error message is:

Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project child2: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1]

Error as shown below:

2, solution: add the following configuration in the pom.xml file:

    <properties>
        <failOnMissingWebXml>false</failOnMissingWebXml>
    </properties>

Packaging Success again, as shown below:

 

Guess you like

Origin www.cnblogs.com/baiyuer666/p/11231669.html