maven项目提示web.xml is missing或红色感叹号
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还没有跟上这一变化。
<properties>
<failOnMissingWebXml>false</failOnMissingWebXml>
</properties>
2、红色感叹号,build path无报错
2)项目右键,maven update project
3)项目右键,run as maven clean
4)project clean 选中报错项目 clean
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或红色感叹号的更多相关文章
- 解决maven项目中web.xml is missing and <failOnMissingWebXml> is set to true
web.xml is missing and <failOnMissingWebXml> is set to true 是因为项目中没有web.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 ...
- 创建Maven项目时提示web.xml is missing and <failOnMissingWebXml> is set to true错误解决方案
1. 右键点击Deployment Descriptor 2. 选择Generate Deployment Descriptor Stub P.S.下面顺便提一个小技巧: 创建动态web时先右键项目, ...
- 创建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 这是因为你 ...
- eclipse导入maven项目有时出现web.xml is missing的问题
今天导入一个从Git上pull下来的项目导入eclipse时,报错web.xml is missing,但是我检查了webapp下面的WEB-INF目录下是有web.xml的,然后就纠结了.纠结了半天 ...
- 解决Eclipse里的Maven工程pom.xml文件报:web.xml is missing and <failOnMissingWebXml> is set to true错误
打开eclipse准备进行开发时,发现项目上有个红星号,查看错误后发现报了一个:"web.xml is missing and <failOnMissingWebXml> is ...
- 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的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 ...
- Eclipse 构建Maven项目--普通web项目
一.Maven项目的新建 1.鼠标右键---->New----->Maven Project 2.直接点下一步 3.选中 maven-archetype-webapp 后点击下一步 4. ...
随机推荐
- cf1063B Labyrinth (bfs)
可以证明,如果我搜索的话,一个点最多只有两个最优状态:向左剩余步数最大时和向右剩余步数最大时 然后判一判,bfs就好了 dfs会T惨... #include<bits/stdc++.h> ...
- 【POJ3349】snowflakes
这是一道可以练习哈希表的模板题.关于哈希表的操作均有涉及. 哈希函数的选取是这道题的关键.这道题的关键字是一个长度为6的序列,并且序列与开始顺序.时钟顺序均无关. 因此,采用哈希函数\(H[x]=\S ...
- (转)Maven之自定义archetype生成项目骨架
背景:最近在开发一个项目的基础构件,在以后项目的开发过程中可以直接使用该构件快速的生成项目骨架进行开发. 摘要:使用过Maven的人都知道maven中有许多功能都是通过插件来提供的,今天我们来说一下其 ...
- JAVA:当数据库重启后连接池没有自动识别的解决办法
今天发现服务器上的一个服务程序出现问题,软件抛出:Connection reset by peer: socket write error 无法正常提供服务,找了一下原因,原来是因为数据库服务器重启, ...
- MATLAB:图像选取局部区域滤波(roicolor、roipoly、roifill、fspecial、roifilt2函数)
对于某些特殊的图像处理,我们不希望将整张图都进行图像处理.这个时候就用到了roicolor.roipoly.roifill.fspecial.roifilt2函数.代码实现过程如下: close al ...
- 关于checkbox全选与全不选的实现与遇到的问题
HTML: <div class="outbox"> <label for="box">全选</label> <inp ...
- python---模板引擎
布局文件layout.html:就是对文件的格式化输出(对其中的标签进行替换) <!DOCTYPE html> <html lang="en"> <h ...
- 在 golang 中使用 Json
序列化 序列化对象将使用 encoding/json 中的 Marshal 函数. 函数原型为:func Marshal(v interface{}) ([]byte, error) 以下是官网给出的 ...
- CentOS6.8下安装memcached并设置开机自启动
参考资料:http://www.cnblogs.com/handongyu/p/6419305.html http://coolnull.com/1986.html 一.安装libevent 首 ...
- MyBatisPlus环境下使用MyBatis的配置类
通过@Configuration使用MyBatis配置类的资料比较少,大部分都是通过XML的形式.找了好久,最终还是通过官方的文档找到了解决方法:http://www.mybatis.org/spri ...