Set the correct status of a maven build, in case that one module has test failures and other module don't compile.

[FIXED JENKINS-16522]
[FIXED JENKINS-17644]