Hi Douglas,

This is also kind of a hack, but basically I advise the function
`compile-internal' to put the value of `jde-global-classpath' in $CLASSPATH
for the duration of the compilation.  Has anyone else solved this problem of
propagating jde-global-classpath to compiles more elegantly than this?

(defadvice compile-internal (around njs-apply-jde-global-classpath-to-make
                                    compile activate)
  "Hack compile-internal to apply the current jde-global-classpath as
the make process's classpath.  Also force load of jde project if not
already loaded."
  (let ((process-environment process-environment))
    (if (and (string-equal "default" jde-project-name)
             (jde-find-project-file default-directory))
        (jde-load-project-file))
    (setq process-environment (remove-if
                               (lambda (x)
                                 (string-match "^CLASSPATH=" x))
                               process-environment))
    (add-to-list 'process-environment
                 (concat "CLASSPATH=" (jde-global-classpath)))
    ad-do-it))

Now if you're going to need several different classpaths depending on the
target, you're probably best off coding those classpaths into the ant build
file.

Best,

/Nick

-----Original Message-----
From: Douglas WF Acheson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 18, 2001 8:29 AM
To: [EMAIL PROTECTED]
Subject: jde-ant


Hello,

   After finally moving to ant to build my java apps I would like to
use the jde-ant feature (new name jmode-ant :-)  I have played with it
for the last few days.  I found a potential problem using XEmacs.  I
had to add the following code
from
  (let ((temp last-nonmen-event))
to
  (let ((temp (if (boundp 'last-nonmenu-event)
                  last-nonmen-event
                  nil)))
to avoid getting a
   Symbol's value as variable is void: last-nonmenu-event
error.

Anyways, it works -- if someone can let me know what I can do to not
use this hack, that would be good.

  Another interesting problem, I have custom targets in the ant build
project.  How do I adjust the classpath for ant so I can add my jar
files.

  Any help would be very appreciated.

Douglas WF Acheson


=====
Douglas WF Acheson

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

Reply via email to