You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2019/01/12 16:16:08 UTC

[ant] branch 1.9.x updated (eb99b1f -> 9d63d7e)

This is an automated email from the ASF dual-hosted git repository.

bodewig pushed a change to branch 1.9.x
in repository https://gitbox.apache.org/repos/asf/ant.git.


    from eb99b1f  Update the install.html and ant-jsch pom.xml to use the newer 0.1.55 version of jsch library
     new d106673  the task does not extend ExecTask (anymore?)
     new 9d63d7e  respect failOnError when running ls checkout - Bugzilla 63071

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 WHATSNEW                                             | 11 +++++++++++
 .../ant/taskdefs/optional/clearcase/CCCheckout.java  |  2 +-
 .../ant/taskdefs/optional/clearcase/ClearCase.java   | 20 +++++++++++++++++---
 3 files changed, 29 insertions(+), 4 deletions(-)


[ant] 01/02: the task does not extend ExecTask (anymore?)

Posted by bo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bodewig pushed a commit to branch 1.9.x
in repository https://gitbox.apache.org/repos/asf/ant.git

commit d106673e3e7b9beebe024b14086e4d554b5ed2f2
Author: Stefan Bodewig <bo...@apache.org>
AuthorDate: Sat Jan 12 17:01:01 2019 +0100

    the task does not extend ExecTask (anymore?)
---
 .../org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java
index 5a537eb..68d2a4a 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java
@@ -34,9 +34,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'


[ant] 02/02: respect failOnError when running ls checkout - Bugzilla 63071

Posted by bo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bodewig pushed a commit to branch 1.9.x
in repository https://gitbox.apache.org/repos/asf/ant.git

commit 9d63d7ee24e7848d344146831d4da3272e596d69
Author: Stefan Bodewig <bo...@apache.org>
AuthorDate: Sat Jan 12 17:13:51 2019 +0100

    respect failOnError when running ls checkout - Bugzilla 63071
    
    I've decided to break backwards compatibility with the way I've
    overridden runS. The "proper" way would have been to call the one-arg
    version from the two-arg version so that subclasses overriding runS
    would still get their method called. But I figured it to be extremely
    unlikely that such subclasses exist.
---
 WHATSNEW                                                   | 11 +++++++++++
 .../tools/ant/taskdefs/optional/clearcase/CCCheckout.java  |  2 +-
 .../tools/ant/taskdefs/optional/clearcase/ClearCase.java   | 14 ++++++++++++++
 3 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/WHATSNEW b/WHATSNEW
index 4d18c50..cadeec0 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -1,6 +1,13 @@
 Changes from Ant 1.9.13 TO Ant 1.9.14
 =====================================
 
+Changes that could break older environments:
+-------------------------------------------
+
+ * 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:
 -----------
 
@@ -16,6 +23,10 @@ Fixed bugs:
    an incorrect compression level for a zip entry. This is now fixed.
    Bugzilla Report 62686
 
+ * cccheckout would ignore an error of the "ls checkout" command even
+   if failOnError was set to false.
+   Bugzilla Report 63071
+
 Other changes:
 --------------
  * generatekey task now supports SubjectAlternativeName during key
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java
index e60bfc9..4489b7b 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java
@@ -168,7 +168,7 @@ public class CCCheckout extends ClearCase {
         // viewpath
         cmdl.createArgument().setValue(getViewPath());
 
-        result = runS(cmdl);
+        result = runS(cmdl, getFailOnErr());
 
         // System.out.println( "lsCheckout: " + result );
 
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java
index 68d2a4a..6eecc8a 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java
@@ -144,8 +144,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.9.14
+     */
+    protected String runS(Commandline cmdline, boolean failOnError) {
         String   outV  = "opts.cc.runS.output" + pcnt++;
         ExecTask exe   = new ExecTask(this);
         Commandline.Argument arg = exe.createArg();
@@ -153,6 +166,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);