eclipse 配置Maven问题解决办法:新建maven工程时报错:Could not resolve archetype org.apache.maven.archetypes

首先各maven.archetypes下载地址:

http://mirrors.ibiblio.org/maven2/org/apache/maven/archetypes/

 

在新建maven工程时报错:

Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repositories.
  Could not resolve artifact
    Missing org.apache.maven.archetypes:maven-archetype-quickstart:pom:RELEASE

解决思路:在本地库中装载maven-archetype-quickstart

1.从http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/maven/archetypes/maven-archetype-quickstart/
下载最新版maven-archetype-quickstart-1.1.jar

2.cmd窗口执行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

 

再创建maven工程,成功

 

再如:

F:\>mvn install:install-file -DgroupId=org.apache.maven.archetypes -DartifactId=maven-archetype-webapp -Dversion=1.0 -Dpackaging=jar -Dfile=maven-archetype-weba
pp-1.0.jar

 

 

转自:http://blog.csdn.net/kongqz/article/details/7756821

你可能感兴趣的:(Maven)