使用Eclipse创建Maven多模块项目

Nunyet de CanCalçada

我想创建一个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

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章