Date: Fri, 18 Jul 2008 11:41:53 +0200
Subject: [Cruisecontrol-devel] nested ant call through java: how to
preserve progress?
To: cruisecontrol-devel@...
Hello,
I post this question to the developer list because I think it is rather
a development issue.
Following scenario: we build our projects through eclipse PDE-build.
This works so far, I even could establish a working CC 2.7.2 with
progress on the main status page: providing the AntProgressLogger was a
bit tricky, though.
The problem now is that our build file (the one I call through CC) is
calling another build file but through a java call (basically an eclipse
call with ant-syntax). From that point, I see the progress messages like
"ccAntProgress -- ..." at the console, but the progress at the web page
remains at the last called target of the origin build file (which is
quite generic). I noticed during integrating the AntProgressLogger that
the CC process ant the launched ant process are connected through a pipe
(STDIN of CC is connected to STDOUT of ant). I unfortunatly don't have
the faintest idea how to pipe the output of the launched sub-process to
the parent process. Is there a point I'm missing?
Yours,
Frank
Hi Frank,
I don't think you are missing anything, and reading STDOUT is exactly
how the progress messages work for the AntBuilder.
Maybe you could add your own Ant Listener/Logger to the "another build
through java call" that would read and forward the STDOUT of the
"another build" to the STDOUT of the "build called through CC"? I'm not
sure how exactly to set that up - more of an Ant trick than a CC thing -
but as long as the output makes it to the "build called through CC" it
should work.
You might want to extend the AntProgressLogger in some way (or aleast
reference AntProgressLogger.MSG_PREFIX_ANT_PROGRESS) to ensure the
format of the STDOUT messages (prefixed with ""ccAntProgress -- ") is
correct. See AntProgressLogger for details.
Please let us know how this goes. I'm curious about chaining STDOUT like
this, as it seems there may be other uses for such a trick... We may
even want to refactor the AntProgressLogger stuff to make it easier to
do this.
Dan
|