Skip to content
Sebastian J edited this page Jan 28, 2019 · 3 revisions

Regular releases are available via Maven Central and should not require any additional setup.

snapshot releases are available via the OSSRH snapshot repository.

Those snapshot releases are build straight from master whenever there is PR merged. Even though master should be considered 'working' and is good for testing upcoming releases by no means any production-readiness can be assumed.

Maven

via pom.xml

The quickest way is to add to the pom.xml Add to pom.xml

<repositories>
  <repository>
    <id>snapshots-repo</id>
    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    <releases><enabled>false</enabled></releases>
    <snapshots><enabled>true</enabled></snapshots>
  </repository>
</repositories>

via profiles

The recommended way is to add/extend a profile in ~/.m2/settings.xml

<profiles>
  <profile>
     <id>allow-snapshots</id>
        <activation><activeByDefault>true</activeByDefault></activation>
     <repositories>
       <repository>
         <id>snapshots-repo</id>
         <url>https://oss.sonatype.org/content/repositories/snapshots</url>
         <releases><enabled>false</enabled></releases>
         <snapshots><enabled>true</enabled></snapshots>
       </repository>
     </repositories>
   </profile>
</profiles>

So it can be activated/deactivated via Maven's (https://maven.apache.org/guides/introduction/introduction-to-profiles.html)[build profiles].

Gradle

maven {
  url 'https://oss.sonatype.org/content/repositories/snapshots'
}

Additional resources