Re: Jumping to errors using jde-ant-build

Carlos Konstanski <[email protected]> Thu, 17 May 2007 23:11:40 -0600 (MDT)
Newsgroups gmane.emacs.jdee
Message-ID <[email protected]>
On Thu, 17 May 2007, Jack Donohue wrote:

> Date: Thu, 17 May 2007 21:15:12 -0700
> From: Jack Donohue <[email protected]>
> To: [email protected]
> Cc: [email protected]
> Subject: Re: Jumping to errors using jde-ant-build
> 
> [email protected] wrote:
>>  When compiling, the buffer splits, and I get the compilation buffer on the
>>  bottom.  When an error occurs, the compilation stops, and the top buffer
>>  switches from my source code to the build.xml file, in the javac task.  Is
>>  there some way I can navigate the errors instead of this behaaviour?
>> 
>
> I think you might need to set your jde-ant-args to "-emacs"

I'm not sure this is a necessity, but it is a great idea.  I found an
old java project of mine that worked under jde, even without "-emacs".
I do use it nowadays.

I think the key lies in giving jde-compile-option-sourcepath, and
possibly jde-sourcepath, a list of all your source folders.

Does your build.xml rely on -D options being passed in?  Add these to
jde-ant-args.

Try these settings.  These will work for a project that runs in
tomcat:

;; ant settings:
'(jde-ant-complete-target t)
'(jde-ant-enable-find t)
'(jde-ant-home "/usr/share/ant-core")
'(jde-ant-invocation-method (quote ("Java")))
'(jde-ant-program "/usr/bin/ant")
'(jde-ant-read-target t)
'(jde-ant-use-global-classpath nil)
'(jde-build-function (quote (jde-ant-build)))
'(jde-ant-working-directory "/home/me/project/WEB-INF")
'(jde-ant-args (concat "-emacs"))

;; compiler settings:
'(jde-compile-option-sourcepath "/home/me/project/WEB-INF/src")
'(jde-compile-option-classpath
    (list
      "/home/me/project/WEB-INF/classes"
      (concat javaHome "/jre/lib/plugin.jar")
      (concat javaHome "/lib/tools.jar")
      (concat tomcatHome "/bin/bootstrap.jar")
      "/home/me/project/WEB-INF/lib/jar1.jar"
      "/home/me/project/WEB-INF/lib/jar2.jar"))
'(jde-compile-enable-kill-buffer t)
'(jde-compile-option-debug (quote ("all" (t t nil))))
'(jde-compile-option-directory (car classpath))
'(jde-compile-option-hide-classpath t)
'(jde-compile-option-optimize nil)
'(jde-compiler (quote ("javac" "")))
'(jde-jdk (list "1.6"))
'(jde-jdk-registry (quote (("1.6" . "/etc/java-config-2/current-system-vm"))))

Carlos Konstanski