Class PackageBusinessMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
net.agilhard.maven.plugins.jpacktool.base.mojo.AbstractToolMojo
net.agilhard.maven.plugins.jpacktool.mojo.PackageBusinessMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="jpacktool-pack-business",
      requiresDependencyResolution=RUNTIME,
      defaultPhase=PACKAGE,
      requiresProject=true)
public class PackageBusinessMojo
extends net.agilhard.maven.plugins.jpacktool.base.mojo.AbstractToolMojo
Package a Business Application started from a Bootstrap Application.
Author:
Bernd Eilers
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected java.util.List<java.lang.String> arguments
    Command line arguments for the business application to pass to the main class if no arguments are specified by the launcher.
    protected java.lang.String basePath
    The Update4j basePath Setting for the Business Application.
    protected java.lang.String baseUri
    The update4j baseUri
    protected java.lang.String finalName
    Name of the generated ZIP file in the target directory.
    protected boolean generateUpdate4jConfig
    Flag whether to generate an update4j config file.
    protected boolean jpacktoolPrepareUsed
    Flag if jpacktool-prepare goal has been used before
    protected java.lang.String mainClass
    The main class.
    protected java.lang.String stripConfigName
    replace this with nothing in the name of the config file

    Fields inherited from class net.agilhard.maven.plugins.jpacktool.base.mojo.AbstractToolMojo

    buildDirectory, classpathArtifacts, excludedArtifacts, javaVersion, jdkToolchain, jpacktoolModel, jpacktoolPropertyPrefix, locationManager, mavenProjectHelper, outputDirectoryAutomaticJars, outputDirectoryClasspathJars, outputDirectoryJPacktool, outputDirectoryModules, project, session, shouldSkipReason, skip, systemModules, templateMap, toolchainManager, verbose, zipArchiver

    Fields inherited from interface org.apache.maven.plugin.Mojo

    ROLE
  • Constructor Summary

    Constructors 
    Constructor Description
    PackageBusinessMojo()  
  • Method Summary

    Modifier and Type Method Description
    protected void checkJpacktoolPrepareUsed()
    set jpacktoolPrepareUsed variable based on maven property
    void executeToolMain()  
    java.lang.String getFinalName()  
    protected void initJPacktoolModel()
    initialize jpacktooModel

    Methods inherited from class net.agilhard.maven.plugins.jpacktool.base.mojo.AbstractToolMojo

    bytesToHex, checkShouldSkip, createZipArchiveFromDirectory, execute, executeCommand, executeToolFinish, executeToolStart, getArtifactFile, getClasspathArtifacts, getExcludedArtifacts, getJavaVersion, getJdkToolchain, getJpacktoolPropertyPrefix, getLocationManager, getOutputDirectoryAutomaticJars, getOutputDirectoryClasspathJars, getOutputDirectoryJPacktool, getOutputDirectoryModules, getPluginVersion, getProject, getSession, getShouldSkipReason, getSystemModules, getToolchain, getToolchainManager, getToolExecutable, hasClassifier, isVerbose, publishJPacktoolProperties, publishSHA256, setShouldSkipReason

    Methods inherited from class org.apache.maven.plugin.AbstractMojo

    getLog, getPluginContext, setLog, setPluginContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • finalName

      @Parameter(defaultValue="${project.build.finalName}", readonly=true) protected java.lang.String finalName
      Name of the generated ZIP file in the target directory. This will not change the name of the installed/deployed file.
    • basePath

      @Parameter(required=true, readonly=false) protected java.lang.String basePath
      The Update4j basePath Setting for the Business Application.
    • baseUri

      @Parameter(required=true, readonly=false) protected java.lang.String baseUri
      The update4j baseUri
    • generateUpdate4jConfig

      @Parameter(required=false, readonly=false, defaultValue="true") protected boolean generateUpdate4jConfig
      Flag whether to generate an update4j config file.
    • mainClass

      @Parameter(required=false, readonly=false) protected java.lang.String mainClass
      The main class.
    • arguments

      @Parameter(required=false, readonly=false) protected java.util.List<java.lang.String> arguments
      Command line arguments for the business application to pass to the main class if no arguments are specified by the launcher.

      This sets properties in the update4j config to be picked up by the launcher.

    • stripConfigName

      @Parameter(required=false, readonly=false, defaultValue="-jpacktool") protected java.lang.String stripConfigName
      replace this with nothing in the name of the config file
    • jpacktoolPrepareUsed

      protected boolean jpacktoolPrepareUsed
      Flag if jpacktool-prepare goal has been used before
  • Constructor Details

  • Method Details

    • executeToolMain

      public void executeToolMain() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Specified by:
      executeToolMain in class net.agilhard.maven.plugins.jpacktool.base.mojo.AbstractToolMojo
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      org.apache.maven.plugin.MojoFailureException
    • checkJpacktoolPrepareUsed

      protected void checkJpacktoolPrepareUsed()
      set jpacktoolPrepareUsed variable based on maven property
    • initJPacktoolModel

      protected void initJPacktoolModel()
      initialize jpacktooModel
    • getFinalName

      public java.lang.String getFinalName()
      Overrides:
      getFinalName in class net.agilhard.maven.plugins.jpacktool.base.mojo.AbstractToolMojo