ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <>
Subject Re: cvs commit: ant/src/main/org/apache/tools/ant
Date Mon, 13 Jun 2005 15:38:45 GMT wrote:
> stevel      2005/06/12 16:15:57
>   Modified:    src/main/org/apache/tools/ant/taskdefs
>                src/main/org/apache/tools/ant
>   Added:       src/main/org/apache/tools/ant/taskdefs
>   Log:
>   Little something to make IDE debugging easier; <diagnostics/> prints the diagnostics
out as per -diagnostics.
>   1. Why does Netbeans4.1 keep javax.xml.parsers.SAXParserFactory a secret? SecurityException
handling to Diagnostics to compensate.
>   2. could add output file support, maybe?
>   3. could add task="junit" for detailed task diags instead...

For the curious, this now lets you do targets like


and get the ant -diagnostics output printed to the log. Its an 
interesting way to find out what is going on inside an IDE, such as what 
tasks are there, the classpath, etc.

I had to put some security handling in there as netbeans4.1 doesnt let 
me find out the value of javax.xml.parsers.SAXParserFactory, which is, 
well, surprising. Jesse -is there a particular reason that this is a 

One thing I might like to add is the ability to save to a file (on both 
command line and task)

ant -diagnostics -file something.txt

<diagnostics destFile="something.txt" />

And the component helper diagnostics for individual tasks

ant -diagnostics -task junit

<diagnostics task="junit" />

In this mode, only the task diags are run, and the command fails if the 
task wont instantiate. So you could do

<diagnostics task="junit" failuremessage="fetch junit from" />

which I think would be kind of cool for self-diagnosing build files.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message