ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose Alberto Fernandez <>
Subject RE: cvs commit: jakarta-ant .cvsignore
Date Mon, 27 Nov 2000 20:22:53 GMT
> From: Peter Donald []
> At 06:56  25/11/00 -0800, you wrote:
> >--- Peter Donald <> wrote:
> >
> >> To anyone whos anything about bat files is there a way to make the
> >> ant.bat
> >> behave the same as ant shell script under *nix. 
> Specifically I want to
> >> auto-detect ANT_HOME from location of script. So if the 
> script is at
> >> E:/blah/blee/ant/bin/ant.bat I want to automagically set 
> >> E:/blah/blee/ant. If we could do that then I know of quite 
> a few projects
> >> that could dump the need for a seperate build.[sh|bat]
> >
> >Along those lines (and I can't believe I'm asking this) but 
> does anyone out
> >there know where there is an online reference for the .bat 
> file syntax? I
> >tried " --help" and "info .bat" and they just 
> didn't get me
> >anywhere :-]
> >
> >Better yet, has anyone seen a more portable way of launching 
> java programs
> >on all platforms? Clould we tweak the Ant ClassLoader to do 
> the .jar file
> >searching after startup, so that "java -jar ant.jar" really 
> does work? What
> >do the MacOS people out there do?
> We can only get this to work easily on 1.2+ platforms (as 1.2 
> was the one
> that introduced the manifest entries to autolaunch jars). We 
> could possibly
> get a launcher built for 1.1 that mimicks that bahviour via extensive
> reflection and a command line like "java -classpath ant.jar AntMain".
> However there is two real problems; 
> * We need to know about the ant bin directory to pick up the
> antRun.[sh|bat] and this usually needs ...
> * Access to environment variables (ie ANT_HOME|ANT_OPTS). 

This reminds me that there is a pending "BUG", in my opinion, with
respect to the <exec*> tasks and their definition of nested <env>.
Today, <env> replaces ALL environment variables with the ones specified,
which is USELESS to say the least.

There was some discussion in the past on how to overcome this. It was not
preaty, and it was not cheap, but it definetely was possible. 
I think we should look at this again.

Jose Alberto

View raw message