Package com.isomorphic.maven.packaging
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 Summary
Constructors Constructor Description Downloads(HttpRequestManager worker)Constructor taking the request manager used to communicate with smartclient.com. -
Method Summary
Modifier and Type Method Description List<Distribution>fetch(Product product, String buildNumber, String buildDate, License... licenses)Retrieves aDistributioninstance for each of the given licenses, downloads files if necessary, andlinksthe local file to the distribution.StringfindCurrentBuild(Distribution distribution, String buildNumber)voidsetOverwriteExistingFiles(Boolean overwriteExistingFiles)If true, downloads files whether they already exist locally or not.voidsetToFolder(File toFolder)Sets the directory to which the distribution/s should be downloaded.
-
Constructor Details
-
Downloads
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
Sets the directory to which the distribution/s should be downloaded. Defaults to the system propertyjava.io.tmpdir.- Parameters:
toFolder- The directory to which the distribution/s should be downloaded.
-
setOverwriteExistingFiles
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.MojoExecutionExceptionRetrieves aDistributioninstance for each of the given licenses, downloads files if necessary, andlinksthe local file to the distribution.Refer to http://www.smartclient.com/builds/
- Parameters:
product- The product built and distributed by Isomorphic Software. e.g., SmartCLientbuildNumber- The build number of the desired distribution. e.g., 4.1dbuildDate- The date on which the distribution was made availablelicenses- 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
-