web.xml is missing and <failOnMissingWebXml> is set to true
新建Maven项目报web.xml is missing and <failOnMissingWebXml> is set to true
这是因为你因为你WEB-INF下没有web.xml导致造成的
解决方案:
1.右击项目——>Java EE Tools——>Generate Deployment Descriptor Stub.然后系统会在src/main/webapp/WEB_INF文件加下创建web.xml文件。错误解决!

2.当然这个方法是针对web项目的解决方案,如果你的工程不是web项目,那么还有另外一种解决方案,就是在pom文件中配置一下failOnMissingWebXml。具体配置如下:
<build>  
    <plugins>  
        <plugin>  
            <groupId>org.apache.maven.plugins</groupId>  
            <artifactId>maven-war-plugin</artifactId>  
            <version>2.3</version>  
            <configuration>  
                <failOnMissingWebXml>false</failOnMissingWebXml>  
            </configuration>  
        </plugin>  
    </plugins>  
</build>  

3.选中项目点击右键 选Maven--->Update Maven 错误消失

相关文章:

  • 2021-10-09
  • 2021-11-03
  • 2021-10-29
  • 2021-10-29
  • 2018-03-22
  • 2021-10-15
  • 2021-10-19
  • 2021-10-19
猜你喜欢
  • 2018-07-24
  • 2021-08-02
  • 2018-09-05
  • 2021-10-19
  • 2021-08-18
  • 2021-06-18
  • 2021-10-19
  • 2020-01-26
相关资源
相似解决方案