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 Details

    • includeAnalytics

      @Parameter(property="includeAnalytics", defaultValue="false") protected Boolean includeAnalytics
      If true, the optional analytics module (bundled and distributed separately) has been licensed and should be downloaded with the distribution specified by license.
      Since:
      1.0.0
    • buildDate

      @Parameter(property="buildDate") protected String 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

      @Parameter(property="buildNumber", required=true) protected String buildNumber
      The Isomorphic version number of the specified product. e.g., 9.1d, 4.0p. Used to determine both remote and local file locations.
      Since:
      1.0.0
    • license

      @Parameter(property="license", required=true) protected License 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 the includeAnalytics / includeMessaging properties, respectively, to cause the optional modules to be included with the base installation / deployment.
      Since:
      1.0.0
    • includeMessaging

      @Parameter(property="includeMessaging", defaultValue="false") protected Boolean includeMessaging
      If true, the optional messaging module (bundled and distributed separately) has been licensed and should be downloaded with the distribution specified by license.
      Since:
      1.0.0
    • overwrite

      @Parameter(property="overwrite", defaultValue="false") protected Boolean 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 copyToLatestFolder
      If 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

      @Parameter(property="skipDownload", defaultValue="false") protected Boolean 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

      @Parameter(property="skipExtraction", defaultValue="false") protected Boolean 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

      @Parameter(property="product", defaultValue="SMARTGWT") protected Product product
      One of SMARTGWT, SMARTCLIENT, or SMARTGWT_MOBILE.
      Since:
      1.0.0
    • snapshots

      @Parameter(property="snapshots", defaultValue="true") protected Boolean 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 workdir
      The path to some directory that is to be used for storing downloaded files, working copies, and so on.
      Since:
      1.0.0
    • serverId

      @Parameter(property="serverId", defaultValue="smartclient-developer") protected String 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

  • Method Details

    • doExecute

      public abstract void doExecute​(Set<Module> artifacts) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      The point where a subclass is able to manipulate the collection of artifacts prepared for it by this object's execute() 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.MojoFailureException
      Provides some initialization and validation steps around the collection and transformation of an Isomorphic SDK.
      Specified by:
      execute in interface org.apache.maven.plugin.Mojo
      Specified by:
      execute in class AbstractBaseMojo
      Throws:
      org.apache.maven.plugin.MojoExecutionException - When any fatal error occurs.
      org.apache.maven.plugin.MojoFailureException - When any non-fatal error occurs.