Oops ... didn't quite change it correctly... try this:
 
(defun jde-build-ant-command (target more-args)
  "Constructs the java ant command."
  (let (ant-command)
    (setq ant-command
   (concat jde-ant-program " -D" buffer-file-name)) ;; <--- NOTE THIS LINE!!!

    (if (not (string= jde-ant-buildfile ""))
 (setq ant-command (concat ant-command "-buildfile " jde-ant-buildfile " ")))

    (if (not (string= target ""))
 (setq ant-command (concat ant-command target " ")))

    (if (not (string= jde-ant-args ""))
 (setq ant-command (concat ant-command jde-ant-args " ")))

    (if (not (string= more-args ""))
 (setq ant-command (concat ant-command more-args " ")))
 

    ant-command))

This effectively adds -D<path/to/current/buffer> to the ant execution command.

HTH

Jason
 

Kevin Jones wrote:

> Hmmm..... You could create a simple ant build file that accepts
> the name of
> your file as an input variable...
>

I already have this - I can do ant -DsomeFile.java, and it will compile that
file. What I want is to be able to pass the file I am currently editing to
ant when I'm usinjg JDE/emacs,

Kevin Jones
DevelopMentor
www.develop.com

> -----Original Message-----
> From: Jason Stell [mailto:[EMAIL PROTECTED]]
> Sent: 16 January 2001 13:17
> To: Kevin Jones
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: JDE and ant?
>
>
> Kevin
>
> Hmmm..... You could create a simple ant build file that accepts
> the name of
> your file as an input variable...
>
> But I'm not sure this is really what you want to be using Ant to do...
>
> Ant, like Make, is a very useful tool for controlling _project_
> builds, not so
> much for compiling individual files (unless you only have 1 file in your
> project... :) ).
>
> I suggest sticking with the normal jde-compile functionality for compiling
> individual files, and using Ant to manage the project as a whole.
>
>
> Regards,
> Jason
>
> Kevin Jones wrote:
>
> > Jason,
> >
> > this looks pretty cool. What I'm also trying to do is get JDE to compile
> > using ant. To do this I need to replace what JDE thinks of as
> the compiler
> > (javac) with ant, then pass ant the current file name as a property, so
> > ant -Dfiletocompile.java. Is there any way I can get jde to do this?
> >
> > Kevin Jones
> > DevelopMentor
> > www.develop.com
> >
> > > -----Original Message-----
> > > From: Jason Stell [mailto:[EMAIL PROTECTED]]
> > > Sent: 12 January 2001 14:01
> > > To: [EMAIL PROTECTED]
> > > Cc: [EMAIL PROTECTED]
> > > Subject: Re: JDE and ant?
> > >
> > >
> > > Raman
> > >
> > > FWIW-- I've attached jde-ant.el, which I created a few months back. It
> > > may or may not be useful to you...
> > >
> > > Regards,
> > > Jason
> > >
> > > "T. V. Raman" wrote:
> > >
> > > > I've started playing with ant --this is the build system
> > > > used by the various java.apache projects --and it is very
> > > > nice.
> > > > anyone out there writing jde helpers for ant integration?
> > > > It may not require much --ant consumes a buld.xml file and
> > > > does its work happily --
> > > >
> > > > --
> > > > Best Regards,
> > > > --raman
> > > > ------------------------------------------------------------
> > > >
> > > > IBM Research: Human Language Technologies
> > > > Phone:        1 (408) 927 2608
> > > > Fax:        1 (408) 927 3012
> > > > Email:        [EMAIL PROTECTED]
> > > > WWW:      http://www.cs.cornell.edu/home/raman
> > > > PGP:         http://cs.cornell.edu/home/raman/raman.asc
> > > > Snail:        IBM Almaden Research Center,
> > > >               650 Harry Road
> > > >               San Jose 95120
> > >
> > >
>
>

begin:vcard 
n:Stell;Jason
tel;pager:800-724-3329 PIN 382-8028
tel;work:(703) 471-2529
x-mozilla-html:FALSE
url:http://www.intelixinc.com
adr:;;;;;;
version:2.1
email;internet:[EMAIL PROTECTED]
title:Consultant (Intelix, Inc.)
fn:Jason Stell
end:vcard

Reply via email to