如何从命令提示符创建maven项目? [英] How to create maven project from command prompt ?

查看:98
本文介绍了如何从命令提示符创建maven项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在尝试按照下面提到的步骤通过命令提示创建一个maven项目 -





1)创建一个新文件夹作为TestMaven,

2)cd到TestMaven文件夹

3)执行命令 mvn archetype:generate \ -DarchetypeGroupId = org.apache.maven.archetypes \ -DgroupId = com.mycompany.app \ -DartifactId = my-app。



我收到以下构建失败日志 -



[INFO]扫描项目......

[INFO] ---- -------------------------------------------------- ------------------

[INFO]建立失败

[INFO] -------- -------------------------------------------------- --------------

[INFO]总时间:0.078s

[INFO]完成时间:Mon Aug 04 12:22 :45 IST 2014

[INFO]最终记忆:1M / 4M

[INFO] ------------------ -------------------------------------------------- ----

[错误]目标您指定需要执行项目,但此目录中没有POM(D:\ TestMaven)。请验证您是否从正确的目录中调用了Maven。 - > [帮助1]

[错误]

[错误]要查看错误的完整堆栈跟踪,请使用-e开关重新运行Maven。

[错误]使用-X开关重新运行Maven以启用完整的调试日志记录。

[ERROR]

[ERROR]有关错误的更多信息和可能的解决方案,请阅读以下文章:

[错误] [帮助1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException

D:\ TestMaven>



请帮忙,因为我无法弄清楚这个问题。



谢谢提前!!

Hi,

I'm trying to create a maven project via command prompt by following steps as mentioned below -


1) Created a new folder as TestMaven,
2) cd to TestMaven folder
3) Execute command "mvn archetype:generate \ -DarchetypeGroupId=org.apache.maven.archetypes \ -DgroupId=com.mycompany.app \ -DartifactId=my-app".

I am getting below Build Failure logs-

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.078s
[INFO] Finished at: Mon Aug 04 12:22:45 IST 2014
[INFO] Final Memory: 1M/4M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (D:\TestMaven). 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
D:\TestMaven>

Please help as im unable to figure out this issue.

Thanks in Advance!!

推荐答案

这篇关于如何从命令提示符创建maven项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆