ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron <aa...@acm.org>
Subject Re: ANT & Emacs
Date Fri, 01 Dec 2000 09:49:13 GMT
I haven't used emacs in years (wait, wait, come back), so I hope this
makes sense in the emacs world.

Whether I'm using make or ant or doing anything similar, I like to
create a perl script that sets up my environment, including all
environment variables and the classpath, etc.  The perl script passes
its arguments on to ant or make or java or whatever, and I don't have to
clutter up my general environment.

The key is that, just before the perl script executes ant or whatever,
you call perl's chdir function, which puts the script's current working
directory to whatever directory you need to be in.

So from whatever buffer you happen to be in, you call the perl script
that calls ant, rather than ant directly.

And I guess you'd put your perl script in your path so you didn't have
to fully qualify its invocation.

The nice thing about perl for this purpose, rather than bash or
command.exe, is that you can get perl to handle path variable separators
(: or ;) and file path separators (/ or \) in a platform neutral way, so
your setup perl script should be cross platform.  This is especially
nice with ant, since ant is java and therefore cross platform itself.

Someone else tonight mentioned their cross platform build problem, where
they have an extra directory on one platform or another.  Perl setup
scripts can manage this for you too.

Christian.Lauer@deka.lu wrote:
> 
> Hi,
> 
> I'm using ant in a project and I'm very satisfied with it and it's strong
> capabilities. Nice job so far!!
> 
> My editor of choice is gnu emacs ;-).
> 
> My problem on that combination is, that I always have to switch to a buffer
> that I'm not able to simply invoke ant by the compile command in emacs,
> because the build.xml is only in the root directory of the project. So when
> I like to build, I always have to switch to the build.xml (or anothe file in
> its directory) and invoke the compile command on emacs. This is not very
> convinient. Does anybody know a better solution?
> 
> Regards,
> Christian
> 
> DekaBank (Luxemburg) S.A.
> 6C, route de Trèves
> L-2633 Senningerberg
> 
> Tel.: (00352) 3409-2178
> Fax.: (00352) 3409-2551
> EMail: Christian.Lauer@deka.lu

Mime
View raw message