You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by co...@locus.apache.org on 2000/06/24 13:03:36 UTC
cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional NetRexxC.java
conor 00/06/24 04:03:36
Modified: src/main/org/apache/tools/ant/taskdefs/optional
NetRexxC.java
Log:
Update NetRexxC task to new build events system
Submitted by: Matt Foemmel <mp...@ThoughtWorks.com>
Revision Changes Path
1.2 +9 -1 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java
Index: NetRexxC.java
===================================================================
RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- NetRexxC.java 2000/03/19 17:57:03 1.1
+++ NetRexxC.java 2000/06/24 11:03:35 1.2
@@ -549,13 +549,21 @@
currentProperties.put("java.class.path", classpath);
try {
+ StringWriter out = new StringWriter();
int rc = COM.ibm.netrexx.process.NetRexxC.main(
- new Rexx(compileArgs), new PrintWriter(project.getOutput()));
+ new Rexx(compileArgs), new PrintWriter(out);
if (rc > 1) { // 1 is warnings from real NetRexxC
+ project.log(out.toString(), Project.MSG_ERR);
String msg = "Compile failed, messages should have been provided.";
throw new BuildException(msg);
}
+ else if (rc == 1) {
+ project.log(out.toString(), Project.MSG_WARN);
+ }
+ else {
+ project.log(out.toString(), Project.MSG_INFO);
+ }
} finally {
// need to reset java.class.path property
// since the NetRexx compiler has no option for the classpath