I've been completely unable to get this work. It seems like altDeploymentRepository just doesn't pick up credentials for whatever reason.
I've instead taken this approach: In my organization-wide POM, I've
added a profile:
<!-- Allow deploying to an alternate repository -->
<profile>
<id>io7m-alternate-repository</id>
<activation>
<property>
<name>io7m.useAlternateRepository</name>
</property>
</activation>
<distributionManagement>
<repository>
<id>${io7m.repository.releases.id}</id>
<url>${io7m.repository.releases.url}</url>
</repository>
<snapshotRepository>
<id>${io7m.repository.snapshots.id}</id>
<url>${io7m.repository.snapshots.url}</url>
</snapshotRepository>
</distributionManagement>
</profile>
I then deploy with:
$ mvn \
-Dio7m.useAlternateRepository=true
\
-Dio7m.repository.releases.id=example-releases
\
-Dio7m.repository.releases.url=https://packages.example.com:8443/repository/example-releases/
\
-Dio7m.repository.snapshots.id=example-snapshots
\
-Dio7m.repository.snapshots.url=https://packages.example.com:8443/repository/example-snapshots/
\
clean deploy
I have a <servers> element in settings.xml that supplies credentials for
repositories with ids "example-releases" and "example-snapshots" and
the credentials are picked up correctly by the deploy plugin.
--
Mark Raynsford | http://www.io7m.com
pgpxFdu1Tdhlc.pgp
Description: OpenPGP digital signature
