繁体   English   中英

使用Eclipse创建Maven多模块项目

[英]Creating Maven multi-module project with Eclipse

我想创建一个maven多模块项目。 我想使用创建父项目

mvn archetype:create -DgroupId=com.websystique.multimodule -DartifactId=parent-project

但我得到了这个错误:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.203 s
[INFO] Finished at: 2017-05-02T19:57:19+02:00
[INFO] Final Memory: 9M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Could not find goal 'create' in plugin org.apache.maven.plugins:maven-archetype-plugin:3.0.1 among available goals crawl, create-from-project, generate, help, integration-test, jar, update-local-catalog -> [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/MojoNotFoundException

你读过错误信息了吗?

[ERROR] Could not find goal 'create' in plugin org.apache.maven.plugins:maven-archetype-plugin:3.0.1 among available goals crawl, create-from-project, generate, help, integration-test, jar, update-local-catalog -> [Help 1]

该错误消息告诉您,您为插件( create )指定的目标不是可用选项之一。 它还列出了有效的选项:

  • crawl
  • create-from-project
  • generate
  • help
  • integration-test
  • jar
  • update-local-catalog

您正在寻找的目标是generate 例如:

mvn archetype:generate -DgroupId=com.websystique.multimodule -DartifactId=parent-project

有关更多信息: maven-archetype-plugin

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM