maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mirko Friedenhagen <mfriedenha...@gmail.com>
Subject Re: Maven deploy plugin: altDeploymentRepository: snapshots OK?
Date Wed, 21 Mar 2012 23:36:49 GMT
On Wed, Mar 21, 2012 at 19:18, Laird Nelson <ljnelson@gmail.com> wrote:
> On Wed, Mar 21, 2012 at 2:10 PM, Olivier Lamy <olamy@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-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message