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++11 线程

    转自:http://www.justsoftwaresolutions.co.uk/threading/multithreading-in-c++0x-part-3.html 是个just的c++库. ...

  2. B1003. 我要通过!

    “答案正确”是自动判题系统给出的最令人欢喜的回复.本题属于PAT的“答案正确”大派送 —— 只要读入的字符串满足下列条件,系统就输出“答案正确”,否则输出“答案错误”. 得到“答案正确”的条件是: 1 ...

  3. (转)使用 Spring缓存抽象 支持 EhCache 和 Redis 混合部署

    背景:最近项目组在开发本地缓存,其中用到了redis和ehcache,但是在使用注解过程中发现两者会出现冲突,这里给出解决两者冲突的具体方案. spring-ehcache.xml配置: <?x ...

  4. Java_myBatis_XML代理_延迟加载

    使用mybatis的延迟加载,需要两个步骤: 1.在全局配置文件中添加一下语句(lazyLoadingEnabled默认为false,aggressiveLazyLoading默认为true) < ...

  5. SpringBoot @Async 异步处理业务逻辑和发短信逻辑

    有个业务场景,业务数据审核通过后需要给用户发短信,发短信过程比较耗时,可能需要几秒甚至十几秒,因此使用异步发短信 使用了注解@Async来实现: 1.SpringApplication启用注解@Ena ...

  6. Spark记录-大数据简介

    什么是大数据 大数据(big data),指无法在一定时间范围内用常规软件工具进行捕捉.管理和处理的数据集合,是需要新处理模式才能具有更强的决策力.洞察发现力和流程优化能力的海量.高增长率和多样化的信 ...

  7. 运用Zabbix实现内网服务器状态及局域网状况监控(4) —— Zabbix客户端安装

    1.  创建用户 [root@zabbix ~]# groupadd zabbix [root@zabbix ~]# useradd -g zabbix zabbix 2. 安装zabbix_3.2 ...

  8. python学习笔记9--日志模块logging

    我们在写程序的时候经常会打一些日志来帮助我们查找问题,这次学习一下logging模块,在python里面如何操作日志.介绍一下logging模块,logging模块就是python里面用来操作日志的模 ...

  9. C语言实现二叉树的建立、遍历以及表达式的计算

    实现代码 #include <stdio.h> #include <stdlib.h> #include <malloc.h> #include <ctype ...

  10. This dependency was not found: * !!vue-style-loader!css-loader?

    npm install stylus-loader css-loader style-loader --save-dev 猜测这两个组件发布时是不需要的,所以要加上-dev