hudson.model.JDK.getName()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(272)

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

JDK.getName介绍

暂无

代码示例

代码示例来源:origin: jenkinsci/jenkins

/**
 * Overwrites the JDK setting.
 */
public void setJDK(JDK jdk) throws IOException {
  this.jdk = jdk.getName();
  save();
}

代码示例来源: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 JDK forNode(Node node, TaskListener log) throws IOException, InterruptedException {
  return new JDK(getName(), translateFor(node, log));
}

代码示例来源:origin: jenkinsci/jenkins

public JDK forEnvironment(EnvVars environment) {
  return new JDK(getName(), environment.expand(getHome()));
}

代码示例来源:origin: jenkinsci/configuration-as-code-plugin

@Test
  @ConfiguredWithCode("JdkConfiguratorTest.yml")
  public void should_configure_maven_tools_and_global_config() {
    final Object descriptor = j.jenkins.getDescriptorOrDie(JDK.class);
    Assert.assertNotNull(descriptor);
    Assert.assertEquals(1, ((JDK.DescriptorImpl) descriptor).getInstallations().length);

    JDK jdk = ((JDK.DescriptorImpl) descriptor).getInstallations()[0];
    Assert.assertEquals("jdk8", jdk.getName());
    Assert.assertEquals("/jdk", jdk.getHome());

    InstallSourceProperty installSourceProperty = jdk.getProperties().get(InstallSourceProperty.class);
    Assert.assertEquals(1, installSourceProperty.installers.size());

    JDKInstaller installer = installSourceProperty.installers.get(JDKInstaller.class);
    Assert.assertEquals("jdk-8u181-oth-JPR", installer.id);
    Assert.assertTrue(installer.acceptLicense);
  }
}

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

/**
 * Overwrites the JDK setting.
 */
public void setJDK(JDK jdk) throws IOException {
  this.jdk = jdk.getName();
  save();
}

代码示例来源:origin: hudson/hudson-2.x

/**
 * Overwrites the JDK setting.
 */
public void setJDK(JDK jdk) throws IOException {
  setJDK(jdk.getName());
  save();
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

/**
 * Overwrites the JDK setting.
 */
public void setJDK(JDK jdk) throws IOException {
  setJDK(jdk.getName());
  save();
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

/**
 * Overwrites the JDK setting.
 */
public void setJDK(JDK jdk) throws IOException {
  setJDK(jdk.getName());
  save();
}

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

public JDK forNode(Node node, TaskListener log) throws IOException, InterruptedException {
  return new JDK(getName(), translateFor(node, log));
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

public JDK forNode(Node node, TaskListener log) throws IOException, InterruptedException {
  return new JDK(getName(), translateFor(node, log));
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

/**
 * Overwrites the JDK setting.
 */
public void setJDK(JDK jdk) throws IOException {
  setJDK(jdk.getName());
  save();
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

public JDK forNode(Node node, TaskListener log) throws IOException, InterruptedException {
  return new JDK(getName(), translateFor(node, log));
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

public JDK forNode(Node node, TaskListener log) throws IOException, InterruptedException {
  return new JDK(getName(), translateFor(node, log));
}

代码示例来源:origin: hudson/hudson-2.x

public JDK forEnvironment(EnvVars environment) {
  return new JDK(getName(), environment.expand(getHome()));
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

public JDK forEnvironment(EnvVars environment) {
  return new JDK(getName(), environment.expand(getHome()));
}

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

public JDK forEnvironment(EnvVars environment) {
  return new JDK(getName(), environment.expand(getHome()));
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

public JDK forEnvironment(EnvVars environment) {
  return new JDK(getName(), environment.expand(getHome()));
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

public JDK forEnvironment(EnvVars environment) {
  return new JDK(getName(), environment.expand(getHome()));
}

代码示例来源:origin: jenkinsci/pipeline-maven-plugin

@Restricted(NoExternalUse.class) // Only for UI calls
public ListBoxModel doFillJdkItems() {
  ListBoxModel r = new ListBoxModel();
  r.add("--- Use system default JDK ---",null);
  for (JDK installation : getJDKDescriptor().getInstallations()) {
    r.add(installation.getName());
  }
  return r;
}

相关文章