ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose Alberto Fernandez <JFernan...@viquity.com>
Subject RE: Get emacs to find the correct build.xml and automatically pas s it to ant.
Date Thu, 19 Oct 2000 04:20:25 GMT
I GOT IT!!!

Thanks for all of you that gave me pointers.

The included prj.el will set all the arguments necessary to use JDE with
ANT.
There are two variables that control whether you want to use ANT:

 jde-build-use-ant ;; You should set this in your .emacs file
                   ;; This allows some people using ANT and others not
                   ;; If you set it in prj.el, everyone will build with it.

 jde-ant-project-file ;; the name of the buildfile relative to the prj.el
file.
                      ;; defaults to "build.xml" but if different should be
set 
                      ;; on prj.el file.


It works quite well.
If you want to allow additional parameters to ANT, then make
jde-read-make-args non-nil.

Jose Alberto
PS: Maybe someone can make an actual ant-mode out of this. That we can give
with the distribution.

> -----Original Message-----
> From: Barrie Treloar [mailto:Barrie.Treloar@camtech.com.au]
> Sent: Wednesday, October 18, 2000 5:29 PM
> To: 'ant-dev@jakarta.apache.org'
> Subject: RE: Get emacs to find the correct build.xml and automatically
> pas s it to ant.
> 
> 
> On Wed, 18 Oct 2000, Jose  Alberto Fernandez wrote:
> 
> > Barry hi,
> > 
> > I am trying to use your prj.el file for our builds, but 
> since we use CVS
> > and every developer may have checkout the source in a 
> different directory,
> > I wonder if it is possible to specify the location of the build file
> > relative
> > to prj.el itself.
> > 
> > My idea is to checkin on CVS "<TOP>/prj.el" and let then specify the
> > buildfile
> > relative to this location.
> > 
> > Any ideas how to do this?
> 
> [del]
> 
> > > ; The location of the Ant build file.
> > > (make-local-variable 'jde-make-args)
> > > (setq jde-make-args "-f <TOP>/build.xml")
> 
> I dont believe it is possible to specify it relative to the location
> prj.el file because of the above variable value.
> 
> jde-make-args is simply appended to jde-make-program to form the
> command that jde will run to invoke your build.
> 
> Therefore you will get "ant -f <relative path>/build.xml" and this
> will most likely use current working directory of the emacs process as
> the place to start evaluating the relative path name.
> 
> I find this resource to be invaluable when hacking emacs.  My brain is
> not well formed at supporting lisp so I look up all the information I
> need when I need it.
>         http://www.delorie.com/gnu/docs/elisp-manual-20/
> 
> We have two choices in solving this problem.  We can use an
> environment variable for storing the location of TOP or we can use an
> emacs variable for storing TOP.  We can then concatenate the two
> strings together in the prj.el file to specify the correct location.
> 
> I would be suggesting the use of emacs variables so they can be
> quickly changed and so they dont pollute your shell variable space.
> 
> So for a project name project-x we can create an emacs variable called
> project_x_top which defines the developers local location of the
> source tree.
> 
> In each developers .emacs file include:
> 
>         ;; The per developer location of the source tree for project-x
>         (setq project_x_top "<TOP>")
> 
> In the prj.el file change 
> 
>         (setq jde-make-args "-f <TOP>/build.xml")
> to
>         ;; The build file for project-x lives at <TOP>/build.xml 
>         ;; where TOP for project-x is stored in the 
> project_x_top variable
>         (setq jde-make-args (concat "-f " project_x_top 
> "/build.xml") )       
> 
> This will concatenate the strings together to include the value of
> project_x_top to correctly point to the per developer location.
> 
> Hope this helps.
> Barrie
> --
> Barrie Treloar
> ____________________________________________________________________
> 
>   Barrie Treloar                      Phone: +61 8 8303 3300
>   Senior Analyst/Programmer           Fax:   +61 8 8303 4403 
>   Electronic Commerce Division        Email: barrie@camtech.com.au
>   Camtech (SA) Pty Ltd                http://www.camtech.com.au
>  --- Level 8, 10 Pulteney Street, Adelaide SA 5000, Australia. ---
> ____________________________________________________________________
> 
> 


Mime
View raw message