ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@locus.apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional NetRexxC.java
Date Sat, 24 Jun 2000 11:03:36 GMT
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 <mpfoemme@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
  
  
  

Mime
View raw message