提交 b237dbdb 编写于 作者: K kohsuke

fixed a bug where the native m2 support doesn't work on slaves.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2367 71c3de6d-444a-0410-be80-ed276b4c234a
上级 2fdb312b
......@@ -173,12 +173,18 @@ public class MavenBuild extends AbstractBuild<MavenModule,MavenBuild> {
}
}
private static final class getJavaExe implements Callable<String,IOException> {
private static final class GetJavaExe implements Callable<String,IOException> {
public String call() throws IOException {
return new File(new File(System.getProperty("java.home")),"bin/java").getPath();
}
}
private static final class GetRemotingJar implements Callable<String,IOException> {
public String call() throws IOException {
return Which.jarFile(Launcher.class).getPath();
}
}
private class RunnerImpl extends AbstractRunner {
protected Result doRun(BuildListener listener) throws Exception {
// pick up a list of reporters to run
......@@ -239,7 +245,7 @@ public class MavenBuild extends AbstractBuild<MavenModule,MavenBuild> {
slaveRoot = ((Slave)getCurrentNode()).getFilePath();
ArgumentListBuilder args = new ArgumentListBuilder();
args.add(launcher.getChannel().call(new getJavaExe()));
args.add(launcher.getChannel().call(new GetJavaExe()));
//args.add("-Xrunjdwp:transport=dt_socket,server=y,address=8002");
......@@ -253,8 +259,8 @@ public class MavenBuild extends AbstractBuild<MavenModule,MavenBuild> {
// M2_HOME
args.add(mvn.getMavenHome());
// remoting.jar
args.add(Which.jarFile(Launcher.class).getPath());
// remoting.jar // TODO: locate it on remote node
args.add(launcher.getChannel().call(new GetRemotingJar()));
// interceptor.jar
args.add(isMaster?
Which.jarFile(hudson.maven.agent.PluginManagerInterceptor.class).getAbsolutePath():
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册