1. 程式人生 > >maven 執行建立web專案命令時報錯

maven 執行建立web專案命令時報錯

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