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 -
Method Summary
Modifier and TypeMethodDescriptionprotected org.wildfly.core.launcher.CliCommandBuilder
createCommandBuilder
(T config, Path scriptFile) abstract void
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) Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Constructor Details
-
AbstractCommandExecutor
public AbstractCommandExecutor()
-
-
Method Details
-
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
- 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
-