Package org.wildfly.plugin.server

## Class AbstractServerStartMojo

- java.lang.Object
- - org.apache.maven.plugin.AbstractMojo
  - - org.wildfly.plugin.common.AbstractServerConnection
    - - org.wildfly.plugin.server.AbstractStartMojo
      - - org.wildfly.plugin.server.AbstractServerStartMojo

- 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 Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected String` | `jbossHome` | The WildFly Application Server's home directory.
    `protected String[]` | `moduleOptions` | Options passed to JBoss Modules.
    `protected File` | `targetDir` | The target directory the application to be deployed is located.

    - ### Fields inherited from class org.wildfly.plugin.server.AbstractStartMojo

      `debug, debugHost, debugPort, debugSuspend, javaHome, javaOpts, mavenRepoManager, mavenSession, project, propertiesFile, repositories, repoSystem, serverArgs, serverManager, session, skip`

    - ### Fields inherited from class org.wildfly.plugin.common.AbstractServerConnection

      `DEBUG_MESSAGE_NO_CREDS, DEBUG_MESSAGE_NO_ID, DEBUG_MESSAGE_NO_SERVER_SECTION, DEBUG_MESSAGE_NO_SETTINGS_FILE, DEBUG_MESSAGE_POM_HAS_CREDS, DEBUG_MESSAGE_SETTINGS_HAS_CREDS, DEBUG_MESSAGE_SETTINGS_HAS_ID, timeout`

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

      `ROLE`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AbstractServerStartMojo()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected org.wildfly.core.launcher.DomainCommandBuilder` | `createDomainCommandBuilder​(Path jbossHome, String domainConfig, String hostConfig)` |
    `protected org.wildfly.core.launcher.StandaloneCommandBuilder` | `createStandaloneCommandBuilder​(Path jbossHome, String serverConfig)` |
    `protected String` | `getDefaultFeaturePackLocation()` | Returns the default feature pack location if not defined in the configuration.
    `protected Path` | `getServerHome()` |
    `protected Path` | `provisionIfRequired​(Path installDir)` |
    `void` | `setModulesOptions​(String value)` | Allows the `moduleOptions` to be set as a string.

    - ### Methods inherited from class org.wildfly.plugin.server.AbstractStartMojo

      `actOnServerState, createCommandBuilder, createMavenRepoManager, getManagementHostName, getManagementPort, init, setJavaOpts, standardOutput, startServer`

    - ### Methods inherited from class org.wildfly.plugin.common.AbstractServerConnection

      `createClient, getClientConfiguration, goal`

    - ### 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`

    - ### Methods inherited from interface org.apache.maven.plugin.Mojo

      `execute`

- - ### Field Detail

    - #### targetDir

          @Parameter(defaultValue="${project.build.directory}",
                     readonly=true,
                     required=true)
          protected File targetDir

      The target directory the application to be deployed is located.

    - #### jbossHome

          @Parameter(alias="jboss-home",
                     property="jboss-as.home")
          protected String jbossHome

      The WildFly Application Server's home directory. If not used, WildFly will be downloaded.

    - #### 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 Detail

    - #### AbstractServerStartMojo

          public AbstractServerStartMojo()

  - ### Method Detail

    - #### 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