记录用命令行将项目打包成war包
记录用命令行将项目打包成war包
找到项目的pom.xml
在当前路径下进入cmd
输入命令 mvn clean package
发现报错了
Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project MMS: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)
解决方法:在pom.xml中配置plugin
<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-war-plugin</artifactId><version>2.2</version><configuration><failOnMissingwebxml>false</failOnMissingwebxml></configuration>
</plugin>