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