Skip to content

Enable maven snapshot and staging versions

kengu edited this page Jan 11, 2013 · 1 revision

If you want enable snapshot versions, refer to the snapshot repository with this configuration in settings.xml (recommended) og pom.xml (not recommended):

    <repositories>
        <repository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype OSS Snapshot Repository</name>
            <url>http://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
              <enabled>false</enabled>
            </releases>
            <snapshots>
              <enabled>true</enabled>
            </snapshots>
        </repository> 
    </repositories>

If you want to enable staging and release versions also, use

    <repositories>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Sonatype OSS Staging Repository</name>
            <url>https://oss.sonatype.org/content/groups/staging</url>
            <releases>
              <enabled>true</enabled>
            </releases>
            <snapshots>
              <enabled>true</enabled>
            </snapshots>
        </repository> 
    </repositories>

Reference

Repository Configuration in settings.xml

Clone this wiki locally