当前位置: 移动技术网 > IT编程>开发语言>Java > 新建Maven工程,pom.xml报错web.xml is missing and <failOnMissingWebXml> is set to true

新建Maven工程,pom.xml报错web.xml is missing and <failOnMissingWebXml> is set to true

2018年09月18日  | 移动技术网IT编程  | 我要评论

错误原因: 项目中没有web.xml

解决办法:

  1.  在项目中添加web.xml
  2. 在pom.xml中添加下面的插件
 1  <build>
 2   <plugins>
 3    <plugin>
 4     <groupid>org.apache.maven.plugins</groupid>
 5     <artifactid>maven-war-plugin</artifactid>
 6     <version>2.6</version>
 7     <configuration>
 8      <failonmissingwebxml>false</failonmissingwebxml>
 9     </configuration>
10    </plugin>
11   </plugins>
12  </build>

 

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网