How can I enable the AnsiColorLogger Apache Ant built-in logger by default without running manually command ant -logger org.apache.tools.ant.listener.AnsiColorLogger
or adding the environment variable ANT_ARGS
?
I tried to run the command from the ant build.
build.xml
<exec dir="${sdk.dir}" executable="cmd">
<arg value="${sdk.dir}" />
<arg value="AnsiColorLogger.cmd" />
</exec>
AnsiColorLogger.cmd
START -logger org.apache.tools.ant.listener.AnsiColorLogger
Then I run the ant
command to compile my project but the logs are not colored.
Fuiba@FUIBA D:\DEV\TEST\proj
> ant
Buildfile: D:\DEV\TEST\proj\build.xml
Trying to override old definition of task for
[exec] Microsoft Windows [Versione 10.0.10240]
[exec] (c) 2015 Microsoft Corporation. Tutti i diritti sono riservati.
[exec]
[exec] Fuiba@FUIBA D:\DEV\TEST\proj
[exec] >
Instead when I run ant -logger org.apache.tools.ant.listener.AnsiColorLogger
it works.