1、命令如下:
mvn archetype:generate -DgroupId=com.inspur.test -DartifactId=WebAppStydy -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false
2、错误信息如下:The goal you specified requires a project to execute but there is no POM in this directory (E:\code). Please verify you invoked Maven from the correct directory. -> [Help 1]
经过一顿查找,原来是得在-DgroupId=com.inspur.test -DartifactId=WebAppStydy -DarchetypeArtifactId=maven-archetype-webapp上加双引号
正确命令如下:mvn archetype:generate -DgroupId="com.yanyd" -DartifactId="CounterWebApp" -DarchetypeArtifactId=maven-arche
type-webapp -DinteractiveMode=false