javascript
Spring Boot 2.3.0——以war方式打包失败[webxml attribute is required]解决方案
問題描述
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-cli) on project xihu: 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
Process finished with exit code 1
問題分析
org.apache.maven.plugins:maven-war-plugin:2.2:war插件版本太低
解決方案?
方法一:
在maven中添加插件
配置failOnMissingWebXml為false
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-war-plugin</artifactId><version>2.6</version><configuration><failOnMissingWebXml>false</failOnMissingWebXml></configuration></plugin>方法二:
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-war-plugin</artifactId><version>3.2.3</version> </plugin>?
參考文章?
http://www.520mwx.com/view/93151?
https://blog.csdn.net/vking_wang/article/details/8731824?
https://blog.csdn.net/airainzhe/article/details/78073126
https://blog.csdn.net/spring0832/article/details/105404729
與50位技術專家面對面20年技術見證,附贈技術全景圖總結
以上是生活随笔為你收集整理的Spring Boot 2.3.0——以war方式打包失败[webxml attribute is required]解决方案的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: JAVA——基于HttpClient的获
- 下一篇: SpringFox 3.0.0(包含sp