Maven项目pom.xml文件报错“web.xml is missing and <failOnMissingWebXml> is set to true”
2017-05-19 10:22
706 查看
解决方案引用自:web.xml is missing and <failOnMissingWebXml> is set to true
最近做的一个maven管理的web项目,遇到项目中pom.xml文件报“web.xml is missing and <failOnMissingWebXml> is set to true”的错误,错误原因是项目中没有web.xml文件:
经查询找到3个解决方案:
1、生成 web.xml 文件(如果确实不需要web.xml文件,建议跳过此方案,以保持项目代码的干净)
在 Project Explorer 视图窗口右击项目的“Deployment Descriptor”项;
选择“Generate Deployment Descriptor Stub”;
然后就在“src/main/webapp/WEB-INF”目录下创建web.xml文件
2、在 pom.xml 文件中加入如下配置:
最近做的一个maven管理的web项目,遇到项目中pom.xml文件报“web.xml is missing and <failOnMissingWebXml> is set to true”的错误,错误原因是项目中没有web.xml文件:
经查询找到3个解决方案:
1、生成 web.xml 文件(如果确实不需要web.xml文件,建议跳过此方案,以保持项目代码的干净)
在 Project Explorer 视图窗口右击项目的“Deployment Descriptor”项;
选择“Generate Deployment Descriptor Stub”;
然后就在“src/main/webapp/WEB-INF”目录下创建web.xml文件
2、在 pom.xml 文件中加入如下配置:
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.6</version> <configuration> <failOnMissingWebXml>false</failOnMissingWebXml> </configuration> </plugin> </plugins> </build>3、在 pom.xml 文件中加入如下配置(短配置,与版本无关):
<properties> <failOnMissingWebXml>false</failOnMissingWebXml> </properties>
相关文章推荐
- eclipse新建maven项目:pom.xml出现web.xml is missing and <failOnMissingWebXml> is set to true解决方案
- maven创建web项目-pom文件提示web.xml is missing and <failOnMissingWebXml> is set to true
- 【maven】maven创建web项目-pom文件提示web.xml is missing and <failOnMissingWebXml> is set to true
- 创建Maven项目时提示web.xml is missing and <failOnMissingWebXml> is set to true错误解决方案
- eclipse从svn导下项目后pom文件提示web.xml is missing and <failOnMissingWebXml> is set to true
- maven 的pom出现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项目时提示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错误的解决办法
- Description Resource Path Location Type web.xml is missing and <failOnMissingWebXml> is set to true pom.xml /Ascend line 7 Maven Java EE Configuration Problem
- 创建Maven项目时提示web.xml is missing and <failOnMissingWebXml> is set to true错误解决方案
- 构建maven项目时候报错 web.xml is missing and <failOnMissingWebXml> is set to true
- pom.xml项目文件中出现web.xml is missing and <failOnMissingWebXml> is set to true解决方法
- maven项目出现web.xml is missing and <failOnMissingWebXml> is set to true错误的解决办法
- Eclipse创建Maven项目时提示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.xml is missing and <failOnMissingWebXml> is set to true