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错误。
原因分析:
打包时在WebContent/WEB-INF/文件夹下找不到web.xml文件。
解决方案:
如果WebContent/WEB-INF/web.xml文件存在,需要在pom.xml文件的<build>节点中,加上maven-war-plugin插件配置。
<plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-war-plugin</artifactId><version>3.0.0</version><configuration><webResources><resource><directory>WebContent</directory></resource></webResources></configuration></plugin>
</plugins>
如果WebContent/WEB-INF/web.xml文件不存在,则按下面的方式配置。
<plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-war-plugin</artifactId><version>3.0.0</version><configuration><failOnMissingWebXml>false</failOnMissingWebXml></configuration></plugin>
</plugins>
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:解决方案
问题现象: 用Maven打包时,报Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war错误. 原因分析: 打 ...
- 使用idea进行Maven打包异常:Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war
使用idea进行Maven打包异常:Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war 参考文章: (1) ...
- springboot maven 打包失败 Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2
maven 打包失败 一.问题描述: idea打包springboot项目,控制台提示: Failed to execute goal org.apache.maven.plugins:maven-s ...
- maven bug之Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (defau
maven bug之Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (defau ...
- maven打包异常-Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.2.1.RELEAS
问题再现 在进行mvn打包的时候出现: Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.2.1.R ...
- 解决Failed to execute goal org.apache.maven.plugins
1.Maven构建失败 Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin: 2.3 . 2 :compile ...
- maven打包报错:Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test
mvn compile 没有问题,mvn package的时候报如下错误: Failed to execute goal org.apache.maven.plugins:maven-surefir ...
- maven打包报错Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.6.1:cle
问题记录: maven打包报错Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.6.1:cle 解决办法: 这个 ...
- 使用maven打war包时报[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war...
起因: maven项目中放置web.xml文件的资源文件夹写成了webapps 分析: maven的web项目默认是在src\main\webapp.如果在此目录下找不到web.xml就抛出该异常. ...
- maven打包报错 Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:3.0.2:jar
Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:3.0.2:jar (default-jar) on project ...
最新文章
- YARN集群维护部分问题汇总
- 关于添加“服务引用”和“添加引用”的一点总结
- python入门到精通需要学多久-入门到精通python要多久
- 输出 1-100 内的所有奇数
- shell学习三十四天----printf详解
- OpenSSL原理与实现
- Git的使用_思维导图
- keras笔记(4)-使用Keras训练大规模数据集
- 推特称攻击者利用其 API 匹配用户名和电话号码
- Swift - 动画效果的实现方法总结(附样例)
- java 设置系统参数_Java设置系统参数和运行参数
- Html label 标签详解
- 御剑飞行扫描后门加上burpsuite字典树爆破
- 传奇世界手游公益服【剑指轩辕2】服务端搭建源码使用指南
- 路由器和交换机的工作原理
- 用Vue.js开发企业管理后台,我做到了
- c++primerplus6notes
- 使用jsonp跨域调用百度js实现搜索框智能提示,并实现鼠标和键盘对弹出框里候选词的操作【附源码和在线测试地址】
- Android 根据心电图(ECG)数据绘制心电图
- 视频号添加任意小程序