ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy Lambert <anto...@gmx.de>
Subject Re: ANT Property substutition in log4j.properties
Date Wed, 09 Dec 2009 12:42:56 GMT
Hello Jim,

log4j understands system properties, not ant properties.

So most likely these ANT_ARGS on linux do not set a system property but 
just an ant property. System properties are copied to ant properties, 
but the reverse is not true.

Using ANT_OPTS=-Dwork.dir=somepath should work on both Windows and Linux.

Regards,

Antoine

Jim Garrison wrote:
> When using
>
>     ANT_ARGS="-lib $LOG4J -Dwork.dir=somepath -listener org.apache.tools.ant.listener.Log4jListener"
>
> where $LOG4J points to a directory containing log4j.jar, with a log4j.properties including:
>
>     log4j.appender.LogFile.file=${work.dir}/build.log
>
> On Windows ${work.dir} in log4j.properties resolves to the value passed in ANT_ARGS,
but on Linux it resovles to the empty string, resulting in trying to write the log file into
the root, which of course fails. This is using the exact same binaries of ANT and log4j in
both environments.
> Any ideas what could cause this?
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message