When you are learning maven, you want to create a new MAVEN project and execute the Create or generate command at the command line.
Error:
Failed to execute goal org.apache.maven.plugins:maven-archetye-plugin:2.4:generate ...
Workaround:
Http://doc.okbase.net/Josh_Persistence/archive/192456.html
Four possible causes and solutions are mentioned.
environment variable Configuration What the check is not mentioned.
(1) Reasons for JDK version
View maven's README.txt file to see Maven's requirements for JDK versions.
Test Result: It is possible to know that my JDK is matched.
(2) Reason for the command statement
Archetype:create command has expired, need to use archetype:generate to replace, because Maven in 3.0.5 and above the proposed Genrate command, recommend that you try to use genrate instead of Create command.
Tested, either generate or create failed.
(3) Reasons for Maven plugin
Maven-archetype-plugin 2.4 version of the plugin has a problem, for other versions to create, and then use the following instructions to try:
MVN org.apache.maven.plugins:maven-archetype-plugin:2.2:create-dgroupid=com.chuanliu.c11-dartifactid= C11searcher
Test result: or failed.
(4) Delete the Maven-archetype-plugin under repository/org/apache/maven/plugins/
Test Result: Success!
After the deletion, run the command just now, you will find that the folder will be downloadagain, and then the project will be created correctly.
2016.6.21 maven uses CMD to create a new project, failed to execute goal org.apache.maven.plugins:maven-archetye-plugin:2.4:generate ...