提交 c210a6d2 编写于 作者: K kohsuke

[FIXED HUDSON-2886]

despite what the comment said, the hudsonUrl variable wasn't including the 'tcpSlaveAgentListener'.

This change will be in 1.277.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@14675 71c3de6d-444a-0410-be80-ed276b4c234a
上级 4d324980
......@@ -93,12 +93,12 @@ public class WindowsSlaveInstaller implements Callable<Void,RuntimeException>, A
// write out the descriptor
String xml = IOUtils.toString(getClass().getResourceAsStream("/windows-service/hudson-slave.xml"), "UTF-8");
xml = xml.replace("@JAVA@",System.getProperty("java.home")+"\\bin\\java.exe");
URL jnlp = new URL(engine.getHudsonUrl(),"../computer/"+engine.slaveName+"/slave-agent.jnlp");
URL jnlp = new URL(engine.getHudsonUrl(),"computer/"+engine.slaveName+"/slave-agent.jnlp");
xml = xml.replace("@URL@",jnlp.toExternalForm());
FileUtils.writeStringToFile(new File(dir, "hudson-slave.xml"),xml,"UTF-8");
// copy slave.jar
URL slaveJar = new URL(engine.getHudsonUrl(),"../jnlpJars/remoting.jar");
URL slaveJar = new URL(engine.getHudsonUrl(),"jnlpJars/remoting.jar");
File dstSlaveJar = new File(dir,"slave.jar").getCanonicalFile();
if(!dstSlaveJar.exists()) // perhaps slave.jar is already there?
FileUtils.copyURLToFile(slaveJar,dstSlaveJar);
......
......@@ -45,11 +45,11 @@ public class Engine extends Thread {
private List<URL> candidateUrls;
/**
* URL that points to Hudson's tcp slage agent listener, like <tt>http://myhost/hudson/tcpSlaveAgentListener/</tt>
* URL that points to Hudson's tcp slage agent listener, like <tt>http://myhost/hudson/</tt>
*
* <p>
* This value is determined from {@link #candidateUrls} after a successful connection.
* Note that this URL also has "tcpSlaveAgentListener" in it.
* Note that this URL <b>DOES NOT</b> have "tcpSlaveAgentListener" in it.
*/
private URL hudsonUrl;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册