Class CommandExecutorDelegateImpl

  • All Implemented Interfaces:
    CommandExecutorDelegate

    public final class CommandExecutorDelegateImpl
    extends Object
    implements CommandExecutorDelegate
    Delegate class that is responsible for actually executing a specific command. Putting this in a separate class allows for better testing.
    • Constructor Detail

      • CommandExecutorDelegateImpl

        public CommandExecutorDelegateImpl()
    • Method Detail

      • executeCommand

        public List<String> executeCommand​(org.zeroturnaround.exec.ProcessExecutor processExecutor)
                                    throws org.apache.maven.plugin.MojoExecutionException
        Description copied from interface: CommandExecutorDelegate

        Executes the command as configured in the provided ProcessExecutor.

        Throws a MojoExecutionException in case command execution fails

        Specified by:
        executeCommand in interface CommandExecutorDelegate
        Parameters:
        processExecutor - The process executor carrying the command to execute
        Returns:
        A List of Strings representing the actual output of the command
        Throws:
        org.apache.maven.plugin.MojoExecutionException - In case execution of the command fails