Posted By

kouphax on 12/22/08


script ant groovy

Versions (?)

Capture AntBuilder OutputStream

 / Published in: Groovy

A simple way to capture the output stream of the AntBuilder class. Useful for parsing remote directories etc.

  2. ant = new AntBuilder()
  3. ant.project.getBuildListeners().each{
  4. it.setOutputPrintStream(new PrintStream(x))
  5. }
  6. ant.echo("goes to my output stream")
  8. x.toString()

Report this snippet  

You need to login to post a comment.