0

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

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:\Users\Iman). 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`

我能做些什么?

4

1 回答 1

0

如果你使用命令

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

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

于 2013-03-26T13:56:38.200 回答