Class AbstractServerStartMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
DevMojo, RunMojo, StartMojo

public abstract class AbstractServerStartMojo extends AbstractStartMojo
Author:
James R. Perkins
  • Field Details

    • targetDir

      @Parameter(defaultValue="${project.build.directory}", readonly=true, required=true) protected File targetDir
      The target directory the application to be deployed is located.
    • moduleOptions

      @Parameter(alias="module-options", property="wildfly.moduleOptions") protected String[] moduleOptions
      Options passed to JBoss Modules. This is useful for things like Java Agents where you need to start the server with an agent.
  • Constructor Details

    • AbstractServerStartMojo

      public AbstractServerStartMojo()
  • Method Details

    • getServerHome

      protected Path getServerHome() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Specified by:
      getServerHome in class AbstractStartMojo
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      org.apache.maven.plugin.MojoFailureException
    • setModulesOptions

      public void setModulesOptions(String value)
      Allows the moduleOptions to be set as a string. The string is assumed to be space delimited.
      Parameters:
      value - a spaced delimited value of JBoss Modules options
    • createStandaloneCommandBuilder

      protected org.wildfly.core.launcher.StandaloneCommandBuilder createStandaloneCommandBuilder(Path jbossHome, String serverConfig) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • createDomainCommandBuilder

      protected org.wildfly.core.launcher.DomainCommandBuilder createDomainCommandBuilder(Path jbossHome, String domainConfig, String hostConfig) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • provisionIfRequired

      protected Path provisionIfRequired(Path installDir) throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoFailureException
      org.apache.maven.plugin.MojoExecutionException
    • getDefaultFeaturePackLocation

      protected String getDefaultFeaturePackLocation()
      Returns the default feature pack location if not defined in the configuration.
      Returns:
      the default feature pack location
    • isAllowProvisioning

      protected boolean isAllowProvisioning()
      Indicates if provisioning should be allowed or not.

      Provisioning is said to be allowed if the JBoss Home directory does not exist and does not already have a server provisioned in it.

      Returns:
      true if provisioning is allowed, otherwise false
    • resolveJBossHome

      protected Path resolveJBossHome()
      Resolves the JBoss Home directory.
      Returns:
      the JBoss Home directory