本文整理了Java中jenkins.model.Jenkins.getJDKs()
方法的一些代码示例,展示了Jenkins.getJDKs()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jenkins.getJDKs()
方法的具体详情如下:
包路径:jenkins.model.Jenkins
类名称:Jenkins
方法名:getJDKs
暂无
代码示例来源:origin: jenkinsci/jenkins
/**
* Gets the JDK installation of the given name, or returns null.
*/
public JDK getJDK(String name) {
if(name==null) {
// if only one JDK is configured, "default JDK" should mean that JDK.
List<JDK> jdks = getJDKs();
if(jdks.size()==1) return jdks.get(0);
return null;
}
for (JDK j : getJDKs()) {
if(j.getName().equals(name))
return j;
}
return null;
}
代码示例来源:origin: jenkinsci/jenkins
public @Override JDK[] getInstallations() {
return Jenkins.getInstance().getJDKs().toArray(new JDK[0]);
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Gets the JDK installation of the given name, or returns null.
*/
public JDK getJDK(String name) {
if(name==null) {
// if only one JDK is configured, "default JDK" should mean that JDK.
List<JDK> jdks = getJDKs();
if(jdks.size()==1) return jdks.get(0);
return null;
}
for (JDK j : getJDKs()) {
if(j.getName().equals(name))
return j;
}
return null;
}
代码示例来源:origin: org.jenkins-ci.plugins/matrix-project
/**
* If there's no JDK configured, there's no point in this axis.
* @throws IllegalStateException {@link Jenkins} instance is not ready
*/
@Override
public boolean isInstantiable() {
final Jenkins jenkins = Jenkins.getActiveInstance();
return !jenkins.getJDKs().isEmpty();
}
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
public @Override JDK[] getInstallations() {
return Jenkins.getInstance().getJDKs().toArray(new JDK[0]);
}
代码示例来源:origin: jenkinsci/jenkinsfile-runner
jenkins.getJDKs().add(new JDK("default",System.getProperty("java.home")));
代码示例来源:origin: io.jenkins.jenkinsfile-runner/setup
jenkins.getJDKs().add(new JDK("default",System.getProperty("java.home")));
代码示例来源:origin: jenkinsci/jenkins-test-harness
jenkins.getJDKs().add(new JDK("default",System.getProperty("java.home")));
代码示例来源:origin: jenkinsci/jenkins-test-harness
jenkins.getJDKs().add(new JDK("default",System.getProperty("java.home")));
内容来源于网络,如有侵权,请联系作者删除!