maven 執行建立web專案命令時報錯
阿新 • • 發佈:2018-11-23
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