Class Downloader

java.lang.Object
com.sap.cds.maven.plugin.util.Downloader

public class Downloader extends Object
Used to download the Node archive from a given download URL.
  • Constructor Details

    • Downloader

      public Downloader(CdsMojoLogger logger)
      Constructs a new Downloader instance.
      Parameters:
      logger - the required CdsMojoLogger instance.
      Throws:
      NullPointerException - if any of the required parameters is null.
    • Downloader

      public Downloader(List<org.apache.maven.settings.Proxy> proxies, org.apache.maven.settings.Server server, CdsMojoLogger logger)
      Constructs a new Downloader instance.
      Parameters:
      proxies - an optional list of proxies
      server - an optional Server providing credentials for basic authentication.
      logger - the required CdsMojoLogger instance.
      Throws:
      NullPointerException - if any of the required parameters is null.
  • Method Details

    • download

      public void download(String downloadUrl, File destination) throws IOException
      Performs a download from given URL.
      Parameters:
      downloadUrl - the URL to download from
      destination - the destination File
      Throws:
      IOException - if download failed
      NullPointerException - if any of the required parameters is null.