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文件中手动添加如下配置:
  1. <properties>
  2.    <failOnMissingWebXml>false</failOnMissingWebXml>
  3. </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. Java NIO -- 缓冲区(Buffer)的数据存取

    缓冲区(Buffer): 一个用于特定基本数据类型的容器.由 java.nio 包定义的,所有缓冲区都是 Buffer 抽象类的子类.Java NIO 中的 Buffer 主要用于与 NIO 通道进行 ...

  2. (转)Maven pom.xml 配置详解

    背景:maven一直感觉既熟悉又陌生,归根结底还是自己不太熟. 1 什么是pom? pom作为项目对象模型.通过xml表示maven项目,使用pom.xml来实现.主要描述了项目:包括配置文件:开发者 ...

  3. 结尾非零数的奇偶性(问题来源于PythonTip)

    给你一个正整数列表 L, 判断列表内所有数字乘积的最后一个非零数字的奇偶性.如果为奇数输出1,偶数则输出0.. 例如:L=[2,8,3,50] 则输出:0 L = [2,8,3,50] c2 = 0 ...

  4. koa的洋葱圈模型

    拿以下这段代码为例: const Koa = require('koa'); const app = new Koa(); // x-response-time app.use(async (ctx, ...

  5. saltstack安装与配置

    Saltstack是基于Python开发的一套C/S架构,具备Puppet.Ansible功能于一身的配置管理工具,功能十分强大,各模块融合度及复用性极高:使用号称世界上最快的消息队列ZeroMQ使得 ...

  6. Scala进阶之路-Scala中的高级类型

    Scala进阶之路-Scala中的高级类型 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.类型(Type)与类(Class)的区别 在Java里,一直到jdk1.5之前,我们说 ...

  7. oracle 递归和connect by【转】

    oracle递归查询(单表包含多级上下级关系) http://www.cnblogs.com/walk-the-Line/p/4882866.html -- 查找所有第一层(包括)下的所有子节点 -- ...

  8. Git Bash使用详细教程

    https://blog.csdn.net/wangrenbao123/article/details/55511461/

  9. error: control may reach end of non-void function [-Werror,-Wreturn-type]

    编译出现如下错误 error: control may reach end of non-void function [-Werror,-Wreturn-type] 这个错误可能和编译器有关(在相同代 ...

  10. Hibernate_day02

    一.今天内容 1 实体类编写规则 2 hibernate主键生成策略 (1)native (2)uuid 3 实体类操作 (1)crud操作 (2)实体类对象状态 4 hibernate的一级缓存 5 ...