ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Price <>
Subject Re: passing log4j.configuration <sysproperty>
Date Fri, 25 Apr 2003 18:20:45 GMT

Rosendahl Sten - stro wrote:
> Why not bundle Ant with the application, together with a wrapper script to
> trigger the Ant script?
> And why not use Ant's Input task to ask for installation properties too?
> This would be a real advantage and platform-independent too (input are not
> supported by Windows shells).

These are all great ideas, thanks to everyone who responded -- actually 
in this one case I am fortunate that I (or ideally someone who is 
conversant with Ant and Java) will be the one installing the software, 
so I can make sure that the Ant libraries are provided.  If I had to 
ship the Ant libraries then the above is a great idea too.  I just want 
to avoid writing a batch file, and see if the concept works.

It works great in my own testing, and in fact is a *lot* easier than 
writing a bash shell script.  With the bash shell script, half of the 
work is laying the infrastructure (the script trying to orient itself in 
the directory tree and "discover" what paths are needed to access the 
lib directory, etc).  With Ant, this is all done relative the the 
script's basedir.  That right there is pretty priceless.  The other 
advantage is the one mentioned in JDWA, which is that you can build a 
class path using patterns (whereas in a bash script you'd have to query 
the contents of the lib directory and then build a string 
representation).  One of the best advantages, though, is being able to 
use properties files so users don't have to edit shell scripts.  Yeah, a 
shell script could parse one too, but it's more work.

The only drawback I see so far is that you have to call "ant", rather 
than some custom application name.


View raw message