Browse Source

Merge branch '1.9.x'

master
Stefan Bodewig 6 years ago
parent
commit
a0c161ad2a
3 changed files with 25 additions and 4 deletions
  1. +7
    -0
      WHATSNEW
  2. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java
  3. +17
    -3
      src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java

+ 7
- 0
WHATSNEW View File

@@ -15,6 +15,10 @@ Changes that could break older environments:
doesn't impact build scripts if their reference to junitlauncher task
was merely through the use of the <junitlauncher> element.

* ClearCase#runS has been augmented by a two arg-version and the
one-arg version will no longer be called. This may affect
subclasses that have overridden runS.

Fixed bugs:
-----------

@@ -44,6 +48,9 @@ Fixed bugs:
org.apache.tools.ant.Project#getCopyOfReferences.
Github Pull Request #81

* cccheckout would ignore an error of the "ls checkout" command even
if failOnError was set to false.
Bugzilla Report 63071

Other changes:
--------------


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java View File

@@ -217,7 +217,7 @@ public class CCCheckout extends ClearCase {
// viewpath
cmdl.createArgument().setValue(getViewPath());

String result = runS(cmdl);
String result = runS(cmdl, getFailOnErr());

return result != null && !result.isEmpty();
}


+ 17
- 3
src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java View File

@@ -33,9 +33,9 @@ import org.apache.tools.ant.util.FileUtils;
/**
* A base class for creating tasks for executing commands on ClearCase.
* <p>
* The class extends the 'exec' task as it operates by executing the cleartool program
* supplied with ClearCase. By default the task expects the cleartool executable to be
* in the path, * you can override this be specifying the cleartooldir attribute.
* By default the task expects the cleartool executable to be in the
* path, you can override this be specifying the cleartooldir
* attribute.
* </p>
* <p>
* This class provides set and get methods for the 'viewpath' and 'objselect'
@@ -205,8 +205,21 @@ public abstract class ClearCase extends Task {
* Execute the given command, and return it's output
* @param cmdline command line to execute
* @return output of the command line
* @deprecated use the two arg version instead
*/
@Deprecated
protected String runS(Commandline cmdline) {
return runS(cmdline, false);
}

/**
* Execute the given command, and return it's output
* @param cmdline command line to execute
* @param failOnError whether to fail the build if the command fails
* @return output of the command line
* @since Ant 1.10.6
*/
protected String runS(Commandline cmdline, boolean failOnError) {
String outV = "opts.cc.runS.output" + pcnt++;
ExecTask exe = new ExecTask(this);
Commandline.Argument arg = exe.createArg();
@@ -214,6 +227,7 @@ public abstract class ClearCase extends Task {
exe.setExecutable(cmdline.getExecutable());
arg.setLine(Commandline.toString(cmdline.getArguments()));
exe.setOutputproperty(outV);
exe.setFailonerror(failOnError);
exe.execute();

return getProject().getProperty(outV);


Loading…
Cancel
Save