ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: Extending JUnit Ant tasks
Date Mon, 11 Jun 2007 10:41:13 GMT
Rebhan, Gilbert wrote:
>  
> Hi,
> 
> -----Original Message-----
> From: Steve Loughran [mailto:stevel@apache.org] 
> Sent: Monday, June 11, 2007 11:41 AM
> To: Ant Users List
> Subject: Re: Extending JUnit Ant tasks
> 
> 
> /*
> [ ... ]
> In them I show an XHTML output that gets streamed out... not only is it 
> viewable without waiting for the end of the run, you can stil XSL over 
> it and a system crash will leave a half complete file. 
> [ ... ]
> /*
> 
> that's the bad thing about xmllogger too, we run our ant scripts similar
> to CruiseControl with a timeout set and xmllogger.
> If a script hits the timeout nothing is written, there's no logfile. If
> it would be written
> as it comes we would have a half complete file, would be fine.
> 
> /*
> [ ... ]
>  But I would like to 
> improve the XML output we generate with
> [ ... ]
> */
> 
> Will there also be a patch for xmllogger available ?
> 

well, sounds like you have to write a new xmllogger. One problem with a 
streaming/flushing logger is that if the process died, the output is 
still invald XML; the XSL engine would bail out.

Better to find out why your scripts are hanging and kill that. I always 
timeout my exec/java and junit runs, and dont have to kill ant itself. 
Have you tried that?

The alternative is for ant to optionally register a signal handler (sun 
java only; would cause trouble on IDEs) and then to shut down more 
gracefully on termination. This is what smartfrog does, though since 
Java6 the javac compiler goes out of its way to tell us off for doing so 
("you are using sun internal apis that may go away in future").

What will be in ant1.7.1 is a 'big project logger' that provides better 
log output for running a big project (with many subant/ant calls) -it 
tells you when you enter and exit child projects, prefixes each target 
with the name of the project, and skips targets which dont do any work 
(though I may make that configurable by an ant property). There is not 
yet any equivalent for the xmllogger, but it is something that could be 
written if you want to help with it.

-steve

-steve

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


Mime
View raw message