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 ...

Source: Internet
Author: User

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 ...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.