ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@mad.scientist.com
Subject Ant from Emacs
Date Wed, 19 Jul 2000 07:54:51 GMT
Hi,

My box has died and in the process of resurecting it but
there has a few people asking for how I run it from emacs. I
do something like the following (Note this is from memory so
may not work 100% but should).


(defun jprj-compile()
  "Compile the project"
  (interactive)
  (let ( (old-directory default-directory) )
    (setq default-directory jprj-base-path)
    (compile jprj-compile-command)
    (setq default-directory old-directory)
    )
  )

(defun jprj-run()
  "Run main application of the project"
  (interactive)
  (let ( (old-directory default-directory) )
    (setq default-directory jprj-base-path)
    (shell-command jprj-run-command "*jprj-run*")
    (setq default-directory old-directory)
    )
  )

(setq jprj-base-path "/home/donaldp/RHI/gecctt/")
(setq jprj-compile-command "ant")

(define-key jde-mode-map "\C-c\C-d\C-c" 'jprj-compile)
(define-key jde-mode-map "\C-c\C-d\C-r" 'jprj-run)

Put the above in your .emacs file after you have loaded jde
and all should be good. I also had a function to
automatically find base-path based on current jde project
based on jde code but I won't find that till I fix my
machine :P. 

The above assumes you have jde and binds build to control-c
control-d control-c and run to control-c control-d
control-r.

For jikes you can add a new parser like was already posted
(which I didn't know you could do) or else you can add +E to
jikes commandline by adding   

<property name="build.compiler.emacs" value="on"/>

to build files. Anyway off to download more RPMs ...


Cheers,

Pete

*--------------------------------------------------*
| Latrobe University,     |                        |
| Bundoora, Australia     | Does the name 'Pavlov' |
| Office: PW220           |    ring a bell ?       |
| Ex: 2503                |                        |
*--------------------------------------------------*


Mime
View raw message