0
所以我想在Jenkins中为Maven项目设置一个配置文件来使用多个存储库。整个想法是尝试从一个下载,如果找不到,然后从第二个下载。以下是我现在配置的和Jenkins日志的配置,我可以看到它从这两个存储库中“下载”。Jenkins配置文件Maven多个Nexus存储库下载
问题是,如果它在第一个中找不到,它实际上不会回退,它只是失败了,所以出现了问题。我必须补充一点,如果我专门使用它们中的任何一个,那么一切都可以正常工作,所以它不是一个连接问题。请大家帮忙我一直在这里待了一天半,我确信这是因为我无法将自己的想法包裹在Maven文档中。
[INFO] Downloading: https:NEW_NEXUS/artifact/1.15.0-SNAPSHOT/maven-metadata.xml
[INFO] Downloading: http:OLD_NEXUS/artifact/1.15.0-SNAPSHOT/maven-metadata.xml
[INFO]
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id>new-nexus</id>
<mirrorOf>*</mirrorOf>
<name>New Nexus Repository</name>
<url>NEW_NEXUS/nexus/repository/maven-public/</url>
</mirror>
<mirror>
<id>old-nexus</id>
<mirrorOf>old-nexus</mirrorOf>
<name>Old Nexus Repository</name>
<url>OLD_NEXUS/nexus/content/groups/public/</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>new-nexus</id>
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>old-nexus</id>
<name>Old Nexus Repository</name>
<url>OLD_NEXUS/nexus/content/groups/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>new-nexus</activeProfile>
</activeProfiles>
</settings>
感谢您的快速回答。所涉及的2个Nexus在一个意义上是2.0.6和另一个是3.3.1,它们也被托管在2个不同的企业环境中,并且它们不能相互交谈。至少在此刻。我不是一个真正的DEVOPS家伙,所以这就是我想这也 新的Nexus !老关系,为什么我学习,我沿着 –
nbaprophet
去,*,它仍然无法正常工作 – nbaprophet
贵詹金斯不知道两个Nexus中的哪一个可以到达,哪些不是? –