Create a multi-module Maven project with Eclipse

I want to create a multi-mode maven project. I want to create a Parent project using

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

But I got this error:

[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
+4
source share
1 answer

Did you read the error message?

[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]

The error message tells you that the target you specified for the plugin ( create) is not one of the available options. It also contains a list of options:

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

The goal you are looking for is generate. For instance:

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

For more information: maven-archetype-plugin.

+7
source

Source: https://habr.com/ru/post/1676180/


All Articles