Reputation: 23
In this case, there are two different Nexus remote repositories. The package should be pushed to both of the repositories while running mvn deploy. I try to add them under the "distributionManagement" label in the pom.xml as following
<distributionManagement>
<repository>
<id>rdc-releases-0</id>
<url>https://test-0.com/release</url>
</repository>
<repository>
<id>rdc-releases-1</id>
<url>https://test-1.com/release</url>
</repository>
</distributionManagement>
but there is an error shown with the second "repository" label. It seems that there should be only one repository label.
Is it anyway to distribute package to different Nexus remote repository while running mvn deploy? Many thanks in advance!
Upvotes: 1
Views: 128
Reputation: 35795
No, this is not possible.
But it is rarely necessary. Usually, you deploy just to one repository. The other repository then defines a proxy on the first, so that it is also able to download the artifacts.
Upvotes: 1