Class AdoptOpenJDKInstaller

java.lang.Object
hudson.tools.ToolInstaller
io.jenkins.plugins.adoptopenjdk.AdoptOpenJDKInstaller
All Implemented Interfaces:
ExtensionPoint, Describable<ToolInstaller>

public class AdoptOpenJDKInstaller extends ToolInstaller
  • Field Details

    • id

      public final String id
      Eclipse Temurin release id
  • Constructor Details

    • AdoptOpenJDKInstaller

      @DataBoundConstructor public AdoptOpenJDKInstaller(String id)
  • Method Details

    • performInstallation

      public FilePath performInstallation(ToolInstallation tool, Node node, TaskListener log) throws IOException, InterruptedException
      Specified by:
      performInstallation in class ToolInstaller
      Throws:
      IOException
      InterruptedException
    • findPullUpDirectory

      protected FilePath findPullUpDirectory(FilePath root, AdoptOpenJDKInstaller.Platform platform) throws IOException, InterruptedException
      Often an archive contains an extra top-level directory that's unnecessary when extracted on the disk into the expected location. If your installation sources provide that kind of archives, override this method to find the real root location.

      The caller will "pull up" the discovered real root by throw away the intermediate directory, so that the user-configured "tool home" directory contains the right files.

      The default implementation applies some heuristics to auto-determine if the pull up is necessary. This should work for typical archive files.

      Parameters:
      root - The directory that contains the extracted archive. This directory contains nothing but the extracted archive. For example, if the user installed jakarta-ant-1.1.zip, this directory would contain a single directory "jakarta-ant".
      platform - The platform for which to find pull up directory for.
      Returns:
      Return the real top directory inside root that contains the meat. In the above example, root.child("jakarta-ant") should be returned. If there's no directory to pull up, return null.
      Throws:
      IOException - Signals that an I/O exception of some sort has occurred.
      InterruptedException - Thrown when a thread is interrupted.