ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Price <>
Subject passing log4j.configuration <sysproperty>
Date Fri, 25 Apr 2003 16:15:01 GMT
Do a lot of people use Ant instead of providing a shell script for 
distributing their Java programs?

I have an executable JAR, but it seems that for those who don't like to 
construct a lengthy command line (my app requires multiple arguments), 
it seems like it would be both easier and cross-platform to use an Ant 
script and let the user specify all of the arguments in a properties 
file (which the ant script can read).

Just curious if there are any big gotchas to watch out for.  The only 
one I have found so far (testing on Win2k/Cygwin) is that, unlike the 
"location" attribute of <property>, the "value" attribute of a 
<sysproperty> does not evaluate its contents into a file path.  This is 
actually probably a good idea, but I can't find documentation on 
accepted attributes of <sysproperty> so I am unsure if there is a 
"location" attribute.

The workaround is this:

(in, set this property:

<property name="log.file.path"

<sysproperty key="log4j.configuration"

This will evaluate the path of the file, since log4j.configuration is 
expected to be a URI.


View raw message