[FIXED HUDSON-3767] doRun in RunnerImpl in both MavenBuild and MavenModuleSetBuild now use return from tearDown to set result, like hudson.model.Build does.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@18439 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
abayer committed 2009-05-26 19:37:03 +00:00
1 parent b105102aa0
commit 415c809fa8
2 files changed
+19 -7

No files matched your search

@@ -379,10 +379,15 @@ public final class MavenModuleSetBuild extends AbstractBuild<MavenModuleSet,Mave
}
} finally {
// tear down in reverse order
for( int i=buildEnvironments.size()-1; i>=0; i-- )
buildEnvironments.get(i)
.tearDown(MavenModuleSetBuild.this, listener);
buildEnvironments = null;
boolean failed=false;
for( int i=buildEnvironments.size()-1; i>=0; i-- ) {
if (!buildEnvironments.get(i).tearDown(MavenModuleSetBuild.this,listener)) {
failed=true;
}
}
buildEnvironments = null;
// WARNING The return in the finally clause will trump any return before
if (failed) return Result.FAILURE;
}
}