On Wed, Mar 21, 2012 at 19:18, Laird Nelson <ljnel...@gmail.com> wrote: > On Wed, Mar 21, 2012 at 2:10 PM, Olivier Lamy <ol...@apache.org> wrote: > >> Use something like >> >> <distributionManagement> >> <snapshotRepository> >> <id>${distMgmtSnapshotsId}</id> >> <name>${distMgmtSnapshotsName}</name> >> <url>${distMgmtSnapshotsUrl}</url> >> </snapshotRepository> >> </distributionManagement> >> >> <properties> >> <distMgmtSnapshotsId>Snapshot Repository</distMgmtSnapshotsId> >> <distMgmtSnapshotsName>Snapshot Repository</distMgmtSnapshotsName> >> <distMgmtSnapshotsUrl>http://host:port >> /repository/snapshots/</distMgmtSnapshotsUrl> >> </properties> >> >> You have correct default values and you can override with -D ... >> >> > Oh, DUH, yes, that would do it. Thanks! > > For completeness, are you saying that if I tried to simply specify the > altDeploymentRepository with a SNAPSHOT deployment it would fail?
No, when your version is a SNAPSHOT *and* your provide the correct syntax this should work: Given you have something like this in your pom: <distributionManagement> <snapshotRepository> <id>sonatype-nexus-snapshots</id> <url>https://oss.sonatype.org/content/repositories/snapshots/</url> </snapshotRepository> <repository> <id>sonatype-nexus-staging</id> <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> </repository> </distributionManagement> I use: mvn -e clean install deploy -DaltDeploymentRepository=ui-snapshots::default::http://localhost:8081/artifactory/libs-snapshot-local/ to deploy SNAPSHOTs into a locally running artifactory instance. The id of your repository should be matched by the username/password entries in your $HOME/.m2/settings.xml. Regards Mirko Regards Mirko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org