From 965dcd92c772abf09f10873e792ead1b7ab5cfcc Mon Sep 17 00:00:00 2001 From: Conor MacNeill Date: Sat, 24 Jun 2000 11:03:35 +0000 Subject: [PATCH] Update NetRexxC task to new build events system PR: Obtained from: Submitted by: Matt Foemmel Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267695 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tools/ant/taskdefs/optional/NetRexxC.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java b/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java index 93ae53519..625db87ee 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java @@ -549,13 +549,21 @@ public class NetRexxC extends MatchingTask { 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