创建Maven web项目时 出现 web.xml is missing and <failOnMissingWebXml> is set to true错误 pox.xml编译错误

今天创建一个maven项目 pom.xml出现如下错误:

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

这是因为你因为你WEB-INF下没有web.xml导致造成的

解决方案:

右击项目——>Java EE Tools——>Generate Deployment Descriptor Stub.然后系统会在src/main/webapp/WEB_INF文件加下创建web.xml文件。错误解决!

当然这个方法是针对web项目的解决方案,如果你的工程不是web项目,那么还有另外一种解决方案,就是在pom文件中配置一下failOnMissingWebXml。具体配置如下:

 1 <build>
 2
 3   <plugins>
 4
 5    <plugin>
 6
 7     <groupId>org.apache.maven.plugins</groupId>
 8
 9     <artifactId>maven-war-plugin</artifactId>
10
11     <version>2.6</version>
12
13     <configuration>
14
15      <failOnMissingWebXml>false</failOnMissingWebXml>
16
17     </configuration>
18
19    </plugin>
20
21   </plugins>
22
23  </build>

原文地址:https://www.cnblogs.com/coder-wf/p/12221942.html

时间: 2024-08-01 00:54:36

创建Maven web项目时 出现 web.xml is missing and <failOnMissingWebXml> is set to true错误 pox.xml编译错误的相关文章

【maven】maven创建web项目-pom文件提示web.xml is missing and &lt;failOnMissingWebXml&gt; is set to true

使用maven创建web项目,选择war类型后,pom文件红叉 提示web.xml is missing and <failOnMissingWebXml> is set to true 也有可能: 初始创建了本项目为web项目,然后虽然把web.xml文件放在了WEB_INF下,这两个文件夹虽然放在webapp下了,但是还是报错 解决方法: 这时候需要右击项目-->Java EE Tools-->Generate Deployment Descriptor Stub.然后系统会在

maven创建web项目-pom文件提示web.xml is missing and &lt;failOnMissingWebXml&gt; is set to true 错误

提示web.xml is missing and <failOnMissingWebXml> is set to true 右键点击项目 选择Java EE Tools-->Generate Deployment Descriptor Stub.然后系统会在src/main/webapp/WEB_INF文件加下创建web.xml文件.错误解决!

解决maven项目中web.xml is missing and &lt;failOnMissingWebXml&gt; is set to true

web.xml is missing and <failOnMissingWebXml> is set to true 是因为项目中没有web.xml文件, 步骤如下: 原文地址:https://www.cnblogs.com/pansin/p/12038473.html

web.xml is missing and &lt;failOnMissingWebXml&gt; is set to true 错误

在学习maven模块化构建项目的时候遇到了如下报错信息: 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项目,那么还有

在eclipse中创建maven webapp项目时弹出错误-解决办法

在eclipse中创建maven webapp项目时报错: Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:1.0 from any of the configured repositories. 问题产生原因:是因为本地仓库中缺少了maven-archetype-webapp包,也可能这个包下载不完全,比如:只有pom文件,或只有jar包文件等   [包路径为:C:\Users\xxx

web.xml is missing and &lt;failOnMissingWebXml&gt; is set to true

.这时候需要右击项目-->Java EE Tools-->Generate Deployment Descriptor Stub.然后系统会在src/main/webapp/WEB_INF文件加下创建web.xml文件.错误解决! 当然这个方法是针对web项目的解决方案,如果你的工程不是web项目,那么还有另外一种解决方案,就是在pom文件中配置一下failOnMissingWebXml.具体配置如下: ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1

web.xml is missing and &lt;failOnMissingWebXml&gt; is set to true 错误解决办法

对web项目的解决方案: 右击项目——>Java EE Tools——>Generate Deployment Descriptor Stub. 然后系统会在src/main/webapp/WEB_INF文件加下创建web.xml文件,这样错误就解决了. 对于不是web项目: 解决方案就是在pom文件中配置一下failOnMissingWebXml.具体配置如下: <build> <plugins> <plugin> <groupId>org.a

pom.xml文件报错:web.xml is missing and &lt;failOnMissingWebXml&gt; is set to true

这个错误原因是因为项目无法加载到web.xml,所以需要配置web项目的目录.具体解决,配置步骤如下: 1.右键项目属性,配置项目目录  /src/main/webapp,如果没有,新增一条 2.配置完成后,在菜单栏Project中,选择清理项目clean,即可解决.本人亲测可用.

Description Resource Path Location Type web.xml is missing and &lt;failOnMissingWebXml&gt; is set to true pom.xml /Ascend line 7 Maven Java EE Configuration Problem

pom.xml build 中加入 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.6</version> <configuration> <failOnMissingWebXml>false</failOnMissingWebXm