ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dale Anson <dan...@germane-software.com>
Subject Re: passing log4j.configuration <sysproperty>
Date Fri, 25 Apr 2003 17:05:00 GMT
I provide an Ant file for installation with one application, but that 
particular application requires Ant anyway, so that doesn't seem 
unreasonable in that case. Otherwise, you'd need to make sure that Ant 
is installed on the users machine. Another option might be ZeroG's 
InstallAnywhere. The Now! version is free and doesn't have any 
restrictions on use. It runs on any platform that Ant runs on. It is 
feature poor compared to the $$$ versions, but might be adequate for 
what you're doing.

Dale

PS I don't work for ZeroG, I've just used InstallAnywhere off and on 
over the past few years, and find it useful for certain applications.

Erik Price wrote:

> 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 build.properties, set this property:
> log.file=distlog.properties
> )
>
> <property name="log.file.path"
>       location="${log.file}"/>
>
> <sysproperty key="log4j.configuration"
>            value="file:${log.file.path}"/>
>
>
> This will evaluate the path of the file, since log4j.configuration is 
> expected to be a URI.
>
>
>
> Erik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>


Mime
View raw message