19.2 Using Snapshots
Micronaut milestone and stable releases are distributed to Maven Central.
The following snippet shows how to use Micronaut SNAPSHOT
versions with Gradle. The latest snapshot will always be the next patch version plus 1 with -SNAPSHOT
appended. For example if the latest release is “1.0.1”, the current snapshot would be “1.0.2-SNAPSHOT”.
ext {
micronautVersion = '2.4.0-SNAPSHOT'
}
repositories {
mavenCentral() (1)
maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots/" } (2)
}
1 | Micronaut releases are available on Maven Central |
2 | Micronaut snapshots are available on Sonatype OSS Snapshots |
In the case of Maven, edit pom.xml
:
<?xml version="1.0" encoding="UTF-8"?>
...
<parent>
<groupId>io.micronaut</groupId>
<artifactId>micronaut-parent</artifactId>
<version>2.4.0-SNAPSHOT</version>
</parent>
<properties>
<micronaut.version>2.4.0-SNAPSHOT</micronaut.version> (1)
...
</properties>
<repositories>
<repository>
<id>sonatype-snapshots</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url> (2)
</repository>
</repositories>
...
</project>
1 | Set the snapshot version. |
2 | Micronaut snapshots are available on Sonatype OSS Snapshots |
Previously snapshots were published to Bintray, however due to JFrog shutting the service down, snapshots are now being published to Sonatype. |