Maven Release Plugin and Jazz SCM: Prepare

The Jazz scm command does not seem to play nice with maven-release-plugin.

When doing a mvn release:prepare, things are going fine, until, at the very end, Maven returns a build failure:

Error code for Jazz SCM deliver command - 53

After a quick internet search, it turned out that error code 53 "Indicates that a deliver succeeded, but there were no changes to deliver to the repository".

Well... ok...

Luckily, the Jazz scm command is nothing more than a shell script! So it was very easy to change that "error code that means success" into an actual 0 that Maven expects from successful executions:

if [ "$USE_NATIVE" = "1" ]; then
    "${PRGPATH}/fec" "$@"
    java -classpath "${PRGPATH}/plugins/${PRGPATH}/plugins/${PRGPATH}/plugins/${PRGPATH}/plugins/${PRGPATH}/plugins/org.eclipse.equinox.common_3.6.0.v20100503.jar:${PRGPATH}/plugins/${PRGPATH}/plugins/org.eclipse.osgi_3.6.50.R36x_v20120315-1500.jar:${PRGPATH}/plugins/" "$0" "$@"

required addition of just a couple of lines right below:


if [[ $RESULT -eq 53 || $RESULT -eq 52 ]]; then
  exit 0
  exit $RESULT

And that's it! The mvn release:prepare command completes successfully.

Unfortunately, running mvn release:perform yields yet another error, that I'll discuss some other day.