You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Kendall Collett <kc...@convio.com> on 2002/07/01 21:44:48 UTC

Re: How do I get rid of the "Compile failed..." message from Ant when the javac task reports erros?

Not sure if you can do the equivalent in NetBeans, but I found I could
change Emacs to do what I wanted.  Basically, I run Ant *without* the -emacs
switch, and make the following change to the compilation-error-regexp-alist
(in my .emacs file):

        ; update error regexps to handle Ant builds
        (require 'compile)
        (setq compilation-error-regexp-alist
          (append (list
             ;; works for jikes

'("^\\s-*\\[javac\\]\\s-*\\(.+\\):\\([0-9]+\\):\\([0-9]+\\):[0-9]+:[0-9]+:"
1 2 3)
             ;; works for javac
             '("^\\s-*\\[javac\\]\\s-*\\(.+\\):\\([0-9]+\\):" 1 2))
          compilation-error-regexp-alist))

That way, emacs will only see the errors that occur in the "javac" task.

Kendall

----- Original Message -----
From: Shorn Tolley
To: "Ant Users List" <an...@jakarta.apache.org>

Date: Sat, 01 Jun 2002 11:53:07 -0700
Subject: Re: How do I get rid of the "Compile failed..." message from Ant
when the javac task reports erros?

Yep, that's basically exactly what happens with NetBeans.
And now that I am trying out IDEA, it's even worse, because IDEA reports the
Ant build messages in a kind of hierarchical tree.  For some reason the IDE
propogates the error message to every level, so the superfluous message
tends to clutter up the display.

So this message interferes with the integration of Ant and multiple IDEs
(Emacs / Xemacs, NetBeans and IDEA)

Does any one know why this message is reported?

----- Original Message -----
From: "Kendall Collett" <kc...@convio.com>
To: "Ant Users List" <an...@jakarta.apache.org>
Sent: Saturday, June 01, 2002 7:20 PM
Subject: Re: How do I get rid of the "Compile failed..." message from Ant
when the javac task reports erros?


> This is also irritating from the emacs perspective in that next-error will
> process the "error" in the build file.  When I have more than a couple of
> compilation errors, I invariably go "one C-x ` too far" and end up
visiting
> the build file.  I've gotten used to killing the buffer about a half
second
> after I do that, but it's still a pain.
>
> Kendall
>
> ----- Original Message -----
> From: "Shorn Tolley" <sh...@hotmail.com>
> To: <an...@jakarta.apache.org>
> Sent: Friday, May 31, 2002 17:31
> Subject: How do I get rid of the "Compile failed..." message from Ant when
> the javac task reports erros?
>
>
> > [...]
> >
> > When I'm compiling a project and I have a syntax error, Ant reports line
> > numbers and all that guff about the error; excellent, fine, that's what
I
> > want.
> > But, it also always outputs the following after outputting information
> about
> > the syntax errors:
> >
> > BUILD FAILED
> >
> > <location>\build.xml:<line number>: Compile failed, messages should have
> > been provided.
> >
> > This message, which looks like Ant is reporting a syntax error within
the
> > actual build file, is really annoying. It's annoying because some IDEs
> > (NetBeans and IDEA specifically, probably others too) will simply assume
> > this message is telling the user about an error in the XML file. When
it's
> > not really, it's telling the user that some target within the file
failed.
> >
> > [...]




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>