bodewig 2003/07/25 05:14:44
Modified: src/main/org/apache/tools/ant/taskdefs AbstractCvsTask.java
Execute.java ExecuteWatchdog.java Java.java
Javadoc.java
src/main/org/apache/tools/ant/taskdefs/cvslib
ChangeLogTask.java
src/main/org/apache/tools/ant/taskdefs/optional ANTLR.java
Cab.java
src/main/org/apache/tools/ant/taskdefs/optional/ccm
CCMCheck.java CCMCreateTask.java
CCMReconfigure.java
src/main/org/apache/tools/ant/taskdefs/optional/clearcase
CCCheckin.java CCCheckout.java CCLock.java
CCMkbl.java CCMklabel.java CCMklbtype.java
CCRmtype.java CCUnCheckout.java CCUnlock.java
CCUpdate.java
src/main/org/apache/tools/ant/taskdefs/optional/dotnet
NetCommand.java
src/main/org/apache/tools/ant/taskdefs/optional/ejb
BorlandDeploymentTool.java
src/main/org/apache/tools/ant/taskdefs/optional/javacc
JJDoc.java JJTree.java
src/main/org/apache/tools/ant/taskdefs/optional/metamata
AbstractMetamataTask.java MParse.java
src/main/org/apache/tools/ant/taskdefs/optional/pvcs
Pvcs.java
src/main/org/apache/tools/ant/taskdefs/optional/sitraka
CovMerge.java CovReport.java Coverage.java
src/main/org/apache/tools/ant/taskdefs/optional/vss
MSVSS.java
Log:
Use Execute.isFailure
Revision Changes Path
1.24 +1 -1
ant/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java
Index: AbstractCvsTask.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- AbstractCvsTask.java 24 Jul 2003 14:07:51 -0000 1.23
+++ AbstractCvsTask.java 25 Jul 2003 12:14:42 -0000 1.24
@@ -372,7 +372,7 @@
int retCode = exe.execute();
log("retCode=" + retCode, Project.MSG_DEBUG);
/*Throw an exception if cvs exited with error. (Iulian)*/
- if (failOnError && retCode != 0) {
+ if (failOnError && Execute.isFailure(retCode)) {
throw new BuildException("cvs exited with error code "
+ retCode
+ StringUtils.LINE_SEP
1.59 +2 -2 ant/src/main/org/apache/tools/ant/taskdefs/Execute.java
Index: Execute.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Execute.java,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- Execute.java 25 Jul 2003 10:06:32 -0000 1.58
+++ Execute.java 25 Jul 2003 12:14:42 -0000 1.59
@@ -577,7 +577,7 @@
exe.setAntRun(task.getProject());
exe.setCommandline(cmdline);
int retval = exe.execute();
- if (retval != 0) {
+ if (isFailure(retval)) {
throw new BuildException(cmdline[0]
+ " failed with return code " + retval,
task.getLocation());
}
1.17 +2 -2
ant/src/main/org/apache/tools/ant/taskdefs/ExecuteWatchdog.java
Index: ExecuteWatchdog.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/ExecuteWatchdog.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- ExecuteWatchdog.java 19 Jul 2003 08:10:59 -0000 1.16
+++ ExecuteWatchdog.java 25 Jul 2003 12:14:42 -0000 1.17
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -66,7 +66,7 @@
* Execute exec = new Execute(myloghandler, watchdog);
* exec.setCommandLine(mycmdline);
* int exitvalue = exec.execute();
- * if (exitvalue != SUCCESS && watchdog.killedProcess()) {
+ * if (Execute.isFailure(exitvalue) && watchdog.killedProcess()) {
* // it was killed on purpose by the watchdog
* }
* </pre>
1.65 +2 -1 ant/src/main/org/apache/tools/ant/taskdefs/Java.java
Index: Java.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Java.java,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- Java.java 19 Jul 2003 08:10:59 -0000 1.64
+++ Java.java 25 Jul 2003 12:14:42 -0000 1.65
@@ -102,7 +102,8 @@
int err = -1;
try {
- if ((err = executeJava()) != 0) {
+ err = executeJava();
+ if (fork && Execute.isFailure(err)) {
if (failOnError) {
throw new BuildException("Java returned: " + err,
getLocation());
} else {
1.121 +1 -1 ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
Index: Javadoc.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -r1.120 -r1.121
--- Javadoc.java 19 Jul 2003 11:20:12 -0000 1.120
+++ Javadoc.java 25 Jul 2003 12:14:42 -0000 1.121
@@ -1984,7 +1984,7 @@
try {
exe.setCommandline(toExecute.getCommandline());
int ret = exe.execute();
- if (ret != 0 && failOnError) {
+ if (Execute.isFailure(ret) && failOnError) {
throw new BuildException("Javadoc returned " + ret,
getLocation());
}
} catch (IOException e) {
1.24 +3 -3
ant/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java
Index: ChangeLogTask.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- ChangeLogTask.java 19 Jul 2003 08:11:02 -0000 1.23
+++ ChangeLogTask.java 25 Jul 2003 12:14:42 -0000 1.24
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2002 The Apache Software Foundation. All rights
+ * Copyright (c) 2002-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -286,7 +286,7 @@
try {
final int resultCode = exe.execute();
- if (0 != resultCode) {
+ if (Execute.isFailure(resultCode)) {
throw new BuildException("Error running cvs log");
}
} catch (final IOException ioe) {
1.33 +1 -1
ant/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java
Index: ANTLR.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- ANTLR.java 18 Jul 2003 12:45:57 -0000 1.32
+++ ANTLR.java 25 Jul 2003 12:14:42 -0000 1.33
@@ -318,7 +318,7 @@
log(commandline.describeCommand(), Project.MSG_VERBOSE);
int err = run(commandline.getCommandline());
- if (err == 1) {
+ if (Execute.isFailure(err)) {
throw new BuildException("ANTLR returned: " + err,
getLocation());
} else {
String output = bos.toString();
1.29 +1 -1
ant/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java
Index: Cab.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- Cab.java 18 Jul 2003 12:45:57 -0000 1.28
+++ Cab.java 25 Jul 2003 12:14:42 -0000 1.29
@@ -303,7 +303,7 @@
}
// Informative summary message in case of errors
- if (result != 0) {
+ if (Execute.isFailure(result)) {
log("Error executing listcab; error code: " + result);
}
} catch (IOException ex) {
1.14 +2 -1
ant/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheck.java
Index: CCMCheck.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheck.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- CCMCheck.java 19 Jul 2003 08:11:03 -0000 1.13
+++ CCMCheck.java 25 Jul 2003 12:14:42 -0000 1.14
@@ -60,6 +60,7 @@
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.DirectoryScanner;
import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.Execute;
import org.apache.tools.ant.types.Commandline;
import org.apache.tools.ant.types.FileSet;
@@ -197,7 +198,7 @@
checkOptions(commandLine);
int result = run(commandLine);
- if (result != 0) {
+ if (Execute.isFailure(0)) {
String msg = "Failed executing: " + commandLine.toString();
throw new BuildException(msg, getLocation());
}
1.14 +3 -2
ant/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCreateTask.java
Index: CCMCreateTask.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCreateTask.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- CCMCreateTask.java 10 Feb 2003 14:13:46 -0000 1.13
+++ CCMCreateTask.java 25 Jul 2003 12:14:42 -0000 1.14
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001-2002 The Apache Software Foundation. All rights
+ * Copyright (c) 2001-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -62,6 +62,7 @@
import java.io.OutputStream;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.Execute;
import org.apache.tools.ant.taskdefs.ExecuteStreamHandler;
import org.apache.tools.ant.types.Commandline;
@@ -107,7 +108,7 @@
checkOptions(commandLine);
result = run(commandLine, this);
- if (result != 0) {
+ if (Execute.isFailure(result)) {
String msg = "Failed executing: " + commandLine.toString();
throw new BuildException(msg, getLocation());
}
1.12 +2 -1
ant/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMReconfigure.java
Index: CCMReconfigure.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMReconfigure.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- CCMReconfigure.java 22 Apr 2003 07:35:15 -0000 1.11
+++ CCMReconfigure.java 25 Jul 2003 12:14:42 -0000 1.12
@@ -56,6 +56,7 @@
import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.taskdefs.Execute;
import org.apache.tools.ant.types.Commandline;
@@ -94,7 +95,7 @@
checkOptions(commandLine);
result = run(commandLine);
- if (result != 0) {
+ if (Execute.isFailure(result)) {
String msg = "Failed executing: " + commandLine.toString();
throw new BuildException(msg, getLocation());
}
1.10 +3 -5
ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckin.java
Index: CCCheckin.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckin.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- CCCheckin.java 19 Jul 2003 11:20:15 -0000 1.9
+++ CCCheckin.java 25 Jul 2003 12:14:43 -0000 1.10
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000,2002 The Apache Software Foundation. All rights
+ * Copyright (c) 2000,2002-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -56,11 +56,9 @@
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.Execute;
import org.apache.tools.ant.types.Commandline;
-
-
-
/**
* Performs ClearCase checkin.
*
@@ -144,7 +142,7 @@
checkOptions(commandLine);
result = run(commandLine);
- if (result != 0) {
+ if (Execute.isFailure(result)) {
String msg = "Failed executing: " + commandLine.toString();
throw new BuildException(msg, getLocation());
}
1.10 +3 -2
ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java
Index: CCCheckout.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- CCCheckout.java 19 Jul 2003 11:20:15 -0000 1.9
+++ CCCheckout.java 25 Jul 2003 12:14:43 -0000 1.10
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000,2002 The Apache Software Foundation. All rights
+ * Copyright (c) 2000,2002-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -56,6 +56,7 @@
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.Execute;
import org.apache.tools.ant.types.Commandline;
@@ -156,7 +157,7 @@
checkOptions(commandLine);
result = run(commandLine);
- if (result != 0) {
+ if (Execute.isFailure(result)) {
String msg = "Failed executing: " + commandLine.toString();
throw new BuildException(msg, getLocation());
}
1.3 +2 -1
ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCLock.java
Index: CCLock.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCLock.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CCLock.java 19 Jul 2003 11:20:16 -0000 1.2
+++ CCLock.java 25 Jul 2003 12:14:43 -0000 1.3
@@ -56,6 +56,7 @@
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.Execute;
import org.apache.tools.ant.types.Commandline;
@@ -148,7 +149,7 @@
System.out.println(commandLine.toString());
result = run(commandLine);
- if (result != 0) {
+ if (Execute.isFailure(result)) {
String msg = "Failed executing: " + commandLine.toString();
throw new BuildException(msg, location);
}
1.4 +3 -2
ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkbl.java
Index: CCMkbl.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkbl.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- CCMkbl.java 19 Jul 2003 11:20:16 -0000 1.3
+++ CCMkbl.java 25 Jul 2003 12:14:43 -0000 1.4
@@ -56,6 +56,7 @@
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.Execute;
import org.apache.tools.ant.types.Commandline;
/**
@@ -145,7 +146,7 @@
checkOptions(commandLine);
result = run(commandLine);
- if (result != 0) {
+ if (Execute.isFailure(result)) {
String msg = "Failed executing: " + commandLine.toString();
throw new BuildException(msg, location);
}
@@ -393,4 +394,4 @@
public static final String FLAG_NLABEL = "-nlabel";
-}
\ No newline at end of file
+}
1.6 +2 -1
ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklabel.java
Index: CCMklabel.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklabel.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- CCMklabel.java 19 Jul 2003 11:20:16 -0000 1.5
+++ CCMklabel.java 25 Jul 2003 12:14:43 -0000 1.6
@@ -56,6 +56,7 @@
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.Execute;
import org.apache.tools.ant.types.Commandline;
/**
@@ -151,7 +152,7 @@
checkOptions(commandLine);
result = run(commandLine);
- if (result != 0) {
+ if (Execute.isFailure(result)) {
String msg = "Failed executing: " + commandLine.toString();
throw new BuildException(msg, location);
}
1.6 +2 -1
ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklbtype.java
Index: CCMklbtype.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklbtype.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- CCMklbtype.java 19 Jul 2003 11:20:16 -0000 1.5
+++ CCMklbtype.java 25 Jul 2003 12:14:43 -0000 1.6
@@ -56,6 +56,7 @@
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.Execute;
import org.apache.tools.ant.types.Commandline;
/**
@@ -160,7 +161,7 @@
checkOptions(commandLine);
result = run(commandLine);
- if (result != 0) {
+ if (Execute.isFailure(result)) {
String msg = "Failed executing: " + commandLine.toString();
throw new BuildException(msg, location);
}
1.6 +2 -1
ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCRmtype.java
Index: CCRmtype.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCRmtype.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- CCRmtype.java 19 Jul 2003 11:20:16 -0000 1.5
+++ CCRmtype.java 25 Jul 2003 12:14:43 -0000 1.6
@@ -56,6 +56,7 @@
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.Execute;
import org.apache.tools.ant.types.Commandline;
/**
@@ -153,7 +154,7 @@
checkOptions(commandLine);
result = run(commandLine);
- if (result != 0) {
+ if (Execute.isFailure(result)) {
String msg = "Failed executing: " + commandLine.toString();
throw new BuildException(msg, location);
}
1.9 +3 -5
ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnCheckout.java
Index: CCUnCheckout.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnCheckout.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- CCUnCheckout.java 10 Feb 2003 14:13:46 -0000 1.8
+++ CCUnCheckout.java 25 Jul 2003 12:14:43 -0000 1.9
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000,2002 The Apache Software Foundation. All rights
+ * Copyright (c) 2000,2002-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -56,11 +56,9 @@
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.Execute;
import org.apache.tools.ant.types.Commandline;
-
-
-
/**
* Performs ClearCase UnCheckout command.
*
@@ -114,7 +112,7 @@
checkOptions(commandLine);
result = run(commandLine);
- if (result != 0) {
+ if (Execute.isFailure(result)) {
String msg = "Failed executing: " + commandLine.toString();
throw new BuildException(msg, getLocation());
}
1.3 +2 -1
ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnlock.java
Index: CCUnlock.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnlock.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CCUnlock.java 19 Jul 2003 11:20:16 -0000 1.2
+++ CCUnlock.java 25 Jul 2003 12:14:43 -0000 1.3
@@ -56,6 +56,7 @@
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.Execute;
import org.apache.tools.ant.types.Commandline;
/**
@@ -128,7 +129,7 @@
System.out.println(commandLine.toString());
result = run(commandLine);
- if (result != 0) {
+ if (Execute.isFailure(result)) {
String msg = "Failed executing: " + commandLine.toString();
throw new BuildException(msg, location);
}
1.11 +3 -6
ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUpdate.java
Index: CCUpdate.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUpdate.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- CCUpdate.java 19 Jul 2003 11:20:16 -0000 1.10
+++ CCUpdate.java 25 Jul 2003 12:14:43 -0000 1.11
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000,2002 The Apache Software Foundation. All rights
+ * Copyright (c) 2000,2002-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -56,12 +56,9 @@
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.Execute;
import org.apache.tools.ant.types.Commandline;
-
-
-
-
/**
* Performs a ClearCase Update command.
*
@@ -151,7 +148,7 @@
System.out.println(commandLine.toString());
result = run(commandLine);
- if (result != 0) {
+ if (Execute.isFailure(result)) {
String msg = "Failed executing: " + commandLine.toString();
throw new BuildException(msg, getLocation());
}
1.22 +1 -1
ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java
Index: NetCommand.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- NetCommand.java 18 Jul 2003 14:21:23 -0000 1.21
+++ NetCommand.java 25 Jul 2003 12:14:43 -0000 1.22
@@ -251,7 +251,7 @@
}
executable.setCommandline(commandLine.getCommandline());
err = executable.execute();
- if (err != 0) {
+ if (Execute.isFailure(err)) {
if (failOnError) {
throw new BuildException(title + " returned: " + err,
owner.getLocation());
} else {
1.27 +1 -1
ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java
Index: BorlandDeploymentTool.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- BorlandDeploymentTool.java 19 Jul 2003 11:20:16 -0000 1.26
+++ BorlandDeploymentTool.java 25 Jul 2003 12:14:43 -0000 1.27
@@ -460,7 +460,7 @@
log(commandline.describeCommand(), Project.MSG_DEBUG);
execTask.setCommandline(commandline.getCommandline());
int result = execTask.execute();
- if (result != 0) {
+ if (Execute.isFailure(result)) {
String msg = "Failed executing java2iiop (ret code is "
+ result + ")";
throw new BuildException(msg, getTask().getLocation());
1.2 +1 -1
ant/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJDoc.java
Index: JJDoc.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJDoc.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- JJDoc.java 23 Jul 2003 14:12:12 -0000 1.1
+++ JJDoc.java 25 Jul 2003 12:14:43 -0000 1.2
@@ -194,7 +194,7 @@
process.setCommandline(cmdl.getCommandline());
try {
- if (process.execute() != 0) {
+ if (Execute.isFailure(process.execute())) {
throw new BuildException("JJDoc failed.");
}
} catch (IOException e) {
1.24 +1 -1
ant/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java
Index: JJTree.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- JJTree.java 25 Jul 2003 09:44:49 -0000 1.23
+++ JJTree.java 25 Jul 2003 12:14:43 -0000 1.24
@@ -290,7 +290,7 @@
process.setCommandline(cmdl.getCommandline());
try {
- if (process.execute() != 0) {
+ if (Execute.isFailure(process.execute())) {
throw new BuildException("JJTree failed.");
}
} catch (IOException e) {
1.15 +1 -1
ant/src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java
Index: AbstractMetamataTask.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- AbstractMetamataTask.java 19 Jul 2003 11:20:19 -0000 1.14
+++ AbstractMetamataTask.java 25 Jul 2003 12:14:43 -0000 1.15
@@ -246,7 +246,7 @@
log(cmdl.describeCommand(), Project.MSG_VERBOSE);
process.setCommandline(cmdl.getCommandline());
try {
- if (process.execute() != 0) {
+ if (Execute.isFailure(process.execute())) {
throw new BuildException("Metamata task failed.");
}
} catch (IOException e) {
1.20 +1 -1
ant/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java
Index: MParse.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- MParse.java 19 Jul 2003 08:11:05 -0000 1.19
+++ MParse.java 25 Jul 2003 12:14:43 -0000 1.20
@@ -183,7 +183,7 @@
log(cmdl.describeCommand(), Project.MSG_VERBOSE);
process.setCommandline(cmdl.getCommandline());
try {
- if (process.execute() != 0) {
+ if (Execute.isFailure(process.execute())) {
throw new BuildException("Metamata task failed.");
}
} catch (IOException e) {
1.27 +1 -1
ant/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java
Index: Pvcs.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- Pvcs.java 19 Jul 2003 11:20:20 -0000 1.26
+++ Pvcs.java 25 Jul 2003 12:14:44 -0000 1.27
@@ -236,7 +236,7 @@
fos.close();
}
- if (result != 0 && !ignorerc) {
+ if (Execute.isFailure(result) && !ignorerc) {
String msg = "Failed executing: " + commandLine.toString();
throw new BuildException(msg, getLocation());
}
1.22 +1 -1
ant/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovMerge.java
Index: CovMerge.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovMerge.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- CovMerge.java 19 Jul 2003 11:20:20 -0000 1.21
+++ CovMerge.java 25 Jul 2003 12:14:44 -0000 1.22
@@ -139,7 +139,7 @@
// JProbe process always return 0 so we will not be
// able to check for failure ! :-(
int exitValue = exec.execute();
- if (exitValue != 0) {
+ if (Execute.isFailure(exitValue)) {
throw new BuildException("JProbe Coverage Merging failed ("
+ exitValue + ")");
}
} catch (IOException e) {
1.19 +1 -1
ant/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovReport.java
Index: CovReport.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovReport.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- CovReport.java 19 Jul 2003 11:20:20 -0000 1.18
+++ CovReport.java 25 Jul 2003 12:14:44 -0000 1.19
@@ -300,7 +300,7 @@
log(cmdl.describeCommand(), Project.MSG_VERBOSE);
exec.setCommandline(cmdl.getCommandline());
int exitValue = exec.execute();
- if (exitValue != 0) {
+ if (Execute.isFailure(exitValue)) {
throw new BuildException("JProbe Coverage Report failed ("
+ exitValue + ")");
}
1.18 +1 -1
ant/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Coverage.java
Index: Coverage.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Coverage.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- Coverage.java 18 Apr 2003 23:40:26 -0000 1.17
+++ Coverage.java 25 Jul 2003 12:14:44 -0000 1.18
@@ -331,7 +331,7 @@
log(cmdl.describeCommand(), Project.MSG_VERBOSE);
exec.setCommandline(cmdl.getCommandline());
int exitValue = exec.execute();
- if (exitValue != 0) {
+ if (Execute.isFailure(exitValue)) {
throw new BuildException("JProbe Coverage failed (" +
exitValue + ")");
}
} catch (IOException e) {
1.34 +1 -1
ant/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java
Index: MSVSS.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- MSVSS.java 17 Jul 2003 10:36:28 -0000 1.33
+++ MSVSS.java 25 Jul 2003 12:14:44 -0000 1.34
@@ -222,7 +222,7 @@
int result = 0;
Commandline commandLine = buildCmdLine();
result = run(commandLine);
- if (result != 0 && getFailOnError()) {
+ if (Execute.isFailure(result) && getFailOnError()) {
String msg = "Failed executing: " +
formatCommandLine(commandLine)
+ " With a return code of " + result;
throw new BuildException(msg, getLocation());
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]