Package org.wildfly.plugin.cli
Class AbstractCommandExecutor<T extends BaseCommandConfiguration>
- java.lang.Object
-
- org.codehaus.plexus.logging.AbstractLogEnabled
-
- org.wildfly.plugin.cli.AbstractCommandExecutor<T>
-
- All Implemented Interfaces:
org.codehaus.plexus.logging.LogEnabled
- Direct Known Subclasses:
CommandExecutor
,OfflineCommandExecutor
public abstract class AbstractCommandExecutor<T extends BaseCommandConfiguration> extends org.codehaus.plexus.logging.AbstractLogEnabled
An abstract command executor for executing CLI commands.- Author:
- jdenise@redhat.com
-
-
Constructor Summary
Constructors Constructor Description AbstractCommandExecutor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected org.wildfly.core.launcher.CliCommandBuilder
createCommandBuilder(T config, Path scriptFile)
abstract void
execute(T config, org.jboss.galleon.universe.maven.repo.MavenRepoManager artifactResolver)
Executes CLI commands based on the configuration.protected void
executeInNewProcess(T config)
protected abstract int
executeInNewProcess(T config, Path scriptFile, StandardOutput stdout)
protected int
launchProcess(org.wildfly.core.launcher.CliCommandBuilder builder, T config, StandardOutput stdout)
-
-
-
Method Detail
-
execute
public abstract void execute(T config, org.jboss.galleon.universe.maven.repo.MavenRepoManager artifactResolver) throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException
Executes CLI commands based on the configuration.- Parameters:
config
- the configuration used to execute the CLI commandsartifactResolver
- Resolver to retrieve CLI artifact for in-process execution.- Throws:
org.apache.maven.plugin.MojoFailureException
- if the JBoss Home directory is required and invalidorg.apache.maven.plugin.MojoExecutionException
- if an error occurs executing the CLI commands
-
executeInNewProcess
protected abstract int executeInNewProcess(T config, Path scriptFile, StandardOutput stdout) throws org.apache.maven.plugin.MojoExecutionException, IOException
- Throws:
org.apache.maven.plugin.MojoExecutionException
IOException
-
executeInNewProcess
protected void executeInNewProcess(T config) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
createCommandBuilder
protected org.wildfly.core.launcher.CliCommandBuilder createCommandBuilder(T config, Path scriptFile) throws IOException
- Throws:
IOException
-
launchProcess
protected int launchProcess(org.wildfly.core.launcher.CliCommandBuilder builder, T config, StandardOutput stdout) throws org.apache.maven.plugin.MojoExecutionException, IOException
- Throws:
org.apache.maven.plugin.MojoExecutionException
IOException
-
-