在创建maven简单项目时,Description Resource Path Location Type web.xml is missing and <failOnMissingWebXml> is set to true

在创建maven简单项目时,报错 Description Resource Path Location Type web.xml is missing and <failOnMissingWebXml> is set to true

这是没有创建web目录,如果要开发web需要补全相应的目录.

====两种方法

第一种,在webapp文件夹下,新建WEB-INF/web.xml

 

第二种,是在pom.xml文件下面增加插件,忽略

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

 

posted @ 2021-03-31 08:44  与f  阅读(569)  评论(0编辑  收藏  举报