在创建maven项目时出现BUILD FAILURE错误



我想通过执行这个命令创建一个项目:

mvn archetype:generate -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.1 -DgroupId=org.geoserver -DartifactId=hello -Dversion=1.0 -DinteractiveMode=false

,这个错误是:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.122s
[INFO] Finished at: Tue Mar 26 18:00:21 IRDT 2013
[INFO] Final Memory: 4M/75M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:UsersIman). Please verify you invoked Maven from the correct directory. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException`

我能做什么?

如果使用

命令
mvn archetype:generate -DarchetypeGroupId="Name of group ID" -DgroupId="group id here" -DartifactId="put artifact id here"

应该可以。我以前从未见过-DinteractiveMode命令,它通常会在设置中询问您的版本号。

最新更新