本文整理了Java中jenkins.model.Jenkins.getJDK()
方法的一些代码示例,展示了Jenkins.getJDK()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jenkins.getJDK()
方法的具体详情如下:
包路径:jenkins.model.Jenkins
类名称:Jenkins
方法名:getJDK
[英]Gets the JDK installation of the given name, or returns null.
[中]获取给定名称的JDK安装,或返回null。
代码示例来源:origin: jenkinsci/jenkins
/**
* Gets the JDK that this project is configured with, or null.
*/
public JDK getJDK() {
return Jenkins.getInstance().getJDK(jdk);
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Gets the JDK that this project is configured with, or null.
*/
public JDK getJDK() {
return Jenkins.getInstance().getJDK(jdk);
}
代码示例来源:origin: SonarSource/sonar-scanner-jenkins
/**
* Gets the JDK that this Sonar builder is configured with, or null.
*/
@CheckForNull
public JDK getJdkFromJenkins() {
return Jenkins.getInstance().getJDK(jdk);
}
代码示例来源:origin: SonarSource/sonar-scanner-jenkins
/**
* Gets the JDK that this Sonar publisher is configured with, or null.
*/
private JDK getJDK() {
return Jenkins.getInstance().getJDK(jdk);
}
代码示例来源:origin: jenkinsci/zap-plugin
public JDK getJDK() { return Jenkins.getInstance().getJDK(jdk); }
代码示例来源:origin: org.jenkins-ci.plugins/matrix-project
/**
* Gets the {@link JDK}s where the builds will be run.
* @return never null but can be empty
*/
public @Nonnull Set<JDK> getJDKs() {
final Jenkins jenkins = Jenkins.getInstance();
if (jenkins == null) {
return Collections.emptySet();
}
Axis a = axes.find("jdk");
if(a==null) return Collections.emptySet();
Set<JDK> r = new HashSet<JDK>();
for (String j : a) {
JDK jdk = jenkins.getJDK(j);
if(jdk!=null)
r.add(jdk);
}
return r;
}
代码示例来源:origin: org.jenkins-ci.plugins/matrix-project
@Override
public JDK getJDK() {
final Jenkins jenkins = Jenkins.getInstance();
return jenkins != null ? jenkins.getJDK(combination.get("jdk")) : null;
}
代码示例来源:origin: jenkinsci/pipeline-maven-plugin
/**
* Setup the selected JDK. If none is provided nothing is done.
*/
private void setupJDK() throws AbortException, IOException, InterruptedException {
String jdkInstallationName = step.getJdk();
if (StringUtils.isEmpty(jdkInstallationName)) {
console.println("[withMaven] using JDK installation provided by the build agent");
return;
}
if (withContainer) {
// see #detectWithContainer()
LOGGER.log(Level.FINE, "Ignoring JDK installation parameter: {0}", jdkInstallationName);
console.println("WARNING: \"withMaven(){...}\" step running within a container," +
" tool installations are not available see https://issues.jenkins-ci.org/browse/JENKINS-36159. " +
"You have specified a JDK installation \"" + jdkInstallationName + "\", which will be ignored.");
return;
}
console.println("[withMaven] using JDK installation " + jdkInstallationName);
JDK jdk = Jenkins.getInstance().getJDK(jdkInstallationName);
if (jdk == null) {
throw new AbortException("Could not find the JDK installation: " + jdkInstallationName + ". Make sure it is configured on the Global Tool Configuration page");
}
Node node = getComputer().getNode();
if (node == null) {
throw new AbortException("Could not obtain the Node for the computer: " + getComputer().getName());
}
jdk = jdk.forNode(node, listener).forEnvironment(env);
jdk.buildEnvVars(envOverride);
}
代码示例来源:origin: jenkinsci/fitnesse-plugin
JDK jdk = Jenkins.getActiveInstance().getJDK(builder.getFitnesseJdk(envVars));
if (jdk != null) {
Node node = Computer.currentComputer().getNode();
内容来源于网络,如有侵权,请联系作者删除!