Søk i denne bloggen

søndag 11. september 2011

Uploading artifacts to nexus repository

1) Ensure that snapshot cleaning is turned on in nexus, purging old snapshots at certain intervals.
http://www.sonatype.com/people/2009/09/nexus-scheduled-tasks/

2) add
      <distributionManagement>
        <snapshotRepository>
            <id>nexus</id>
            <name>Nexus staging repo</name>
            <url>http://host:8081/nexus/content/repositories/snapshots/</url>
            <uniqueVersion>false</uniqueVersion>
        </snapshotRepository>
    </distributionManagement>


to your root aggregator pom. Note that snapshotRepository is not a release repository, hence new snapshots can be deployed with mvn deploy goal.


3) Add authentication of nexus host in the settings file.

            <server>
            <id>nexus</id>
            <username>deployment</username>
            <password>password</password>
        </server>

4) Run mvn deploy on the root aggregator. The artifacts are uploaded.

Ingen kommentarer:

Legg inn en kommentar