Package com.isomorphic.maven.mojo
Class AbstractPackagerMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
com.isomorphic.maven.mojo.AbstractBaseMojo
com.isomorphic.maven.mojo.AbstractPackagerMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
DeployMojo,DownloadMojo,InstallMojo
public abstract class AbstractPackagerMojo extends AbstractBaseMojo
A base class meant to deal with prerequisites to install / deploy goals,
which are basically to resolve the files in a given distribution to a
collection of Maven artifacts suitable for installation or deployment to some
Maven repository.
The resulting artifacts are provided to this object's doExecute(Set)
method.
-
Field Summary
Fields Modifier and Type Field Description protected StringbuildDateThe date on which the Isomorphic build was made publicly available at http://www.smartclient.com/builds /, in yyyy-MM-dd format.protected StringbuildNumberThe Isomorphic version number of the specifiedproduct.protected BooleancopyToLatestFolderIf true, makes a copy of the given distribution in a 'latest' subdirectory.protected BooleanincludeAnalyticsIf true, the optional analytics module (bundled and distributed separately) has been licensed and should be downloaded with the distribution specified bylicense.protected BooleanincludeMessagingIf true, the optional messaging module (bundled and distributed separately) has been licensed and should be downloaded with the distribution specified bylicense.protected LicenselicenseTypically one of: LGPL, EVAL, PRO, POWER, ENTERPRISE.protected BooleanoverwriteIf true, any file previously downloaded / unpacked will be overwritten with this execution.protected ProductproductOne of SMARTGWT, SMARTCLIENT, or SMARTGWT_MOBILE.protected StringserverIdThe id of a server configuration containing authentication credentials for the smartclient.com website, used to download licensed products.protected BooleanskipDownloadIf true, no attempt is made to download any remote distribution.protected BooleanskipExtractionIf true, no attempt it made to extract the contents of any distribution.protected BooleansnapshotsIf true, artifacts should be versioned with the 'SNAPSHOT' qualifier, in the case of development builds only.protected FileworkdirThe path to some directory that is to be used for storing downloaded files, working copies, and so on.Fields inherited from class com.isomorphic.maven.mojo.AbstractBaseMojo
artifactResolver, modelBuilder, project, remoteRepositoryManager, repositorySystem, repositorySystemSession, settings -
Constructor Summary
Constructors Constructor Description AbstractPackagerMojo() -
Method Summary
Modifier and Type Method Description abstract voiddoExecute(Set<Module> artifacts)The point where a subclass is able to manipulate the collection of artifacts prepared for it by this object'sexecute()method.voidexecute()Provides some initialization and validation steps around the collection and transformation of an Isomorphic SDK.Methods inherited from class com.isomorphic.maven.mojo.AbstractBaseMojo
getAuthentication, getCredentials
-
Field Details
-
includeAnalytics
If true, the optional analytics module (bundled and distributed separately) has been licensed and should be downloaded with the distribution specified bylicense.- Since:
- 1.0.0
-
buildDate
The date on which the Isomorphic build was made publicly available at http://www.smartclient.com/builds /, in yyyy-MM-dd format. e.g., 2013-25-12. Used to determine both remote and local file locations.
Note that if no value is provided, an attempt is made to discover the date of the latest distribution currently published to the Isomorphic build server.
Default value is:The date of the most recent distribution.- Since:
- 1.0.0
-
buildNumber
The Isomorphic version number of the specifiedproduct. e.g., 9.1d, 4.0p. Used to determine both remote and local file locations.- Since:
- 1.0.0
-
license
Typically one of: LGPL, EVAL, PRO, POWER, ENTERPRISE. Although it is also valid to specify optional modules ANALYTICS_MODULE or MESSAGING_MODULE, generally prefer theincludeAnalytics/includeMessagingproperties, respectively, to cause the optional modules to be included with the base installation / deployment.- Since:
- 1.0.0
-
includeMessaging
If true, the optional messaging module (bundled and distributed separately) has been licensed and should be downloaded with the distribution specified bylicense.- Since:
- 1.0.0
-
overwrite
If true, any file previously downloaded / unpacked will be overwritten with this execution. Useful in the case of an interrupted download. Note that this setting has no effect on unzip operations.- Since:
- 1.0.0
-
copyToLatestFolder
@Parameter(property="copyToLatestFolder", defaultValue="false") protected Boolean copyToLatestFolderIf true, makes a copy of the given distribution in a 'latest' subdirectory. Can be useful for bookmarking documentation, etc. but adds additional install time and storage requirements.- Since:
- 1.4.0
-
skipDownload
If true, no attempt is made to download any remote distribution. Files will be loaded instead from a path constructed of the following parts (e.g., C:/downloads/SmartGWT/PowerEdition/4.1d/2013-12-25/zip):- Since:
- 1.0.0
-
skipExtraction
If true, no attempt it made to extract the contents of any distribution. Only useful in the case where some manual intervention is required between download and another step. For example, it would be possible to first run the download goal, manipulate the version number of some dependency in some POM, and then run the install goal with skipExtraction=false to prevent the modified POM from being overwritten.This is the kind of thing that should generally be avoided, however.
-
product
One of SMARTGWT, SMARTCLIENT, or SMARTGWT_MOBILE.- Since:
- 1.0.0
-
snapshots
If true, artifacts should be versioned with the 'SNAPSHOT' qualifier, in the case of development builds only. The setting has no effect on patch builds.If false, each artifact's POM file is modified to remove the unwanted qualifier. This can be useful if you need to deploy a development build to a production environment.
- Since:
- 1.0.0
-
workdir
@Parameter(property="workdir", defaultValue="${java.io.tmpdir}/${project.artifactId}") protected File workdirThe path to some directory that is to be used for storing downloaded files, working copies, and so on.- Since:
- 1.0.0
-
serverId
The id of a server configuration containing authentication credentials for the smartclient.com website, used to download licensed products.Not strictly necessary for unprotected (LGPL) distributions.
- Since:
- 1.0.0
-
-
Constructor Details
-
AbstractPackagerMojo
public AbstractPackagerMojo()
-
-
Method Details
-
doExecute
public abstract void doExecute(Set<Module> artifacts) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureExceptionThe point where a subclass is able to manipulate the collection of artifacts prepared for it by this object'sexecute()method.- Parameters:
artifacts- A collection of Maven artifacts resulting from the download and preparation of a supported Isomorphic SDK.- Throws:
org.apache.maven.plugin.MojoExecutionException- When any fatal error occurs. e.g., there is no distribution to work with.org.apache.maven.plugin.MojoFailureException- When any non-fatal error occurs. e.g., documentation cannot be copied to some other folder.
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureExceptionProvides some initialization and validation steps around the collection and transformation of an Isomorphic SDK.- Specified by:
executein interfaceorg.apache.maven.plugin.Mojo- Specified by:
executein classAbstractBaseMojo- Throws:
org.apache.maven.plugin.MojoExecutionException- When any fatal error occurs.org.apache.maven.plugin.MojoFailureException- When any non-fatal error occurs.
-