tags:

views:

789

answers:

3

Can anyone suggest to me the best way to capture the output from an ANT command?

I'm writing some routing tests for sun spot devices. The command itself returns network statistics. I'm trying to write something which will dump all these results into a more visual application.

I'm on Windows Vista.

Thanks

+1  A: 

You can define a custom Ant logger which will receive all Ant output. With that you can do whatever you want with the output.

JesperE
+1  A: 

Simply use the "-verbose" flag and designate a file for the command line output using ">"?

For example:

ant -verbose > output.txt
Jonathan
+2  A: 

Use -logfile <file> option to write the output to a file. Like @jespere said, you can get even more control by implementing your own logger or listener.

jelovirt