Release a snapshot to nexus using maven 3.0.5
Usually, your nexus has separate repositories "snapshots" and "releases". SNAPSHOT versions are deployed to the former, non-SNAPSHOT versions to the latter. For deployment, these repositories have to be specified by you. You can do this by adding the distributionManagement section to your pom. There you can define specific targets for both targets.
<distributionManagement>
<repository>
<id>releases</id>
<name>releases</name>
<url>http://somerepo:8081/nexus/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>snapshots</name>
<url>http://somerepo:8081/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
If you are using Gradle it can be done in your repositories settings.
Just add the maven-snapshots url
For example:
repositories {
maven {
url = 'http://nexus.something.com/repository/maven-central/'
}
maven {
url = 'http://nexus.something.com/repository/maven-releases/'
}
maven {
url = 'http://nexus.something.com/repository/maven-snapshots/'
}
}