我是Maven的新手,在网上教程的帮助下自己学习。 我在cmd中执行 archetype:generate 命令时遇到错误。 这是我得到的错误:\
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.884 s
[INFO] Finished at: 2017-05-07T23:00:07+05:30
[INFO] Final Memory: 8M/65M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project standalone-pom: Execution default-cli of goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate failed: Unable to load the mojo 'generate' (or one of its required components) from the plugin 'org.apache.maven.plugins:maven-archetype-plugin:3.0.1': com.google.inject.ProvisionException: Unable to provision, see the following errors:
[ERROR]
[ERROR] 1) No implementation for org.apache.maven.archetype.ArchetypeManager was bound.
[ERROR] while locating org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo
[ERROR] at ClassRealm[plugin>org.apache.maven.plugins:maven-archetype-plugin:3.0.1, parent: sun.misc.Launcher$AppClassLoader@70dea4e] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
[ERROR] while locating org.apache.maven.plugin.Mojo annotated with @com.google.inject.name.Named(value=org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate)
[ERROR]
[ERROR] 1 error
[ERROR] role: org.apache.maven.plugin.Mojo
[ERROR] roleHint: org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate
[ERROR] -> [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/PluginContainerException
我已经搜索了很多解决方案,但我找不到合适的答案。我已经完成了以下步骤:1)下载并解压缩“apache-maven-3.5.0”。 2)配置了M2_HOME和PATH变量。