MAVEN intsall的时候报Error assembling WAR: webxml attribute is required

异常信息:Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)
 
maven编译的时候找不到web.xml文件导致,maven默认搜索src\main\webapp\WEB-INF\web.xml,可能存在原因与默认目录结构不一致导致。
方法解决2种:
1把目录结构和maven默认的路径一致
2在pom添加插件,输入自己的路径:
<plugin> 
<groupId>org.apache.maven.plugins</groupId> 
<artifactId>maven-war-plugin</artifactId> 
<version>2.1.1</version> 
<configuration> 

<webXml>src\main\webapp\webapp\WEB-INF\web.xml</webXml> 

</configuration> 
</plugin>

 

posted @ 2018-09-01 16:25  稚语希听  阅读(686)  评论(0)    收藏  举报