创建maven web项目 pom报错:Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war
来源:互联网 发布:软件销售企业财务处理 编辑:程序博客网 时间:2024/06/05 21:03
一、新建一个maven项目:
1、pom报错:
2、报错:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project withmaven3: 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
3、分析:没有web.xml文件。
在网上找了个方法,终于解决了:
http://blog.csdn.net/stemq/article/details/52922790
下面的是复制过来的:
问题现象:
用Maven打包时,报Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war错误。
原因分析:
打包时在WebContent/WEB-INF/文件夹下找不到web.xml文件。
解决方案:
如果WebContent/WEB-INF/web.xml文件存在,需要在pom.xml文件的<build>节点中,加上maven-war-plugin插件配置。
如果WebContent/WEB-INF/web.xml文件不存在,则按下面的方式配置。
4、最后:1、右键项目,然后run as -》maven clear -》maven builder 或者直接:
maven -》 update project 选中
然后就ok了。
- 创建maven web项目 pom报错:Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war
- 【maven install报错】Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war
- maven install Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war
- [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.6:war
- Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project Th
- [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on pr
- Maven打包时报Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war解决方案
- Maven打包时报Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war解决方案
- maven项目test报错Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin
- Failed to execute goal org.apache.maven.plugins:maven-war-plugin 解决办法
- maven install Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-wa
- maven install Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-wa
- maven install Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-wa
- maven install Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-wa
- maven install Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-wa
- maven install Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-wa
- maven install Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-wa
- maven install Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-wa
- [uboot] uboot启动kernel篇(三)——uboot解析uImage的kernel信息
- vue使用图表类2 柱形图表
- 一道凑数问题
- Spring是如何加载Xml文件的
- Conllection之LinkedList源码简析
- 创建maven web项目 pom报错:Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war
- BZOJ2588 主席树
- C语言实验——余弦
- 11月24号 Gson
- Java浮点数float,bigdecimal和double精确计算的精度误差问题总结
- laravel5 列出所有事件 和事件实例
- jodd-html学习
- 女娲刺秦/易水副本脚本
- 重装系统win10