ERROR:web.xml is missing and <failOnMissingWebXml> is set to true
本人情况:下方第一种方法“Generate Deployment Descriptor Stub”不能点击,只能使用第二种方法。
网上查了多种解决方法
第一种:这时候需要右击项目——>Java EE Tools——>Generate Deployment Descriptor Stub.然后系统会在src/main/webapp/WEB_INF文件加下创建web.xml文件。错误解决!
第二种:在pom.xml加入
<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>
还没有评论,来说两句吧...