日期:2014-05-19  浏览次数:20696 次

sts新建maven项目总是报错
报错信息:
Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repositories.
Could not resolve artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:RELEASE
Failed to resolve version for org.apache.maven.archetypes:maven-archetype-quickstart:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype-quickstart/maven-metadata.xml in local (D:\springsource\repository)
Failed to resolve version for org.apache.maven.archetypes:maven-archetype-quickstart:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype-quickstart/maven-metadata.xml in local (D:\springsource\repository)

是不是maven 的setting.xml配置的错误,求教如何配置,请指点,不胜感激!



------解决方案--------------------
我也是遇到相同的问题,《maven 实战》这本书上说是要在setting.xml文件上设置代理服务器信息。
我用的是校园网,不知道什么代理不代理……唉,搞了老长时间也没有弄好。
------解决方案--------------------
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

------解决方案--------------------
探讨

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

------解决方案--------------------
在jar包所在目录mvn?不行啊!
探讨

求高手点播