Class CmdShell
java.lang.Object
org.apache.maven.shared.utils.cli.shell.Shell
org.apache.maven.shared.utils.cli.shell.CmdShell
Implementation to call the CMD Shell present on Windows.
- Author:
- Carlos Sanchez
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCommandLine(String executable, String... arguments) protected StringquoteOneItem(String inputString, boolean isExecutable) Quotes an item that contains a charactercmd.exewould otherwise interpret: whitespace and the special characters listed above, or every item whenShell.isUnconditionalQuoting()is set.Methods inherited from class org.apache.maven.shared.utils.cli.shell.Shell
getExecutable, getShellCommandLine, getWorkingDirectory, isDoubleQuotedArgumentEscaped, isSingleQuotedArgumentEscaped, isUnconditionalQuoting, setExecutable, setQuotedArgumentsEnabled, setUnconditionalQuoting, setWorkingDirectory, setWorkingDirectory
-
Constructor Details
-
CmdShell
public CmdShell()Create an instance of CmdShell.
-
-
Method Details
-
quoteOneItem
Quotes an item that contains a charactercmd.exewould otherwise interpret: whitespace and the special characters listed above, or every item whenShell.isUnconditionalQuoting()is set. An item that is already surrounded by double quotes is left as it is.- Overrides:
quoteOneItemin classShell- Parameters:
inputString- the executable or argumentisExecutable- unused, the executable and the arguments are quoted the same way- Returns:
- the item, surrounded by double quotes when
cmd.exeneeds them
-
getCommandLine
-