首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Maven通过特定镜像下载Eclipse工件

Maven通过特定镜像下载Eclipse工件
EN

Stack Overflow用户
提问于 2018-07-25 18:21:34
回答 1查看 599关注 0票数 0

对不起,在使用maven方面没有足够的经验,所以问:

我们有詹金斯和Nexus服务器。我们需要使用Eclipse的maven构建。如您所知,当我们需要从http://www.eclipse.org下载一些东西时,它会重定向到它的镜像之一:http://www.eclipse.org/downloads/download.php?format=xml

在Jenkins服务器上是防火墙,而这个镜像中只有一个是白色的。因此,我们只需要使用一个特定的镜像始终。

目前,它失败了,因为它重定向到未被白化的镜像(看它随机选择它):

代码语言:javascript
复制
[DEBUG] Resolving target definition content...
[INFO] Fetching p2.index from http://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.13.0/
[INFO] Fetching p2.index from http://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.13.0/
[INFO] Adding repository http://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.13.0
[INFO] Fetching p2.index from http://download.eclipse.org/releases/oxygen/
[INFO] Fetching p2.index from http://download.eclipse.org/releases/oxygen/
[INFO] Adding repository http://download.eclipse.org/releases/oxygen
[INFO] Fetching p2.index from http://download.eclipse.org/technology/epp/packages/oxygen/
[INFO] Fetching p2.index from http://download.eclipse.org/technology/epp/packages/oxygen/
[INFO] Fetching p2.index from http://download.eclipse.org/releases/oxygen/201804111000/
[INFO] Fetching p2.index from http://download.eclipse.org/releases/oxygen/201804111000/
!ENTRY org.eclipse.equinox.p2.core 4 0 2018-07-25 17:28:40.029
!MESSAGE Provisioning exception
!STACK 1
org.eclipse.equinox.p2.core.ProvisionException: Artifact not found: http://download.eclipse.org/releases/oxygen/201804111000/content.xml.xz.
        at org.eclipse.equinox.internal.p2.repository.CacheManager.updateCache(CacheManager.java:428)

我们怎么能做到呢?

我正在考虑,在pom.xml中指定

代码语言:javascript
复制
<repository>
  <id>eclipse-oxygen</id>
  <layout>p2</layout>
  <url>http://download.eclipse.org/releases/oxygen</url>
</repository>

settings.xml

代码语言:javascript
复制
<mirror>
<id>eclipse-oxygen-mirror</id>
<name>Eclipse stuff</name>
<url>url of p2 nexus repo</url>
 <layout>p2</layout>
<mirrorOf>eclipse-oxygen</mirrorOf>

  • 配置了Nexus P2回购,其中指定了白名单镜像。

你能告诉我正确的方法吗?我应该以同样的方式识别所有的eclipse特性吗?(如氧气、露娜、朱诺、靛蓝等)喜欢:

代码语言:javascript
复制
<repository>
  <id>eclipse-oxygen</id>
  <layout>p2</layout>
  <url>http://download.eclipse.org/releases/luna</url>
</repository>

<repository>
  <id>eclipse-oxygen</id>
  <layout>p2</layout>
  <url>http://download.eclipse.org/releases/juno</url>
</repository>

等?

感谢克里斯蒂安的选项,禁用镜像,并直接从http://download.eclipse.org下载。

但是,如果我需要通过Nexus P2回购,我需要使用哪种方法?上面的方法是正确的还是我需要使用其他的方法?

EN

回答 1

Stack Overflow用户

发布于 2018-07-25 18:41:10

您可以使用-Dtycho.disableP2Mirrors=true或通过settings.xml mirrors.3F禁用镜像。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51525405

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档