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
-
-
Field Summary
Fields Modifier and Type Field Description private static char[]BASH_QUOTING_TRIGGER_CHARS
-
Constructor Summary
Constructors Constructor Description BourneShell()Create instance of BournShell.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetExecutable()protected java.lang.StringgetExecutionPreamble()protected char[]getQuotingTriggerChars()java.lang.String[]getShellArgs()Get the shell argumentsjava.util.List<java.lang.String>getShellArgsList()private static java.lang.StringunifyQuotes(java.lang.String path)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, getRawCommandLine, getShellCommand, getShellCommandLine, getWorkingDirectory, getWorkingDirectoryAsString, isDoubleQuotedArgumentEscaped, isDoubleQuotedExecutableEscaped, isQuotedArgumentsEnabled, isQuotedExecutableEnabled, isSingleQuotedArgumentEscaped, isSingleQuotedExecutableEscaped, setArgumentQuoteDelimiter, setExecutable, setExecutableQuoteDelimiter, setQuotedArgumentsEnabled, setQuotedExecutableEnabled, setShellArgs, setShellCommand, setSingleQuotedArgumentEscaped, setSingleQuotedExecutableEscaped, 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
-
getQuotingTriggerChars
protected char[] getQuotingTriggerChars()
- Overrides:
getQuotingTriggerCharsin classShell
-
unifyQuotes
private static java.lang.String unifyQuotes(java.lang.String path)
Unify quotes in a path for the Bourne Shell.
BourneShell.unifyQuotes(null) = null BourneShell.unifyQuotes("") = (empty) BourneShell.unifyQuotes("/test/quotedpath'abc") = /test/quotedpath\'abc BourneShell.unifyQuotes("/test/quoted path'abc") = "/test/quoted path'abc" BourneShell.unifyQuotes("/test/quotedpath\"abc") = "/test/quotedpath\"abc" BourneShell.unifyQuotes("/test/quoted path\"abc") = "/test/quoted path\"abc" BourneShell.unifyQuotes("/test/quotedpath\"'abc") = "/test/quotedpath\"'abc" BourneShell.unifyQuotes("/test/quoted path\"'abc") = "/test/quoted path\"'abc"- Parameters:
path- not null path.- Returns:
- the path unified correctly for the Bourne shell.
-
-