Class Downloads

java.lang.Object
com.isomorphic.maven.packaging.Downloads

public class Downloads
extends Object
Connects to Isomorphic site, discovers which files exist for a given build, and downloads them to local file system.
  • Constructor Details

    • Downloads

      public Downloads​(HttpRequestManager worker)
      Constructor taking the request manager used to communicate with smartclient.com.
      Parameters:
      worker - the request manager used to communicate with smartclient.com.
  • Method Details

    • setToFolder

      public void setToFolder​(File toFolder)
      Sets the directory to which the distribution/s should be downloaded. Defaults to the system property java.io.tmpdir.
      Parameters:
      toFolder - The directory to which the distribution/s should be downloaded.
    • setOverwriteExistingFiles

      public void setOverwriteExistingFiles​(Boolean overwriteExistingFiles)
      If true, downloads files whether they already exist locally or not. Skips the download otherwise. Defaults to false.
      Parameters:
      overwriteExistingFiles - true if files should be overwritten, false otherwise.
    • fetch

      public List<Distribution> fetch​(Product product, String buildNumber, String buildDate, License... licenses) throws org.apache.maven.plugin.MojoExecutionException
      Retrieves a Distribution instance for each of the given licenses, downloads files if necessary, and links the local file to the distribution.

      Refer to http://www.smartclient.com/builds/

      Parameters:
      product - The product built and distributed by Isomorphic Software. e.g., SmartCLient
      buildNumber - The build number of the desired distribution. e.g., 4.1d
      buildDate - The date on which the distribution was made available
      licenses - The licenses, or editions, that the product is released under, and for which the user is registered
      Returns:
      A collection of Distributions, each having its contents resolved to local files, and suitable for use in repacking operations
      Throws:
      org.apache.maven.plugin.MojoExecutionException - on any error
    • findCurrentBuild

      public String findCurrentBuild​(Distribution distribution, String buildNumber) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException