jenkins.model.Jenkins.getJDKs()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(170)

本文整理了Java中jenkins.model.Jenkins.getJDKs()方法的一些代码示例,展示了Jenkins.getJDKs()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jenkins.getJDKs()方法的具体详情如下:
包路径:jenkins.model.Jenkins
类名称:Jenkins
方法名:getJDKs

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")));

相关文章

Jenkins类方法