I’m using Maven 3.0.3. How would I create a profile such that if I include the profile when deploying, deploying will only succeed if the version is a non-release (e.g. snapshot) version. Otherwise, specifying the profile when launching the deploy should fail.
Thanks for your help, – Dave
How about using an antrun or GMaven execution to check the ${project.version} and fail the build if it isn’t acceptable?
Edit: Clarification:
Antrun: Use the antrun plugin to check ${project.version} and call the fail task if it’s not a snapshot version. This will fail the maven build. Something like:
GMaven: There are specific instructions for failing a build from GMaven. I’m pretty sure you can access the property simply using
project.properties['version'].