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错误。
原因分析:
打包时在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>
转载于:https://www.cnblogs.com/nunuAction/p/6807476.html
Maven打包时报Failed to execute goal org.apache.maven.plugins:maven-war-plugin:解决方案相关推荐
- 使用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 ...
最新文章
- npm切换到淘宝镜像
- 试图更改利润中心,但物料库存仍然存在
- 保险运用计算机的工作干什么,关于计算机在保险业务中的应用研究
- 启明云端WT516P6Core离线语音模块发布后,开发者朋友提出的问题最多的是:是否可以自己编译指令
- Vue2.0 传值方式
- C#_TextBox_禁止粘贴
- [论文写作] vscode + latex
- spark共享变量(广播变量Broadcast Variable,累加器Accumulators)
- input file 上传图片判断图片的宽高尺寸
- centos挂载第二块硬盘
- Atitit 搜集热点,热门文章的整理 attilax 最近
- 破而后立,破除陈旧,认识自我,而后顶天立地!
- python图像色彩分析_使用OpenCV和Python计算图像的“色彩”
- debian7开机启动
- 火车进站(出栈顺序问题)
- logcat 实时输出日志到文件(logcat输出日志到文件、同时包括多个TAG)
- IoT 开发,我们需要学习哪些内容?
- Android ADB USB 驱动 万能配置方式
- [carla入门教程]-1 安装carla环境
- 转转二手交易网成为更多人选择的交易平台