Package org.wildfly.plugin.server
Class AbstractServerStartMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.wildfly.plugin.common.AbstractServerConnection
-
- org.wildfly.plugin.server.AbstractServerStartMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
public abstract class AbstractServerStartMojo extends AbstractServerConnection
- Author:
- James R. Perkins
-
-
Field Summary
Fields Modifier and Type Field Description protected StringjbossHomeThe WildFly Application Server's home directory.protected org.jboss.galleon.universe.maven.repo.MavenRepoManagermavenRepoManagerprotected org.apache.maven.execution.MavenSessionmavenSessionprotected org.apache.maven.project.MavenProjectprojectprotected List<org.eclipse.aether.repository.RemoteRepository>repositoriesprotected org.eclipse.aether.RepositorySystemrepoSystemprotected org.eclipse.aether.RepositorySystemSessionsessionprotected booleanskipSet totrueif you want to skip this goal, otherwisefalse.protected FiletargetDirThe target directory the application to be deployed is located.-
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 Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract org.wildfly.core.launcher.CommandBuildercreateCommandBuilder(Path jbossHome)protected org.wildfly.core.launcher.DomainCommandBuildercreateDomainCommandBuilder(Path jbossHome, String domainConfig, String hostConfig)protected org.jboss.galleon.universe.maven.repo.MavenRepoManagercreateMavenRepoManager()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 voidinit()protected PathprovisionIfRequired(Path installDir)voidsetJavaOpts(String value)Allows thejavaOptsto be set as a string.protected StandardOutputstandardOutput()protected ServerContextstartServer(ServerType serverType)-
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
-
repoSystem
@Component protected org.eclipse.aether.RepositorySystem repoSystem
-
session
@Parameter(defaultValue="${repositorySystemSession}", readonly=true, required=true) protected org.eclipse.aether.RepositorySystemSession session
-
repositories
@Parameter(defaultValue="${project.remoteProjectRepositories}", readonly=true, required=true) protected List<org.eclipse.aether.repository.RemoteRepository> repositories
-
project
@Parameter(defaultValue="${project}", readonly=true, required=true) protected org.apache.maven.project.MavenProject project
-
mavenSession
@Parameter(defaultValue="${session}", readonly=true, required=true) protected org.apache.maven.execution.MavenSession mavenSession
-
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.
-
skip
@Parameter(defaultValue="false", property="wildfly.skip") protected boolean skipSet totrueif you want to skip this goal, otherwisefalse.
-
mavenRepoManager
protected org.jboss.galleon.universe.maven.repo.MavenRepoManager mavenRepoManager
-
-
Method Detail
-
init
protected void init() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
createMavenRepoManager
protected org.jboss.galleon.universe.maven.repo.MavenRepoManager createMavenRepoManager() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
startServer
protected ServerContext startServer(ServerType serverType) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
createCommandBuilder
protected abstract org.wildfly.core.launcher.CommandBuilder createCommandBuilder(Path jbossHome) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
standardOutput
protected StandardOutput standardOutput() throws IOException
- Throws:
IOException
-
setJavaOpts
public void setJavaOpts(String value)
Allows thejavaOptsto be set as a string. The string is assumed to be space delimited.- Parameters:
value- a spaced delimited value of JVM 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
-
-