首页 > Web开发 > 详细

web.xml is missing and <failOnMissingWebXml> is set to true

时间:2017-08-20 23:20:03      阅读:330      评论:0      收藏:0      [点我收藏+]

参考:http://blog.csdn.net/liuvlun/article/details/50218507

使用maven创建项目时有时在pom.xml的war处出现failOnMissingWebXml的错误,根据错误提示的原因可以知道项目是web项目,打包时打成war包。

如果项目里没有web.xml,在项目里添加一个web.xml,刷新一下项目,就应该没有错误,如果还有请看下面的介绍

 如果你的项目在 /src/main/webapp/WEB-INF 下有web.xml,但是仍然还是报这个错误,需要两步操作

1)右击项目,打开Properties对话框,点击Deployment Assembly选项,在右边添加一个文件夹,并且保存设置

    2)在eclispe上方点击Project ->Clean 清理一下这个项目

经过这两步错误就应该已经清楚了

 

或者是

<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>

 

web.xml is missing and <failOnMissingWebXml> is set to true

原文:http://www.cnblogs.com/bluedeblog/p/7401913.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!