我尝试从命令行创建maven项目,我正在使用apache maven 3.3.3和jdk 7。
C:\ MVN \ CubeGenerator> mvn archetype:generate -DgroupId = com.mavapp -DartifactId = C ubeGenerator -DarchetypeArtifactId = maven-archetype-quickstart -DinteractiveMode = 假
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.169 s
[INFO] Finished at: 2015-08-07T00:13:23+05:30
[INFO] Final Memory: 4M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM
in this directory (C:\MVN\CubeGenerator). 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 swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProject
Exception
答案 0 :(得分:1)
对于两个属性,在“=”之后有一些额外的空格。 我想你想要:
mvn archetype:generate -DgroupId=com.mavapp -DartifactId=CubeGenerator -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false