1、web.xml is missing and <failOnMissingWebXml> is set to true 提示信息应该能看懂。也就是缺少了web.xml文件,<failOnMissingWebXml>被设置成true了。
目前被顶次数最多的回答原文如下:
This is a maven error. It says that it is expecting a web.xml file in your project because it is a web application, as indicated by <packaging>war</packaging>. However, for recent web applications a web.xml file is totally optional. Maven needs to catch up to this convention. Add this to your maven pom.xml to let maven catch up and you don't need to add a useless web.xml to your project:
大意是说这是一个Maven错误,在最近的web应用开发中web.xml文件已经变得可有可无了。不过Maven还没有跟上这一变化。
我们只要在pom.xml文件中手动添加如下配置:
<properties>
   <failOnMissingWebXml>false</failOnMissingWebXml>
</properties>

2、红色感叹号,build path无报错

一般是因为缺少jar包。在保证pom.xml没有报错的情况下,顺序进行如下操作。
1)项目右键,maven download sources
2)项目右键,maven update project
3)项目右键,run as maven clean
4)project clean 选中报错项目 clean
如果以上步骤仍然无效,可在Problems视图查看具体错误,
Description Resource Path Location Type
Archive for required library: 'D:/DevTools/mavenrepo/org/apache/lucene/lucene-backward-codecs/5.5.4/lucene-backward-codecs-5.5.4.jar' in project 'test' cannot be read or is not a valid ZIP file test Build path Build Path Problem
在Maven仓库中查看,发现该jar包已存在,删除之,随便修改pom.xml使其重新编译,重新下载后正常。
 

maven项目提示web.xml is missing或红色感叹号的更多相关文章

  1. 解决maven项目中web.xml is missing and <failOnMissingWebXml> is set to true

    web.xml is missing and <failOnMissingWebXml> is set to true 是因为项目中没有web.xml文件, 步骤如下:

  2. 【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 ...

  3. 创建Maven项目时提示web.xml is missing and <failOnMissingWebXml> is set to true错误解决方案

    1. 右键点击Deployment Descriptor 2. 选择Generate Deployment Descriptor Stub P.S.下面顺便提一个小技巧: 创建动态web时先右键项目, ...

  4. 创建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 这是因为你 ...

  5. eclipse导入maven项目有时出现web.xml is missing的问题

    今天导入一个从Git上pull下来的项目导入eclipse时,报错web.xml is missing,但是我检查了webapp下面的WEB-INF目录下是有web.xml的,然后就纠结了.纠结了半天 ...

  6. 解决Eclipse里的Maven工程pom.xml文件报:web.xml is missing and <failOnMissingWebXml> is set to true错误

    打开eclipse准备进行开发时,发现项目上有个红星号,查看错误后发现报了一个:"web.xml is missing and <failOnMissingWebXml> is ...

  7. 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的错误,一看,还缺 ...

  8. 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 ...

  9. Eclipse 构建Maven项目--普通web项目

    一.Maven项目的新建 1.鼠标右键---->New----->Maven Project 2.直接点下一步 3.选中 maven-archetype-webapp 后点击下一步 4. ...

随机推荐

  1. C++ 容器:顺序性容器、关联式容器和容器适配器

    什么是容器 首先,我们必须理解一下什么是容器,在C++ 中容器被定义为:在数据存储上,有一种对象类型,它可以持有其它对象或指向其它对像的指针,这种对象类型就叫做容器.很简单,容器就是保存其它对象的对象 ...

  2. bracketed-paste-magic:zle:41: not enough arguments for -U

    原因是zsh的插件出问题了,解法方法如下: 把 ~/.oh-my-zsh/lib/misc.zsh 文件中的第一段 if 注释掉 OK 啦 # ]]; then # for d in $fpath; ...

  3. ??? cliquers

    解:先推一个式子,然后就是CRT了... 那个阶乘怎么求呢?主要是分母可能有0,这时我们把分母的因子p全部提出来,上下次数相减判断即可. 细节颇多......注意在快速幂开始的时候a %= MO是个好 ...

  4. javascript面向对象精要第一章原始类型和引用类型整理精要

  5. 01-HTML5的介绍

    本章知识点 HTML5介绍 什么是 HTML5 HTML的新特性 HTML新增的语义化标签 HTML5介绍 HTML5,在2014年10月由万维网联盟(W3C)完成标准制定. HTML5的设计目的是为 ...

  6. mfc editline 变为大框框

    属性:

  7. GO语言的进阶之路-面向对象编程

    GO语言的进阶之路-面向对象编程 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 当你看完这篇文章之时,我可以说你的Golang算是入门了,何为入门?就是你去看Docker 源码能看 ...

  8. free命令常用参数详解

    free命令常用参数详解 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 在运维期间我们会经常去查看服务器硬件信息,比如说内存,大家可能知道看内存用“[root@yinzhengji ...

  9. 函数和常用模块【day06】:pickle模块(十二)

    本节内容 1.dumps序列化和loads反序列化 2.dump序列化和load反序列化 3.序列函数 1.dumps序列化和loads反序列化 dumps()序列化 1 2 3 4 5 6 7 8 ...

  10. 函数和常用模块【day04】:函数介绍(一)

    本节内容 1.函数介绍 2.函数定义 3.为什么要使用函数 一.介绍 在我们以往的学习编程的过程当中,碰到的最多的两张编程方式或者说编程方法:面向过程和面向对象.其实不管是哪一种,其实都是编程的方法论 ...