@NotThreadSafe public interface ScmCommandBuilder<B extends ScmCommandBuilder<B>> extends CommandBuilder<B>
CommandBuilder with SCM-related properties, still supporting creating free-form commands.
SCM command builders are specifically intended to be used with binaries such as git, hg or
svn, which provide a variety of different commands, each accepting different arguments and input and
producing different output, to carry out their functionality.| Modifier and Type | Method and Description |
|---|---|
<T> Command<T> |
build(CommandOutputHandler<T> outputHandler)
|
B |
command(String command)
Sets the command to execute.
|
argument, argumentAfter, argumentAt, argumentBefore, clearArguments, clearInputHandler, defaultErrorHandler, errorHandler, inputHandler, rawArgument, rawArgumentAfter, rawArgumentAt, rawArgumentBeforeclearEnvironment, defaultExitHandler, defaultWorkDir, defaultWorkingDirectory, exitHandler, removeEnvironment, withEnvironment, workDir, workDir, workingDirectory, workingDirectory, workingDirectory@Nonnull <T> Command<T> build(@Nonnull CommandOutputHandler<T> outputHandler)
Command which, when executed, will provide output to the provided
outputHandler for processing.
If no command has been set, the first argument is assumed to be the command. For
SCMs with unified binaries that have no default command, if no command has been set and no arguments have
been provided, implementations may throw an exception rather than executing the process which, most
likely, will simply print usage information and exit.
build in interface CommandBuilderSupport<B extends ScmCommandBuilder<B>>T - type for the builderoutputHandler - the handler to receive and process output from the command as it executesIllegalStateException - if no command has been set and no arguments were providedNullPointerException - if the provided outputHandler is null@Nonnull B command(@Nonnull String command)
Most SCMs, such as git, hg or svn, have a single unified binary which expects the
command to run as its first argument. This property separates that special command argument from the others,
allowing other arguments to be cleared without clearing the command as well.
command - the SCM command to executethisIllegalArgumentException - if the provided command is empty or blankNullPointerException - if the provided command is nullCopyright © 2020 Atlassian. All rights reserved.