ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Ant and Emacs
Date Thu, 26 Apr 2001 06:05:59 GMT
Gerald E. Bennett <> wrote:

> Is there anyway to replace the :make command in emacs to use ant?

I think there is a variable for this, yes (warning, this is XEmacs):

  User Option: *Last shell command used to do a compilation; default for next compilation.

If you set this to "ant -find build.xml" and tell JDE to build using
make, you should be done (I'm using something home-brewed and
unreleasable myself).

> Is there any special parsing you need to do with the output so that
> the errors are parsed correctly?

Either invoke ant with the -emacs switch or use something like this
(FAQ is down. otherwise I would have pointed you there):

(require 'compile)
(setq compilation-error-regexp-alist
      (append (list 
               ;; works for jikes
1 2 3)
               ;; works for javac 
               ;; thanks to Barrie Treloar <>
               '("^\\s-*\\[[^]]*\\]\\s-*\\(.+\\):\\([0-9]+\\):" 1 2))

> Has anyone written any modules to do this?

Yes, there've been a couple of them, I always hoped they'd get merged
at some time, so we could include it into the Ant distribution.  At
best you search the archives at for ant-dev and
ant-user - emacs in Subject should work quite well.


View raw message