Maven error: "You don't have a SNAPSHOT project in the reactor projects list."

release:prepare command is supposed to prepare your snapshot project for the release. It sounds like you don't have such a snapshot project.

Here's the full details what it'll do: http://maven.apache.org/maven-release/maven-release-plugin/examples/prepare-release.html

If you're sure you should be releasing, you should be working on a maven module that has version ending with -SNAPSHOT.

Update: like noted by @khmarbaise in the comments, if your release has failed, you should do release:rollback to go back to previous state. Note though that it is not supported if you release through jenkins (jenkins issue), and it won't rollback the tags.


Don't needed manually edit pom.xml. You can use "mvn versions:set" for batch update, something like this:

mvn versions:set -DnewVersion=1.0.3-SNAPSHOT

I've had the same error with Jenkins. In a previous release, Jenkins updated the version of the POM to a non-snapshot version, but the build failed before Jenkins could set the version to a -SNAPSHOT version again. Afterwards, making a release resulted in the error described above.

Fixing this is easy: just manually change the version of your app in pom.xml to a -SNAPSHOT version.

Tags:

Java

Maven