web.xml is missing and <failOnMissingWebXml> is set to true
2017-09-19 16:06
363 查看
在学习maven模块化构建项目的时候遇到了如下报错信息:
这时候需要右击项目——>Java EE Tools——>Generate Deployment Descriptor Stub.然后系统会在src/main/webapp/WEB_INF文件加下创建web.xml文件。错误解决!
当然这个方法是针对web项目的解决方案,如果你的工程不是web项目,那么还有另外一种解决方案,就是在pom文件中配置一下failOnMissingWebXml。具体配置如下:
web.xml is missing and <failOnMissingWebXml> is set to true
这时候需要右击项目——>Java EE Tools——>Generate Deployment Descriptor Stub.然后系统会在src/main/webapp/WEB_INF文件加下创建web.xml文件。错误解决!当然这个方法是针对web项目的解决方案,如果你的工程不是web项目,那么还有另外一种解决方案,就是在pom文件中配置一下failOnMissingWebXml。具体配置如下:
<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>
相关文章推荐
- web.xml is missing and <failOnMissingWebXml> is set to true
- web.xml is missing and <failOnMissingWebXml> is set to true
- web.xml is missing and <failOnMissingWebXml> is set to true
- maven 的pom出现web.xml is missing and <failOnMissingWebXml> is set to true
- 创建Maven web项目时 出现 web.xml is missing and <failOnMissingWebXml> is set to true错误 pox.xml编译错误
- 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解决方案
- web.xml is missing and <failOnMissingWebXml> is set to true
- web.xml is missing and <failOnMissingWebXml> is set to true[解决]
- poe.xml 出现web.xml is missing and <failOnMissingWebXml> is set to true的错误
- web.xml is missing and <failOnMissingWebXml> is set to true解决方法
- web.xml is missing and <failOnMissingWebXml> is set to true
- Maven项目pom.xml文件报错“web.xml is missing and <failOnMissingWebXml> is set to true”
- web.xml is missing and <failOnMissingWebXml> is set to true
- web.xml is missing and <failOnMissingWebXml> is set to true
- 构建maven项目时候报错 web.xml is missing and <failOnMissingWebXml> is set to true
- web.xml is missing and <failOnMissingWebXml> is set to true
- web.xml is missing and <failonmissingwebxml> is set to true
- web.xml is missing and <failOnMissingWebXml> is set to true