m2eclipse无法从中央仓库更新索引

lak*_*ffm 12 java eclipse configuration m2eclipse maven

我刚下载并安装了M2Eclipse,但无法更新中央仓库的索引.同时,Maven本身可以从repo下载工件(通过命令行).

我有settings.xml文件maven/conf,我把它复制到.m2/目录,但它没有帮助.

我有代理,但代理设置在settings.xml- 命令行命令工作正常,但在Eclipse中没有.在Eclipse中它给了我这个:

Unable to update index for central|http://repo1.maven.org/maven2
Run Code Online (Sandbox Code Playgroud)

更新:

这是我尝试创建一个新的Maven项目时得到的:

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)
Run Code Online (Sandbox Code Playgroud)

Alo*_*ard 7

请检查您的m2eclipse安装配置,您是否已将其指向正确的settings.xml文件?

在此输入图像描述


Rom*_*n C 7

只需将此镜像添加到settings.xml:

<mirror>
  <id>ibiblio.org</id>
  <url>http://mirrors.ibiblio.org/maven2</url>
  <mirrorOf>central</mirrorOf>
</mirror>
Run Code Online (Sandbox Code Playgroud)