ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Svetlin Stanchev" <>
Subject Logging/run-time info best practices? [WAS: RE: environment variable]
Date Thu, 31 Jul 2003 10:40:48 GMT
> env.ANT_ARGS is just a "dead" copy of the environment 
> variable ANT_ARGS. Properties are immutable, so you cannot 
> change env.ANT_ARGS once set. Even if you could, it would not 
> change the logging level of your build.
> When you start ant from the command line, the logging level 
> is set by the command line. The default is INFO. 

A-ha, now I start to understand.
If I don't set any ANT_ARGS at the command line, they are still set to
some default values, and of course, cannot be overriden (due to the

This is different from a user environment variable not set in the
environment. This one can be set in the build file, for instance I do:

  <target name="setrootproperties">
    <!-- Load environment settings -->
    <property environment="env"/>
    <!-- if following vars are not set in env, will be overriden by
defaults -->
    <property name="env.BUILD_ROOT" location="${basedir}"/>
    <property name="build.root" location="${env.BUILD_ROOT}"/>
    <echo> Build root is: ${build.root}</echo>

[d:\cleanstart\buildroot]ant setrootproperties
Buildfile: build.xml

     [echo]  Build root is: D:\CleanStart\buildroot

Total time: 1 second

OK, then my question would be rather:
"What are the best practices for different build user groups like
developers, support, release managers or simply for debug output?" 
How does one control the amount of outputed build run info on the screen
with Ant means (preferably avoiding using outside settings, like
environment, wrappers, or command-line options)?


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

View raw message