Is it possible to specify logger for ant inside build.xml?

Is it possible to specify Ant listener / logger inside build.xml and not on the command line?

+7
source share
4 answers

Inside the build file, you can use ant api and create an internal task using a scriptdef .
i.e. using groovy:

http://josefbetancourt.wordpress.com/2011/08/18/buildlistener-groovy-scriptdef/ http://octodecillion.com/blog/buildlistener-groovy-scriptdef/

You can also configure the log level inside the assembly file, see:
stack overflow
stack overflow

+4
source

This is not in the assembly file, but you can set the env variable ANT_ARGS to indicate the registrar

http://wiki.apache.org/ant/TheElementsOfAntStyle

+3
source

Take a look at the Recorder task. http://ant.apache.org/manual/Tasks/recorder.html

0
source
 <target name="real-build"> <exec dir="${basedir}" executable="${ant.command}" failonerror="true"> <arg line="-f build-all.xml target ${ant.logger}" /> </exec> </target> 
0
source

All Articles