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 Summary
Constructors Constructor Description CmdShell()Create an instance of CmdShell.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>getCommandLine(java.lang.String executable, java.lang.String... arguments)protected java.lang.StringquoteOneItem(java.lang.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
-
-
-
-
Method Detail
-
quoteOneItem
protected java.lang.String quoteOneItem(java.lang.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. 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
public java.util.List<java.lang.String> getCommandLine(java.lang.String executable, java.lang.String... arguments)
-
-