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

报错信息如下:

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 repositories.

&

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

在网上百度这个问题和使用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 repositories.

添加一个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 repositories.

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

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

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

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

Eclipse会联网下载:

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

这样就可以正常的创建.

如果还是不能创建或者问题没有解决可以安装下面的方法:(引用自: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 repositories.

该文件中的内容:

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

上一篇:RMAN正确地删除Archivelog以及设置有备库的归档删除策略


下一篇:在真机调试 iOS 应用:理解 Certificates, Identifiers & Profiles