ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Matèrne (jhm) <>
Subject AW: Sending options to ANT task? Specifically the -q option to make it quiet
Date Wed, 03 Jul 2013 12:32:32 GMT
You cannot reconfigure the logger Ant uses.
You have to start a complete new Ant instance.



<project default="test">

    <target name="print">
        <echo level="info"  message="1-info"/>
        <echo level="error" message="2-error"/>
        <echo level="info"  message="3-info"/>
    <target name="test">
        <echo level="info" >Call via 'ant'</echo>
        <ant target="print"/>
        <echo level="info" >Call via 'java'</echo>
        <ant2 antfile="./build.xml" target="print">
            <arg value="-q"/>
    <macrodef name="ant2">
        <attribute name="antfile"/>
        <attribute name="target"/>
        <element name="ant2-args" implicit="yes"/>
            <java classname="">
                <arg value="@{target}"/>

> -----Urspr√ľngliche Nachricht-----
> Von:
> []
> Gesendet: Mittwoch, 3. Juli 2013 09:48
> An:
> Betreff: Sending options to ANT task? Specifically the -q option to
> make it quiet
> Hi all,
> I have a build file that in turn calls another build file, using the
> ANT task ( However, I want
> to make that second build file run in "quiet mode", ie just as if I had
> triggered it from a command line with the "-q" option. How can I do
> that using the ANT task? I fail to find any documentation on how to
> send options like this with the ANT task.
> I have tried various things using the property tag, with no success,
> like this:
> <ant dir="${otherBuildFolderPath}" inheritAll="false">
>                       <target name="clean" /> <target name="ear" />
> <property name="-q" value="" /> <property name="" value="-q" />
> <property name="quiet" value="true" /> </ant>
> I also tried this, but it resulted in an error:
> <ant dir="${otherBuildFolderPath}" inheritAll="false">
>                       <target name="clean" /> <target name="ear" />
> <arg value="-q"/> </ant>
> Any help is appreciated.
> Regards
> /Jimi

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

View raw message