Class BourneShell
- java.lang.Object
-
- org.apache.maven.shared.utils.cli.shell.Shell
-
- org.apache.maven.shared.utils.cli.shell.BourneShell
-
- All Implemented Interfaces:
java.lang.Cloneable
public class BourneShell extends Shell
-
-
Constructor Summary
Constructors Constructor Description BourneShell()Create instance of BourneShell.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetExecutable()protected java.lang.StringgetExecutionPreamble()java.lang.String[]getShellArgs()Get the shell argumentsjava.util.List<java.lang.String>getShellArgsList()protected java.lang.StringquoteOneItem(java.lang.String path, boolean isExecutable)Unify quotes in a path for the Bourne Shell.-
Methods inherited from class org.apache.maven.shared.utils.cli.shell.Shell
clone, getArgumentQuoteDelimiter, getCommandLine, getEscapeChars, getExecutableQuoteDelimiter, getQuotingTriggerChars, getRawCommandLine, getShellCommand, getShellCommandLine, getWorkingDirectory, getWorkingDirectoryAsString, isDoubleQuotedArgumentEscaped, isDoubleQuotedExecutableEscaped, isQuotedArgumentsEnabled, isQuotedExecutableEnabled, isSingleQuotedArgumentEscaped, isSingleQuotedExecutableEscaped, isUnconditionalQuoting, setArgumentQuoteDelimiter, setExecutable, setExecutableQuoteDelimiter, setQuotedArgumentsEnabled, setQuotedExecutableEnabled, setShellArgs, setShellCommand, setSingleQuotedArgumentEscaped, setSingleQuotedExecutableEscaped, setUnconditionalQuoting, setWorkingDirectory, setWorkingDirectory
-
-
-
-
Method Detail
-
getExecutable
public java.lang.String getExecutable()
- Overrides:
getExecutablein classShell- Returns:
- The executable.
-
getShellArgsList
public java.util.List<java.lang.String> getShellArgsList()
- Overrides:
getShellArgsListin classShell
-
getShellArgs
public java.lang.String[] getShellArgs()
Get the shell arguments- Overrides:
getShellArgsin classShell- Returns:
- the arguments
-
getExecutionPreamble
protected java.lang.String getExecutionPreamble()
- Overrides:
getExecutionPreamblein classShell
-
quoteOneItem
protected java.lang.String quoteOneItem(java.lang.String path, boolean isExecutable)Unify quotes in a path for the Bourne Shell.
BourneShell.quoteOneItem(null) = null BourneShell.quoteOneItem("") = '' BourneShell.quoteOneItem("/test/quotedpath'abc") = '/test/quotedpath'"'"'abc' BourneShell.quoteOneItem("/test/quoted path'abc") = '/test/quoted pat'"'"'habc' BourneShell.quoteOneItem("/test/quotedpath\"abc") = '/test/quotedpath"abc' BourneShell.quoteOneItem("/test/quoted path\"abc") = '/test/quoted path"abc' BourneShell.quoteOneItem("/test/quotedpath\"'abc") = '/test/quotedpath"'"'"'abc' BourneShell.quoteOneItem("/test/quoted path\"'abc") = '/test/quoted path"'"'"'abc'- Overrides:
quoteOneItemin classShell- Parameters:
path- not null path.- Returns:
- the path unified correctly for the Bourne shell.
-
-