eclipse中maven项目web.xml is missing and failonmissingwebxml错误的修复
来源:互联网 发布:周易注疏 知乎 编辑:程序博客网 时间:2024/05/29 03:21
在使用eclipse创建maven项目的时候,有时候会出现这个问题:
web.xml is missing and 'fail On Missing WebXml' is set to true
我遇到这个问题是因为现在一般的web项目已经不需要web.xml文件了,于是我把它删掉了(eclipse自动创建了这个问题,但是我不需要所以删掉了),然后就提示了这个问题。
这个问题的原因是maven看到我们项目的类型是war
所以他说怎么可以没有web.xml了呢?
但是web.xml本来就不是必须的,我们总不能很开心的接受一个接近于空白的文件非要跻身于我们的项目中啊。那怎办呢?
一般有两种方法:
第一种当然是创建一个web.xml了:直接在项目上右键---Java EE Tools---generate.....即可。
但是更推荐第二种,因为第一种会在项目里有一个无用文件。
第二种是告诉maven,我真的不需要web.xml了:
这样就可以了,其中的version不是必需的。
然后有时这样还是不行,那说明你的项目是需要web.xml的,不是开玩笑
参考http://somefuture.iteye.com/blog/2286733
1 0
- eclipse中maven项目web.xml is missing and failonmissingwebxml错误的修复
- maven项目出现web.xml is missing and <failOnMissingWebXml> is set to true错误的解决办法
- maven项目出现web.xml is missing and <failOnMissingWebXml> is set to true错误的解决办法
- eclipse maven项目pom报错web.xml is missing and <failOnMissingWebXml> is set to true
- eclipse 创建 maven 项目时遇到web.xml is missing and <failOnMissingWebXml>异常
- maven中出现web.xml is missing and <failOnMissingWebXml> is set to true的错误如何解决
- 创建Maven项目时提示web.xml is missing and <failOnMissingWebXml> is set to true错误解决方案
- 创建Maven项目时提示web.xml is missing and <failOnMissingWebXml> is set to true错误解决方案
- 创建Maven项目时提示web.xml is missing and <failOnMissingWebXml> is set to true错误解决方案
- 创建maven遇到web.xml is missing and <failOnMissingWebXml> is set to true错误
- Maven中pom.xml报错:web.xml is missing and <failOnMissingWebXml> is set to true
- 新建Maven项目报web.xml is missing and <failOnMissingWebXml> is set to true
- maven项目pom文件报web.xml is missing and <failOnMissingWebXml> is set to true
- Maven搭建项目出现web.xml is missing and <failOnMissingWebXml> is set to true
- maven 的pom.xml 配置异常web.xml is missing and <failOnMissingWebXml> is set to true
- 创建Maven web项目时 出现 web.xml is missing and <failOnMissingWebXml> is set to true错误 pox.xml编译错误
- 创建Maven web项目时 出现 web.xml is missing and <failOnMissingWebXml> is set to true错误 pox.xml编译错误
- maven 的pom出现web.xml is missing and <failOnMissingWebXml> is set to true
- gcxRegslideForm Instructions
- Linux安装mkimage工具
- Qtouch在中标麒麟操作系统上运行
- RxJava系列4(过滤操作符)
- 67. Add Binary
- eclipse中maven项目web.xml is missing and failonmissingwebxml错误的修复
- 手机棋牌是用cocos2d或者cocos2d-x
- 在开发中用 flex遇到的问题
- 泛型二 泛型和数组
- POJ 3077 Rounders G++
- hdu1372 Knight Moves
- C++实现双向链表
- VS2010每次编译都重新编译整个工程的解决方案
- 【高并发Java七】并发设计模式