ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shorn Tolley" <>
Subject Modifying Ant reporting behaviour when javac fails
Date Sun, 02 Jun 2002 15:40:44 GMT
Running an Ant target that uses the 'javac' task from an IDE, specifically
NetBeans or Emacs.

The symptom:
When compiling with Ant and getting a compile error, as well as reporting
the location of the actual syntax errors, Ant also reports the location of
the 'javac' task that (because of the syntax errors) failed.

The problem:
IDEs that scan the output of ant looking for <file>:<line>:<message> type
strings pick up the build failure message as a syntax error, which means
that when you're navigating through the list of errors and you go one too
far (or go to the last one), the IDE will open the build.xml file.
It's not a big deal, it's just annoying.

The solution:
I am of the opinion that Ant should not report the compile failed message in
the format <file>:<line>:<message> but in the format <message>.  So
you will
still see the message, it just won't look like an error with the build file
(which, in this one specific example, it's not).

Let me be clear, I am not saying all build exceptions should be reported
without location info, just this one specific exception thrown in this
particular circumstance.

The code:
It's a one line change in, putting an empty Location into the
BuildException that gets thrown when the CompilerAdapter returns false from
the execute() method.

I have it working on my machine and I've integrated it with NetBeans and it
works great.

What now:
I think this change should be part of Ant, but I don't know what the process
is from here (never worked on an Open Source project before).  I guess the
first step is proving that people other than myself find this really
annoying?  Should I submit a change request in Bugzilla?

This message is a lot of words to justify a one line change isn't it? :)


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

View raw message