Package org.wildfly.plugin.cli
Class CommandExecutor
java.lang.Object
org.codehaus.plexus.logging.AbstractLogEnabled
org.wildfly.plugin.cli.AbstractCommandExecutor<CommandConfiguration>
org.wildfly.plugin.cli.CommandExecutor
- All Implemented Interfaces:
org.codehaus.plexus.logging.LogEnabled
@Singleton
@Named
public class CommandExecutor
extends AbstractCommandExecutor<CommandConfiguration>
A command executor for executing CLI commands.
- Author:
- James R. Perkins
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(CommandConfiguration config, org.jboss.galleon.universe.maven.repo.MavenRepoManager artifactResolver) Executes CLI commands based on the configuration.protected intexecuteInNewProcess(CommandConfiguration config, Path scriptFile, StandardOutput stdout) Methods inherited from class org.wildfly.plugin.cli.AbstractCommandExecutor
createCommandBuilder, executeInNewProcess, launchProcessMethods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Constructor Details
-
CommandExecutor
public CommandExecutor()
-
-
Method Details
-
execute
public void execute(CommandConfiguration 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.- Specified by:
executein classAbstractCommandExecutor<CommandConfiguration>- 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 int executeInNewProcess(CommandConfiguration config, Path scriptFile, StandardOutput stdout) throws org.apache.maven.plugin.MojoExecutionException, IOException - Specified by:
executeInNewProcessin classAbstractCommandExecutor<CommandConfiguration>- Throws:
org.apache.maven.plugin.MojoExecutionExceptionIOException
-