Maven Common Error Resolution method

Source: Internet
Author: User

1. The most important point, the use of domestic mirrors, such as oschina.net mirror;

2. Error:Could not resolve artifact Org.apache.maven.archetypes:maven-archetype-quickstart:pom:release

Eclipse builds the Maven-archetype-quickstart type of MAVEN project with the error above because there is no jar package for that type and cannot be downloaded.

Workaround:

1> from http://maven.oschina.net/content/groups/public/org/apache/maven/archetypes/maven-archetype-quickstart/

Download the latest version of Maven-archetype-quickstart-1.1.jar

2> to the download directory to perform the installation:

MVN install:install-file-dgroupid=org.apache.maven.archetypes-dartifactid=maven-archetype-quickstart-dversion= 1.1-dpackaging=jar-dfile=maven-archetype-quickstart-1.1.jar

D:\JAVA_LIBS>MVN install:install-file-dgroupid=org.apache.maven.archetypes-dartifactid= maven-archetype-quickstart-dversion=1.1-dpackaging=jar-Dfile=maven-archetype-quickstart-1.1. Jar[info] Scanning forprojects ... [INFO] [INFO]------------------------------------------------------------------------[INFO] Building Maven Stub Project (No POM)1[INFO]------------------------------------------------------------------------[Info][info]---maven-install-plugin:2.4: Install-file (default-CLI) @ Standalone-pom---[INFO] Installing D:\java_libs\maven-archetype-quickstart-1.1. Jar to D:\java_libs\repository\org\apache\maven\archetypes\maven-archetype-quickstart\1.1\maven-archetype-quickstart-1.1. Jar[info]------------------------------------------------------------------------[INFO] BUILD Success[info]------------------------------------------------------------------------[INFO] Total time:0.937S[info] finished at: -- A-09T14: to: $+ ,:xx[INFO] Final memory:5m/15m[info]------------------------------------------------------------------------

3. Error: a jar package always fails to download successfully

such as the Netty-all package, there is only one in the Reposity directory D:\java_libs\repository\io\netty\netty-all\4.0.33.Final . lastupdated suffix file .

This is because MAVEN will generate a. lastupdated suffix file when it cannot find a resource in the download repository. If this file exists, MAVEN will not download the new resource even if it is replaced by a resource repository.

We can delete it and then save the Pom.xml file and let him download it again. If not, you can manually download the Netty-all-4.0.33.final.jar package and put it in:

D:\java_libs\repository\io\netty\netty-all\4.0.33.Final\

When you save the Pom.xml file, you can:

Maven Common Error Resolution method

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.