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
public abstract class AbstractServerStartMojo extends AbstractStartMojo
- Author:
- James R. Perkins
-
-
Field Summary
Fields Modifier and Type Field Description protected StringjbossHomeThe WildFly Application Server's home directory.protected String[]moduleOptionsOptions passed to JBoss Modules.protected FiletargetDirThe 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, 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
-
-
Constructor Summary
Constructors Constructor Description AbstractServerStartMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.wildfly.core.launcher.DomainCommandBuildercreateDomainCommandBuilder(Path jbossHome, String domainConfig, String hostConfig)protected org.wildfly.core.launcher.StandaloneCommandBuildercreateStandaloneCommandBuilder(Path jbossHome, String serverConfig)protected StringgetDefaultFeaturePackLocation()Returns the default feature pack location if not defined in the configuration.protected PathgetServerHome()protected PathprovisionIfRequired(Path installDir)voidsetModulesOptions(String value)Allows themoduleOptionsto be set as a string.-
Methods inherited from class org.wildfly.plugin.server.AbstractStartMojo
actOnServerState, createCommandBuilder, createMavenRepoManager, 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
-
-
-
-
Field Detail
-
targetDir
@Parameter(defaultValue="${project.build.directory}", readonly=true, required=true) protected File targetDirThe target directory the application to be deployed is located.
-
jbossHome
@Parameter(alias="jboss-home", property="jboss-as.home") protected String jbossHomeThe WildFly Application Server's home directory. If not used, WildFly will be downloaded.
-
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.
-
-
Method Detail
-
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
public void setModulesOptions(String value)
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
protected String getDefaultFeaturePackLocation()
Returns the default feature pack location if not defined in the configuration.- Returns:
- the default feature pack location
-
-