IDEA打包maven打war包项目的时候提示:
Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)
在pom.xml中加入以下依赖,让maven打包项目的时候找idea默认的web目录下web.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<webResources>
<resource>
<!-- this is relative to the pom.xml directory -->
<directory>web</directory>
</resource>
</webResources>
</configuration>
</plugin>
解决IDEA中使用Maven打包WAR项目时遇到的web.xml缺失问题,通过在pom.xml中添加特定插件配置,指向IDEA默认的web目录下的web.xml文件。
3838

被折叠的 条评论
为什么被折叠?



