创建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。具体配置如下:
<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>
以上来自于百度搜到的答案,亲测可用
创建Maven web项目时 出现 web.xml is missing and <failOnMissingWebXml> is set to true错误 pox.xml编译错误的更多相关文章
- 【maven】maven创建web项目-pom文件提示web.xml is missing and <failOnMissingWebXml> is set to true
使用maven创建web项目,选择war类型后,pom文件红叉 提示web.xml is missing and <failOnMissingWebXml> is set to true ...
- Eclispe创建maven工程缺失web.xml报web.xml is missing and <failOnMissingWebXml> is set to true的错误
Eclispe创建maven工程缺失web.xml报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文件, 步骤如下:
- 解决Eclipse里的Maven工程pom.xml文件报:web.xml is missing and <failOnMissingWebXml> is set to true错误
打开eclipse准备进行开发时,发现项目上有个红星号,查看错误后发现报了一个:"web.xml is missing and <failOnMissingWebXml> is ...
- maven的pom报错web.xml is missing and <failOnMissingWebXml> is set to true
错误信息:web.xml is missing and <failOnMissingWebXml> is set to true 解决办法:https://blog.csdn.net/si ...
- 解决 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错误的解决
.personSunflowerP { background: rgba(51, 153, 0, 0.66); border-bottom: 1px solid rgba(0, 102, 0, 1); ...
- 在eclipse中创建maven webapp项目时弹出错误-解决办法
在eclipse中创建maven webapp项目时报错: Could not resolve archetype org.apache.maven.archetypes:maven-archetyp ...
- 新建Maven工程,pom.xml报错web.xml is missing and <failOnMissingWebXml> is set to true
错误原因: 项目中没有web.xml 解决办法: 在项目中添加web.xml 在pom.xml中添加下面的插件 <build> <plugins> <plugin> ...
随机推荐
- CentOS集群安装Tmux
对于Linux的常用者,如果你说你不会tmux,那你就out啦~ 1. 什么是Tmux? 先来看看Tmux长什么样. tmux是一个优秀的终端复用软件,类似GNU Screen,但来自于OpenBSD ...
- html图片预览
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title&g ...
- D2.Reactjs 操作事件、状态改变、路由
下面内容代码使用ES6语法 一.组件的操作事件: 1.先要在组件类定义内定义操作事件的方法,如同event handler.若我需要监听在组件内的Button的点击事件onClick,首先定义监听方法 ...
- ICML历年Best Papers
作者:我爱机器学习原文链接:ICML历年Best Papers ICML (Machine Learning)(1999-2016) 2016 Dueling Network Architecture ...
- Paths_Quartz2D
Paths中的几个重要元素 Points void CGContextMoveToPoint ( CGContextRef c, CGFloat x, CGFloat y ); 指定 ...
- JavaScript中作用域和作用域链解析
学习js,肯定要学习作用域,js作用域和其他的主流语言的作用域还存在很大的区别. 一.js没有块级作用域. js没有块级作用域,就像这样: if(){ : console.log(a) //输出100 ...
- iOS App 获取从后台返回前台时的页面
产品美美的给小伙伴提了一个需求,当程序从后台进入前台时,如果是指定的页面,则弹出提示框. 大家首先想到的方法就是通过 AppDelegate.h 进行控制,相对复杂的步骤就是 在程序进入后台时对当前页 ...
- 生成模型(Generative)和判别模型(Discriminative)
生成模型(Generative)和判别模型(Discriminative) 引言 最近看文章<A survey of appearance models in visual object ...
- 移动混合开发之HTML5在移动开发中的准则
1.尽量单页面开发 2.慎重选择前端UI框架,新手最好自己动手. 3.动画特效达到60fps 4.长度单位是用rem,即字体的宽度,字体宽度可根据 window.width/number.
- 19:A*B问题
总时间限制: 1000ms 内存限制: 65536kB 描述 输入两个正整数A和B,求A*B. 输入 一行,包含两个正整数A和B,中间用单个空格隔开.1 <= A,B <= 50000 ...