Gant doesn't seem to return any meaningful exit code. Regardless of whether the build succeeded or failed, or even if invalid target is given, the exit code is 0.
It's desirable for the exit code to indicate the status. This is currently blocking the Hudson Gant plugin
, as builds are always reported as successful.
I am fairly certain that there are cases where the wrong return code will be returned but the current test cases do not catch them.