web.xml is missing and <failOnMissingWebXml> is set to true解决方法

http://blog.csdn.net/u010697681/article/details/50761184

这种错误是因为maven默认简单构建项目是sevlet3.0版本,web.xml不是必须的,这时候需要手动创建webapp/WEB-INF/web.xml,web.xml可以从其他项目复制一个过来改改,
或者pom.xml添加如下配置

<build>
    <pluginManagement>
        <plugins>
            <plugin>  
                <groupId>org.apache.maven.plugins</groupId>  
                <artifactId>maven-war-plugin</artifactId>  
                <configuration>  
                    <failOnMissingWebXml>false</failOnMissingWebXml>  
                </configuration>  
            </plugin> 
        </plugins>

    </pluginManagement>
</build>

 修改完了别忘了右键项目Mavan/update project..

猜你喜欢

转载自hzxlb910.iteye.com/blog/2371721