org.apache.tools.ant.taskdefs.optional.perforce
public abstract class P4Base extends Task
See Also: P4Sync P4Have P4Change P4Edit P4Submit P4Label Execute
Field Summary | |
---|---|
protected boolean | failOnError Keep going or fail on error - defaults to fail. |
protected String | P4Client Perforce Client (eg myclientspec) |
protected String | P4CmdOpts Perforce command opts.
|
protected String | P4Opts Perforce 'global' opts.
|
protected String | P4Port Perforce Server Port (eg KM01:1666) |
protected String | P4User Perforce User (eg fbloggs) |
protected String | P4View Perforce view for commands. (eg //projects/foobar/main/source/... |
protected String | shell The OS shell to use (cmd.exe or /bin/sh) |
protected Perl5Util | util Perl5 regexp in Java - cool eh? |
Method Summary | |
---|---|
protected void | execP4Command(String command)
no usages found for this method
runs a Perforce command without a handler |
protected void | execP4Command(String command, P4Handler handler)
Execute P4 command assembled by subclasses.
|
String | getErrorMessage()
gets the error message recorded by the Perforce handler |
boolean | getInError()
gets whether or not the task has encountered an error |
void | init()
sets attributes Port, Client, User from properties
if these properties are defined.
|
void | setClient(String p4Client)
The p4 client spec to use;
optional, defaults to the current user
|
void | setCmdopts(String p4CmdOpts)
Set extra command options; only used on some
of the Perforce tasks.
|
void | setErrorMessage(String errorMessage)
sets the error message |
void | setFailonerror(boolean fail)
whether to stop the build (true, default)
or keep going if an error is returned from the p4 command |
void | setGlobalopts(String p4Opts)
Set global P4 options; Used on all
of the Perforce tasks.
|
void | setInError(boolean inError)
sets the error flag on the task |
void | setPort(String p4Port)
The p4d server and port to connect to;
optional, default "perforce:1666"
|
void | setUser(String p4User)
The p4 username;
optional, defaults to the current user
|
void | setView(String p4View)
The client, branch or label view to operate upon;
optional default "//...".
the view is required for the following tasks :
|
Parameters: command the command that one wants to execute
Throws: BuildException if failonerror is set and the command fails
Parameters: command The command to run handler A P4Handler to process any input and output
Throws: BuildException if failonerror has been set to true
Returns: error message
Returns: error flag
Since: ant 1.6
See Also:
Property Attribute p4.port Port p4.client Client p4.user User
Parameters: p4Client the name of the Perforce client spec
Parameters: p4CmdOpts command line options going after the particular Perforce command
Parameters: errorMessage line of error output
Parameters: fail indicates whether one wants to fail the build if an error comes from the Perforce command
Parameters: p4Opts global options, to use a specific P4Config file for instance
Parameters: inError if true an error has been encountered by the handler
Since: ant 1.6
Parameters: p4Port the port one wants to set such as localhost:1666
Parameters: p4User the user name
Parameters: p4View the view one wants to use