m2eclipse无法从中央repo更新索引 [英] m2eclipse cannot update index from central repo
问题描述
同时,Maven本身可以从repo(通过命令行)下载工件。
我有设置.xml
文件在 maven / conf
中,我将其复制到 .m2 /
目录,但没有帮助。
我有代理,但代理设置在 settings.xml
中给出 - 来自命令行的命令工作正常,但不在Eclipse中。在Eclipse中,它给出了这一点:
无法更新中心的索引| http://repo1.maven.org/maven2
更新:
这是我尝试创建一个新的Maven项目时所得到的:
无法解析原型org.apache.maven .archetypes:maven-archetype-quickstart:从任何已配置的存储库中释放。
无法解析工件
无法解析org.apache.maven.archetypes的版本:maven-archetype-quickstart:pom:RELEASE:找不到元数据org.apache.maven.archetypes:maven-archetype -quickstart / maven-metadata.xml在本地(C:\Documents和Settings\user\m2\repository)
无法解析org.apache.maven.archetypes的版本:maven-archetype- quickstart:pom:RELEASE:无法在本地(C:\Documents and Settings\user\m2\repository)中找到元数据org.apache.maven.archetypes:maven-archetype-quickstart / maven-metadata.xml
只需将此镜像添加到 settings.xml
:
< mirror>
< id> ibiblio.org< / id>
< url> http://mirrors.ibiblio.org/maven2< / url>
< mirrorOf> central< / mirrorOf>
< / mirror>
I have just downloaded and installed M2Eclipse, but it fails to update the index of the central repo. At the same time, Maven itself is able to download artifacts from the repo (via command line).
I had the settings.xml
file in maven/conf
, and I copied it to .m2/
directory, but it didn't help.
I have proxy, but proxy settings are given in settings.xml
- commands from command line work fine, but not in Eclipse. In Eclipse it gives me this:
Unable to update index for central|http://repo1.maven.org/maven2
UPDATE:
This is what I get when I try to create a new Maven Project:
Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repositories.
Could not resolve artifact
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 (C:\Documents and Settings\user\.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 (C:\Documents and Settings\user\.m2\repository)
Just add this mirror to the settings.xml
:
<mirror>
<id>ibiblio.org</id>
<url>http://mirrors.ibiblio.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
这篇关于m2eclipse无法从中央repo更新索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!