Browse Source

Update NetRexxC task to new build events system

PR:
Obtained from:
Submitted by:	Matt Foemmel <mpfoemme@ThoughtWorks.com>
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267695 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 25 years ago
parent
commit
965dcd92c7
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java

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

@@ -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


Loading…
Cancel
Save