ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: null system properties in buildStarted()
Date Thu, 10 Jul 2008 09:38:40 GMT
On Thu, 10 Jul 2008, <> wrote:

> Thanks to Stefan for clarification.  As a workaround I use
> System.getProperty("XmlLogger.level") instead of
> event.getProject().getUserProperty("XmlLogger.level") to get the
> desired logging level.  The only problem with this approach is that
> I have to call Ant via java call like this:

> "%JAVA_HOME%\bin\java.exe" -classpath
> VCS.jar;%ANT_HOME%/lib/ant-launcher.jar;%CLASSPATH%;%ANT_HOME%/lib/ant.jar;
> -DXmlLogger.file=build_test_log.xml -DXmlLogger.level=WARN
> -Dant.home=%ANT_HOME% -listener
> com.kvazarmicro.umc.vcs.utils.CustomXmlLogger

you could set the ANT_OPTS environment variable to
"-DXmlLogger.file=build_test_log.xml -DXmlLogger.level=WARN" and
ANT_ARGS to "-listener com.kvazarmicro.umc.vcs.utils.CustomXmlLogger"
in order to save the typing.  Running "ant should work then.

On Unix you'd put those two variables into ~/.ant/ant.conf and forget
about them.  I think on Windows you can do something equivalent with
antrc_pre.bat in whatever Windows considers to be your home directory,
but I've never used that (I'm running the Unix script in Cygwin's bash
when using windows).


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message