mvn archetype:generate -DgroupId=com.test -DartifactId=test -DarchetypeArtifactId=maven-archetype-webapp
这种方法创建完后 pom.xml第一行可能会报错!可以在pom的<build>内加上
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.1</version>
</plugin>
</plugins>