java - 在没有 IDE 的情况下创建 Maven 项目构建失败

标签 java maven

我尝试从命令行创建 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/

相关文章:

java - 通过应用程序在 Android 设备中执行挂载命令

java - 各种网络相关技术之间的区别?

Maven 错误缓存在本地存储库错误中

java - 如何使用maven执行第三方jar

java - 在 Java 中将 JSON 响应转换为字符串?

java - 使用 jacob 和 excel 的简单程序

java - 如何将包目录结构添加到我的 jar 中

java - 尝试在maven的pom.xml中添加插件

maven - Maven 插件和依赖项有什么区别?

java - 打包时Maven NumberFormatException