本文整理了Java中hudson.Launcher.isUnix()
方法的一些代码示例,展示了Launcher.isUnix()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Launcher.isUnix()
方法的具体详情如下:
包路径:hudson.Launcher
类名称:Launcher
方法名:isUnix
[英]Returns true if this Launcher is going to launch on Unix.
[中]如果此启动器将在Unix上启动,则返回true。
代码示例来源:origin: jenkinsci/jenkins
@Override
public boolean isUnix() {
return outer.isUnix();
}
代码示例来源:origin: jenkinsci/jenkins
@Override
public boolean isUnix() {
return outer.isUnix();
}
代码示例来源:origin: jenkinsci/jenkins
@Override
public boolean isUnix() {
return inner.isUnix();
}
代码示例来源:origin: jenkinsci/jenkins
if (!launcher.isUnix()) {
args = args.toWindowsCommand();
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
@Override
public boolean isUnix() {
return inner.isUnix();
}
代码示例来源:origin: org.jenkins-ci.plugins/ssh-agent
/**
* {@inheritDoc}
*/
@Override
public boolean isSupported(Launcher launcher, final TaskListener listener) {
return launcher.isUnix();
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
@Override
public boolean isUnix() {
return outer.isUnix();
}
代码示例来源:origin: jenkinsci/artifactory-plugin
private String getFileSeparator(Launcher launcher) {
String fileSeparator = "/";
if (!launcher.isUnix()) {
fileSeparator = "\\";
}
return fileSeparator;
}
代码示例来源:origin: jenkinsci/artifactory-plugin
private String getJavaPathBuilder(String jdkBinPath, Launcher launcher) {
StringBuilder javaPathBuilder = new StringBuilder();
if (StringUtils.isNotBlank(jdkBinPath)) {
javaPathBuilder.append(jdkBinPath).append("/");
}
javaPathBuilder.append("java");
if (!launcher.isUnix()) {
javaPathBuilder.append(".exe");
}
return javaPathBuilder.toString();
}
代码示例来源:origin: jenkinsci/android-emulator-plugin
/**
* Generates a ready-to-use ArgumentListBuilder for one of the Android SDK tools, based on the current context.
*
* @param sdkCmd The Android tool and any extra arguments for the command to run.
* @return Arguments including the full path to the SDK and any extra Windows stuff required.
*/
public ArgumentListBuilder getToolCommand(final SdkCliCommand sdkCmd) {
return Utils.getToolCommand(sdk, launcher.isUnix(), sdkCmd);
}
代码示例来源:origin: jenkinsci/artifactory-plugin
private String getBuildFileFullPath() {
StringBuilder buildFile = new StringBuilder();
if (StringUtils.isNotEmpty(rootDir)) {
String pathsDelimiter = launcher.isUnix() ? "/" : "\\";
buildFile.append(rootDir);
if (!StringUtils.endsWith(rootDir, pathsDelimiter)) {
buildFile.append(pathsDelimiter);
}
}
buildFile.append(this.buildFile);
return buildFile.toString();
}
代码示例来源:origin: org.jvnet.hudson.plugins/clearcase
private String fixLoadRule(String loadRule) {
if (StringUtils.isBlank(loadRule)) {
return loadRule;
}
// Remove leading file separator, we don't need it when using add_loadrules
String quotedLR = ConfigSpec.cleanLoadRule(loadRule, getLauncher().getLauncher().isUnix());
if (quotedLR.startsWith("\"") && quotedLR.endsWith("\"")) {
return "\"" + quotedLR.substring(2);
} else {
return quotedLR.substring(1);
}
}
代码示例来源:origin: jenkinsci/android-emulator-plugin
/**
* Generates a ready-to-use ProcStarter for one of the Android SDK tools, based on the current context.
*
* @param sdkCmd The Android tool and any extra arguments for the command to run.
* @return A ready ProcStarter
* @throws IOException
* @throws InterruptedException
*/
public ProcStarter getToolProcStarter(final SdkCliCommand sdkCmd)
throws IOException, InterruptedException {
return getProcStarter(Utils.getToolCommand(sdk, launcher.isUnix(), sdkCmd));
}
代码示例来源:origin: jenkinsci/postbuildscript-plugin
private CommandInterpreter createInterpreter(String scriptContent) {
if (launcher.isUnix()) {
return new Shell(scriptContent);
}
return new BatchFile(scriptContent);
}
代码示例来源:origin: jenkinsci/maven-plugin
@Override
protected String getMavenAgentClassPath(MavenInstallation mvn, FilePath slaveRoot, BuildListener listener) throws IOException, InterruptedException {
String classWorldsJar = getLauncher().getChannel().call(new GetClassWorldsJar(mvn.getHome(),listener));
String path = classPathEntry(slaveRoot, Maven33Main.class, "maven33-agent", listener) +
(getLauncher().isUnix()?":":";")+classWorldsJar;
// TODO this configurable??
path += (getLauncher().isUnix()?":":";")+mvn.getHomeDir().getPath()+"/conf/logging";
return path;
}
代码示例来源:origin: jenkinsci/maven-plugin
@Override
protected String getMavenAgentClassPath(MavenInstallation mvn, FilePath slaveRoot, BuildListener listener) throws IOException, InterruptedException {
String classWorldsJar = getLauncher().getChannel().call(new Maven3ProcessFactory.GetClassWorldsJar(mvn.getHome(),listener));
String path = classPathEntry(slaveRoot, Maven32Main.class, "maven32-agent", listener) +
(getLauncher().isUnix()?":":";")+classWorldsJar;
// TODO this configurable??
path += (getLauncher().isUnix()?":":";")+mvn.getHomeDir().getPath()+"/conf/logging";
return path;
}
代码示例来源:origin: org.jvnet.hudson.plugins/clearcase
public String getCleartoolExe(Node node, TaskListener listener) throws IOException, InterruptedException {
ClearCaseInstallation installation = this;
installation = installation.forNode(node, listener);
if (StringUtils.isNotBlank(installation.getHome())) {
// If an installation is specified, use it
return PathUtil.convertPathForOS(installation.getHome() + "/" + CLEARTOOL_EXE, node.createLauncher(listener).decorateFor(node).isUnix());
} else {
// Otherwise, fallback to a default case where cleartool is in PATH
return CLEARTOOL_EXE_FALLBACK;
}
}
代码示例来源:origin: org.jvnet.hudson.plugins/clearcase
private void prepareView(String viewTag, String stream) throws IOException, InterruptedException {
String dynStorageDir = cleartool.getLauncher().getLauncher().isUnix() ? unixDynStorageDir : winDynStorageDir;
if (cleartool.doesViewExist(viewTag)) {
if (recreateView) {
cleartool.rmviewtag(viewTag);
cleartool.mkview(null, viewTag, stream, dynStorageDir);
}
} else {
cleartool.mkview(null, viewTag, stream, dynStorageDir);
}
}
代码示例来源:origin: jenkinsci/maven-plugin
@Override
protected String getMavenAgentClassPath(MavenInstallation mvn, FilePath slaveRoot, BuildListener listener) throws IOException, InterruptedException {
String classWorldsJar = getLauncher().getChannel().call(new GetClassWorldsJar(mvn.getHome(),listener));
return classPathEntry(slaveRoot, Maven3Main.class, "maven3-agent", listener) +
(getLauncher().isUnix()?":":";")+classWorldsJar;
}
代码示例来源:origin: org.jvnet.hudson.plugins/clearcase
@Override
protected CheckOutAction createCheckOutAction(VariableResolver<String> variableResolver, ClearToolLauncher launcher, AbstractBuild<?, ?> build) throws IOException, InterruptedException {
CheckOutAction action;
String effectiveConfigSpec = Util.replaceMacro(configSpec, variableResolver);
if (isUseDynamicView()) {
action = new DynamicCheckoutAction(createClearTool(variableResolver, launcher), effectiveConfigSpec, doNotUpdateConfigSpec, useTimeRule, isCreateDynView(),
getNormalizedWinDynStorageDir(variableResolver), getNormalizedUnixDynStorageDir(variableResolver), build);
} else {
action = new SnapshotCheckoutAction(createClearTool(variableResolver, launcher),new ConfigSpec(effectiveConfigSpec, launcher.getLauncher().isUnix()), getViewPaths(variableResolver, build, launcher.getLauncher()),isUseUpdate(), getViewPath(variableResolver));
}
return action;
}
内容来源于网络,如有侵权,请联系作者删除!