对不起,在使用maven方面没有足够的经验,所以问:
我们有詹金斯和Nexus服务器。我们需要使用Eclipse的maven构建。如您所知,当我们需要从http://www.eclipse.org下载一些东西时,它会重定向到它的镜像之一:http://www.eclipse.org/downloads/download.php?format=xml
在Jenkins服务器上是防火墙,而这个镜像中只有一个是白色的。因此,我们只需要使用一个特定的镜像始终。
目前,它失败了,因为它重定向到未被白化的镜像(看它随机选择它):
[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中指定
<repository>
<id>eclipse-oxygen</id>
<layout>p2</layout>
<url>http://download.eclipse.org/releases/oxygen</url>
</repository>在settings.xml
<mirror>
<id>eclipse-oxygen-mirror</id>
<name>Eclipse stuff</name>
<url>url of p2 nexus repo</url>
<layout>p2</layout>
<mirrorOf>eclipse-oxygen</mirrorOf>
你能告诉我正确的方法吗?我应该以同样的方式识别所有的eclipse特性吗?(如氧气、露娜、朱诺、靛蓝等)喜欢:
<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回购,我需要使用哪种方法?上面的方法是正确的还是我需要使用其他的方法?
发布于 2018-07-25 18:41:10
您可以使用-Dtycho.disableP2Mirrors=true或通过settings.xml mirrors.3F禁用镜像。
https://stackoverflow.com/questions/51525405
复制相似问题