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
- Author:
- James R. Perkins
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String[]Options passed to JBoss Modules.protected FileThe 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, skipFields 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, timeoutFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.wildfly.core.launcher.DomainCommandBuildercreateDomainCommandBuilder(Path jbossHome, String domainConfig, String hostConfig) protected org.wildfly.core.launcher.StandaloneCommandBuildercreateStandaloneCommandBuilder(Path jbossHome, String serverConfig) protected StringReturns the default feature pack location if not defined in the configuration.protected Pathprotected booleanIndicates if provisioning should be allowed or not.protected PathprovisionIfRequired(Path installDir) protected PathResolves the JBoss Home directory.voidsetModulesOptions(String value) Allows themoduleOptionsto be set as a string.Methods inherited from class org.wildfly.plugin.server.AbstractStartMojo
actOnServerState, createCommandBuilder, createMavenRepoManager, getManagementHostName, getManagementPort, init, setJavaOpts, standardOutput, startServerMethods inherited from class org.wildfly.plugin.common.AbstractServerConnection
createClient, getClientConfiguration, goalMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.plugin.Mojo
execute
-
Field Details
-
targetDir
@Parameter(defaultValue="${project.build.directory}", readonly=true, required=true) protected File targetDirThe target directory the application to be deployed is located. -
moduleOptions
@Parameter(alias="module-options", property="wildfly.moduleOptions") protected String[] moduleOptionsOptions 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:
getServerHomein classAbstractStartMojo- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
setModulesOptions
Allows themoduleOptionsto 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.MojoFailureExceptionorg.apache.maven.plugin.MojoExecutionException
-
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:
trueif provisioning is allowed, otherwisefalse
-
resolveJBossHome
Resolves the JBoss Home directory.- Returns:
- the JBoss Home directory
-