Class GitCommandLineUtils
- java.lang.Object
-
- org.apache.maven.scm.provider.git.gitexe.command.GitCommandLineUtils
-
public final class GitCommandLineUtils extends Object
Command line construction utility.- Author:
- Brett Porter, Mark Struberg
-
-
Field Summary
Fields Modifier and Type Field Description static String
VARIABLE_GIT_SSH_COMMAND
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addTarget(org.codehaus.plexus.util.cli.Commandline commandLine, List<File> files)
static int
execute(org.codehaus.plexus.util.cli.Commandline commandLine, org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer stdout, org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer stderr)
static int
execute(org.codehaus.plexus.util.cli.Commandline commandline, org.codehaus.plexus.util.cli.StreamConsumer consumer, org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer stderr)
static org.codehaus.plexus.util.cli.Commandline
getBaseGitCommandLine(File workingDirectory, String command)
Use this only for commands not requiring environment variables (i.e.static org.codehaus.plexus.util.cli.Commandline
getBaseGitCommandLine(File workingDirectory, String command, GitScmProviderRepository repository, Map<String,String> environment)
Use this for commands requiring environment variables (i.e.
-
-
-
Field Detail
-
VARIABLE_GIT_SSH_COMMAND
public static final String VARIABLE_GIT_SSH_COMMAND
- See Also:
- Constant Field Values
-
-
Method Detail
-
addTarget
public static void addTarget(org.codehaus.plexus.util.cli.Commandline commandLine, List<File> files)
-
getBaseGitCommandLine
public static org.codehaus.plexus.util.cli.Commandline getBaseGitCommandLine(File workingDirectory, String command)
Use this only for commands not requiring environment variables (i.e. local commands).
-
getBaseGitCommandLine
public static org.codehaus.plexus.util.cli.Commandline getBaseGitCommandLine(File workingDirectory, String command, GitScmProviderRepository repository, Map<String,String> environment)
Use this for commands requiring environment variables (i.e. remote commands).
-
execute
public static int execute(org.codehaus.plexus.util.cli.Commandline commandline, org.codehaus.plexus.util.cli.StreamConsumer consumer, org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer stderr) throws ScmException
- Throws:
ScmException
-
execute
public static int execute(org.codehaus.plexus.util.cli.Commandline commandLine, org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer stdout, org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer stderr) throws ScmException
- Throws:
ScmException
-
-