[EMAIL PROTECTED] wrote:
stevel 2005/06/12 16:15:57
Modified: src/main/org/apache/tools/ant/taskdefs defaults.properties
src/main/org/apache/tools/ant Diagnostics.java
Added: src/main/org/apache/tools/ant/taskdefs DiagnosticsTask.java
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
<diagnostics/>
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
secret?
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
http://junit.org/" />
which I think would be kind of cool for self-diagnosing build files.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]