ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Charters <mchar...@umich.edu>
Subject console output from ant is slow
Date Fri, 19 Jul 2002 17:59:55 GMT
In my ant buildfile, I have a target to run my java program.  It looks
like this:

  <target name="run"
          description="run the project in GUI mode"
          depends="prepare,compile">
    <java classname="${currentLS}.GUIModel"
          classpath="${classDir}"
          classpathref="classpath"
          fork="true">
      <arg line="${args}"/>
    </java>
  </target>

I need to set fork="true" because a library I use calls System.exit().

My program has quite a bit of debug output to the console, and after a
few seconds of running my program the console output starts lagging
behind what I see in the GUI for my program.

When I try to make the output from the program go to a file, the output
to the file lags behind also (i can stop the output while the program is
running ... and when i do it takes a minute for the output to catch up
with the rest of the program!)

My target to print output to a file looks like this:

  <target name="run"
          description="run the project in GUI mode"
          depends="prepare,compile">
    <echo message="*************************************************"/>
    <echo message="****** Piping debug output to ${debugFile} ******"/>
    <echo message="*************************************************"/>
    <java classname="${currentLS}.GUIModel"
          classpath="${classDir}"
          classpathref="classpath"
          fork="true"
          output="${debugFile}">
      <arg line="${args}"/>
    </java>
  </target>

Am I doing this correctly?  Is this a pretty common way to have a "run"
target?  Is there a better way to tell ant to execute my program?

Any suggestions of workarounds would be greatly appreciated.

Thanks for your help,
-Mike


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message