我尝试从命令行创建 Maven 项目,我使用 apache maven 3.3.3 和 jdk 7。
C:\MVN\CubeGenerator>mvn 原型(prototype):生成 -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
最佳答案
两个属性的“=”后面有一些额外的空格。 我想你想要:
mvn archetype:generate -DgroupId=com.mavapp -DartifactId=CubeGenerator -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
关于java - 在没有 IDE 的情况下创建 Maven 项目构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31863675/