Class CmdShell

java.lang.Object
org.apache.maven.shared.utils.cli.shell.Shell
org.apache.maven.shared.utils.cli.shell.CmdShell

public class CmdShell extends Shell
Implementation to call the CMD Shell present on Windows.
Author:
Carlos Sanchez
  • Constructor Details

    • CmdShell

      public CmdShell()
      Create an instance of CmdShell.
  • Method Details

    • quoteOneItem

      protected String quoteOneItem(String inputString, boolean isExecutable)
      Quotes an item that contains a character cmd.exe would otherwise interpret: whitespace and the special characters listed above, or every item when Shell.isUnconditionalQuoting() is set. An item that is already surrounded by double quotes is left as it is.
      Overrides:
      quoteOneItem in class Shell
      Parameters:
      inputString - the executable or argument
      isExecutable - unused, the executable and the arguments are quoted the same way
      Returns:
      the item, surrounded by double quotes when cmd.exe needs them
    • getCommandLine

      public List<String> getCommandLine(String executable, String... arguments)