Eclipse使用Maven创建普通Java工程时错误:Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repo

报错信息如下:

Eclipse使用Maven创建普通Java工程时错误:Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repo
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 (F:\Development\m2\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 (F:\Development\m2\repository)
Eclipse使用Maven创建普通Java工程时错误:Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repo

Eclipse使用Maven创建普通Java工程时错误:Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repo

&

Eclipse使用Maven创建普通Java工程时错误:Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repo

在网上百度这个问题和使用Maven创建Web项目时错误:Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:RELEASE from any of the configured repositories 解决方法一样:

解决方法:

在Eclipse Maven配置中添加新的Catalog配置:

Eclipse使用Maven创建普通Java工程时错误:Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repo

添加一个Remote Catalog :

图中的CatalogFile固定:http://repo1.maven.org/maven2/archetype-catalog.xml

Description:可以任意起名.

Eclipse使用Maven创建普通Java工程时错误:Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repo

添加完之后创建Maven项目的时候的Catalog中就会多了一项:

Eclipse使用Maven创建普通Java工程时错误:Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repo

 

 

接下来要创建web工程或者普通的Java工程的时候:在Catalog中选择刚刚建立的Catalog.

Eclipse使用Maven创建普通Java工程时错误:Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repo

Eclipse会联网下载:

Eclipse使用Maven创建普通Java工程时错误:Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repo

这样就可以正常的创建.

 

如果还是不能创建或者问题没有解决可以安装下面的方法:(引用自:http://blog.csdn.net/afgasdg/article/details/12757433/  具体我没有实践)

 

1.删除maven已经下载的文件路径:.m2\repository\org\apache\maven

 

删除之后再试下,这时候如果看到有进度,只需要耐心等待就行了

 

//===================================================================

这个http://repo1.maven.org/maven2/archetype-catalog.xml 对应的是一个文件:

Eclipse使用Maven创建普通Java工程时错误:Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repo

 该文件中的内容:  

Eclipse使用Maven创建普通Java工程时错误:Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repo


本文转自SummerChill博客园博客,原文链接:http://www.cnblogs.com/DreamDrive/p/5571913.html,如需转载请自行联系原作者

上一篇:阿里云学生优惠常见问题及解释汇总


下一篇:【短语学习】out of the box的含义和翻译