本文整理了Java中hudson.model.Hudson.getJnlpJars()
方法的一些代码示例,展示了Hudson.getJnlpJars()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hudson.getJnlpJars()
方法的具体详情如下:
包路径:hudson.model.Hudson
类名称:Hudson
方法名:getJnlpJars
[英]Serves jar files for JNLP slave agents.
[中]为JNLP从属代理提供jar文件。
代码示例来源:origin: org.eclipse.hudson/hudson-test-framework
/**
* Creates a {@link CommandLauncher} for launching a slave locally.
*
* @param env Environment variables to add to the slave process. Can be
* null.
*/
public CommandLauncher createComputerLauncher(EnvVars env) throws URISyntaxException, MalformedURLException {
int sz = hudson.getNodes().size();
return new CommandLauncher(
String.format("\"%s/bin/java\" %s -jar \"%s\"",
System.getProperty("java.home"),
SLAVE_DEBUG_PORT > 0 ? " -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=" + (SLAVE_DEBUG_PORT + sz) : "",
new File(hudson.getJnlpJars("slave.jar").getURL().toURI()).getAbsolutePath()),
env);
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-test-harness
/**
* Creates a {@link CommandLauncher} for launching a slave locally.
*
* @param env
* Environment variables to add to the slave process. Can be null.
*/
public CommandLauncher createComputerLauncher(EnvVars env) throws URISyntaxException, MalformedURLException {
int sz = hudson.getNodes().size();
return new CommandLauncher(
String.format("\"%s/bin/java\" %s -jar \"%s\"",
System.getProperty("java.home"),
SLAVE_DEBUG_PORT>0 ? " -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address="+(SLAVE_DEBUG_PORT+sz): "",
new File(hudson.getJnlpJars("slave.jar").getURL().toURI()).getAbsolutePath()),
env);
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-test-framework
/**
* Creates a {@link CommandLauncher} for launching a slave locally.
*
* @param env
* Environment variables to add to the slave process. Can be null.
*/
public CommandLauncher createComputerLauncher(EnvVars env) throws URISyntaxException, MalformedURLException {
int sz = hudson.getNodes().size();
return new CommandLauncher(
String.format("\"%s/bin/java\" %s -jar \"%s\"",
System.getProperty("java.home"),
SLAVE_DEBUG_PORT>0 ? " -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address="+(SLAVE_DEBUG_PORT+sz): "",
new File(hudson.getJnlpJars("slave.jar").getURL().toURI()).getAbsolutePath()),
env);
}
代码示例来源:origin: hudson/hudson-2.x
private void copySlaveJar(PrintStream logger, SmbFile remoteRoot) throws IOException {
// copy slave.jar
logger.println("Copying slave.jar");
copyStreamAndClose(Hudson.getInstance().getJnlpJars("slave.jar").getURL().openStream(), new SmbFile(remoteRoot,"slave.jar").getOutputStream());
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
private void copySlaveJar(PrintStream logger, SmbFile remoteRoot) throws IOException {
// copy slave.jar
logger.println("Copying slave.jar");
copyStreamAndClose(Hudson.getInstance().getJnlpJars("slave.jar").getURL().openStream(), new SmbFile(remoteRoot,"slave.jar").getOutputStream());
}
代码示例来源:origin: org.jenkins-ci.plugins/ec2
slaveJar.write(Hudson.getInstance().getJnlpJars("slave.jar").readFully());
代码示例来源:origin: org.jenkins-ci.plugins/ec2
scp.put(Hudson.getInstance().getJnlpJars("slave.jar").readFully(),
"slave.jar",tmpDir);
内容来源于网络,如有侵权,请联系作者删除!