maven 部署模塊報web.xml丟失異常

報錯信息: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:w ar (default-war) on project hibeauty-web: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1] 修改方法: 在主pom.xml中的<build><plugins>標籤下,添加這個plugin <plugin>             <groupId>org.apache.maven.plugins</groupId>             <artifactId>maven-war-plugin</artifactId>             <version>2.1.1</version>             <configuration>                 <failOnMissingWebXml>false</failOnMissingWebXml>             </configuration>         </plugin> 或者在每個不須要web.xml的pom中添加以上代碼,其中version能夠變,注意若是是war包則用maven-war-plugin,不然用maven-jar-plugin,主要看pom中<packaging>war</packaging>對應的是什麼
相關文章
相關標籤/搜索