mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 05:22:22 +00:00
improve the error diagnostics when Maven terminates abruptly.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@21109 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
8d02146fbd
commit
dab996e26a
4 files changed
+24
-23
No files matched your search
@@ -46,7 +46,6 @@ import hudson.model.TaskListener;
|
||||
import hudson.model.Cause.UpstreamCause;
|
||||
import hudson.remoting.Channel;
|
||||
import hudson.remoting.VirtualChannel;
|
||||
import hudson.remoting.RequestAbortedException;
|
||||
import hudson.tasks.BuildWrapper;
|
||||
import hudson.tasks.Maven.MavenInstallation;
|
||||
import hudson.util.ArgumentListBuilder;
|
||||
@@ -474,18 +473,7 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
|
||||
try {
|
||||
mpa = new MavenProbeAction(project,process.channel);
|
||||
addAction(mpa);
|
||||
return process.channel.call(builder);
|
||||
} catch (RequestAbortedException e) {
|
||||
// this is normally triggered by the unexpected Maven JVM termination.
|
||||
// check if the process is still alive, after giving it a bit of time to die
|
||||
Thread.sleep(1000);
|
||||
if(process.proc.isAlive())
|
||||
throw e; // it's still alive. treat this as a bug in the code
|
||||
else {
|
||||
String msg = "Maven JVM terminated unexpectedly with exit code " + process.proc.join();
|
||||
LOGGER.log(Level.FINE,msg,e);
|
||||
throw new AbortException(msg);
|
||||
}
|
||||
return process.call(builder);
|
||||
} finally {
|
||||
builder.end(launcher);
|
||||
getActions().remove(mpa);
|
||||
|
||||
Reference in new issue
Block a user