【maven 报错】maven项目执行maven install时报错Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)
在使用maven新建的web项目中,执行
执行如上的这两个操作,报错:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project bioligyInfo: Fatal error compiling: tools.jar not found: C:\Program Files\Java\jre1.8.0_73\..\lib\tools.jar -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project bioligyInfo: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
上面的两种错误,提示的很明显:
错误1:
其实不用从maven下载插件,只需要保证你的pom.xml文件中有如下的信息即可:
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<version>2.5</version>
</configuration>
</plugin>
</plugins>
</build> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.version>4.1.4.RELEASE</spring.version>
<hibernate.version>4.3.8.Final</hibernate.version>
<jackson.version>2.5.0</jackson.version> </properties>
错误2:
提示找不到web.xml文件
解决方法:
1》如果你没有配置web.xml文件,那就创建web.xml文件
2》如果你配置了web.xml文件,还有这样的错误,那就是你的web.xml文件不能被你项目读取到
如下,项目中web.xml的位置如下:
而我们需要让项目读取到它:
因为web.xml文件的路径如下:src\main\webapp\WEB-INF\web.xml
如果依旧无法解决,那就在pom.xml文件中配置如下:
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<version>2.5</version>
<webXml>src\main\webapp\WEB-INF\web.xml</webXml>
</configuration>
</plugin>
</plugins>
</build>
这样指定到具体的文件上 就可以解决这问题了。
【maven 报错】maven项目执行maven install时报错Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)的更多相关文章
- Maven打包项目失败;报错:Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-war) on project Hello: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/we
报错信息: E:\MIKEY\mikey\HTML5\TestMaven_01>mvn package [INFO] Scanning for projects... [INFO] [INFO] ...
- MAVEN项目打包报错:Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on pr ...
- SpringBoot发布WAR启动报错:Error assembling WAR: webxml attribute is required
Spring Boot发布war包流程: 1.修改web model的pom.xml <packaging>war</packaging> SpringBoot默认发布的都是j ...
- 008-SpringBoot发布WAR启动报错:Error assembling WAR: webxml attribute is required
一.Spring Boot发布war包流程: 1.修改web model的pom.xml <packaging>war</packaging> SpringBoot默认发布的都 ...
- php项目执行composer install时报错
报错信息: Loading composer repositories with package informationInstalling dependencies (including requi ...
- (转)Linux安装SwfTools-0.9.2安装事,在执行make install时报错
系统:CentOS6.5 安装SwfTools-0.9.2的时候,在执行make install时报错, rm -f /usr/local/share/swftools/swfs/default_vi ...
- vue项目在执行npm install时报错
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ETIMEDOU ...
- Xcode9,cocoaPod执行pod install时报错,一行命令即可解决。
- Maven打包web项目报错:webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update)
问题描述 使用Maven打包项目的时候,出现错误: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing ...
随机推荐
- ACM/ICPC 之 树形DP(POJ1192)
将某点看做根状态,邻接点看做子状态,由子状态向根状态转移. POJ1192-最优连通子集 题解:将每一个点分成两个状态进行保存,因此可以构造一个数组dp[i][2]. dp[i][0]:不包括该点权值 ...
- ACM/ICPC 之 判别MST唯一性-Kruskal解法(POJ1679)
判别MST是否唯一的例题. POJ1679-The Unique MST 题意:给定图,求MST(最小生成树)是否唯一,唯一输出路径长,否则输出Not Unique! 题解:MST是否唯一取决于是否有 ...
- ui router 介绍
1. 路由规则 rap框架页面路由基于ui-router实现 1.1 ui-router 一个基本的路由状态如下所示: 路由配置: $stateProvider .state('po',{ url:' ...
- FFmpeg-20160415-snapshot-bin
ESC 退出 0 进度条开关 1 屏幕原始大小 2 屏幕1/2大小 3 屏幕1/3大小 4 屏幕1/4大小 S 下一帧 [ -2秒 ] +2秒 ; -1秒 ' +1秒 下一个帧 -> -5秒 F ...
- codeforces 515B. Drazil and His Happy Friends 解题报告
题目链接:http://codeforces.com/problemset/problem/515/B 题目意思:有 n 个 boy 和 m 个 girl,有 b 个 boy 和 g 个 girl ( ...
- poj 2051.Argus 解题报告
题目链接:http://poj.org/problem?id=2051 题目意思:题目有点难理解,所以结合这幅图来说吧---- 有一个叫Argus的系统,该系统支持一个 Register 命令,输入就 ...
- mybatis延迟加载
配置完成后可能会报错Cannot enable lazy loading because CGLIB is not available. Add CGLIB to your classpath 是由于 ...
- UbuntuLinux安装Mysql
1.安装Mysql5.7 方法:手动安装5.7 One: $ wget http://dev.mysql.com/get/mysql-apt-config_0.6.0-1_all.deb 下载 ...
- 网页(HTML)中的特殊字符
网页(HTML)中的特殊字符 (1)一般来说,在HTML中,一个特殊字符有两种表达方式,一种称作数字参考,一种称作实体参考. 所谓数字参考,就是用数字来表示文档中的特殊字符,通常由前缀“&#” ...
- 20145206邹京儒《Java程序设计》第8周学习总结
20145206 <Java程序设计>第8周学习总结 教材学习内容总结 第十四章 NIO与NIO2 14.1 认识NIO NIO使用频道(Channel)来衔接数据节点,在处理数据时,NI ...