如何手动更新Maven索引? [英] How can I update Maven Index manually?

查看:524
本文介绍了如何手动更新Maven索引?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个问题:


当我启动Eclipse (Indigo Service Release 1 with Maven Integration for Eclipse)从Maven存储库下载文件:

  repo1.maven.org/maven2/.index/nexus-maven-repository-index它达到约10-20%(这需要不好),然后显然它放弃了:.gz 



<

  02.05.12 08:47:36 MESZ:更新索引中心| http://repo1.maven.org / maven2 
02.05.12 09:09:25 MESZ:无法更新中心的索引| http://repo1.maven.org/maven2

现在我试图手动下载这个gz文件,因为我以为,下载在Eclipse中遇到任何超时。现在我有另外两个问题:


  1. 直接下载48,7 MB-gz文件取消了9,6 MB。我不知道为什么。

  2. 如果我能够下载gz文件,我不知道如何放入Eclipse / Maven或告诉Maven使用我的电脑上的文件,而不是存储库repo1.maven.org。

任何有用的想法或答案?

解决方案

尝试更改超时设置,如描述这里。我不知道哪个设置负责存储库索引更新,你必须尝试一下...

  -Dsun。 net.client.defaultReadTimeout = 60000 
-Dorg.eclipse.ecf.provider.filetransfer.retrieve.readTimeout = 60000

您应该考虑在启动时禁用索引更新(禁用:首选项 - > Maven - >启动时下载存储库索引更新),并仅更新在Maven Repositories视图中使用中央存储库中的上下文菜单手动。


I have this problem:

When I start Eclipse (Indigo Service Release 1 with Maven Integration for Eclipse) it's trying to download a file from Maven Repositories :

repo1.maven.org/maven2/.index/nexus-maven-repository-index.gz

It reaches about 10-20% (this takes loooong) and then apparently it gives up:

02.05.12 08:47:36 MESZ: Updating index central|http://repo1.maven.org/maven2
02.05.12 09:09:25 MESZ: Unable to update index for central|http://repo1.maven.org/maven2

Now I tried to download this gz-file manually because I thought, the download hits any timeout within Eclipse. Now I have another two problems:

  1. The direct download of the 48,7 MB-gz-file canceled after 9,6 MB. I have no clue why.
  2. If I'd be able to download the gz-file, I don't know how to "put it into" Eclipse/Maven or tell Maven to use the file on my PC and not the repository repo1.maven.org.

Any helpful ideas or answers?

解决方案

Try to change the timeout settings like described here. I do not know which setting is responsible for the repository index update, you have to try a bit...

-Dsun.net.client.defaultReadTimeout=60000
-Dorg.eclipse.ecf.provider.filetransfer.retrieve.readTimeout=60000

You should consider to disable the index update on startup (disable: Preferences -> Maven -> Download repository index updates on startup) and only update manually in the Maven Repositories View using the context menu on the central repository.

这篇关于如何手动更新Maven索引?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆