We need to deploy same artifact into two (or more) nexus repositories.
For this purpose we are using two separate profiles with different distributionManagement
sections like this:
<profile>
<id>deploy-nexus1</id>
<distributionManagement>
<repository>
<id>releases1</id>
<url>http://repositories/releases1</url>
</repository>
<snapshotRepository>
<id>snapshots1</id>
<url>http://repositories/snapshots1</url>
</snapshotRepository>
</distributionManagement>
</profile>
<profile>
<id>deploy-nexus2</id>
<distributionManagement>
<repository>
<id>releases2</id>
<url>http://repositories/releases2</url>
</repository>
<snapshotRepository>
<id>snapshots2</id>
<url>http://repositories/snapshots2</url>
</snapshotRepository>
</distributionManagement>
</profile>
Desired result: to have same artifact:1.0.0
in releases1
and releases2
.
But after running command:
mvn clean release:prepare -U
mvn clean release:perform -U -P deploy-nexus1
mvn clean release:perform -U -P deploy-nexus2
Deploy to releases1
repository was successful, but deploy to releases2
returned:
No SCM URL was provide to perform the release from
According to plugin documentation, before every release:perform
we need to run release:prepare
or provide custom url to tag in repo.
How could we perform two nexus deployments of one artifact version?
Is it possible to add additional deploy step within release:perform
command?
Thanks in advance.