Thank you for clearing this up, Jan. Although one would think that the ANT task should be able to run in a separate process in order to handle such things.
Also thanks for your example code, but I think this short EXEC task is even simpler: <exec dir="${ otherBuildFolderPath}" executable="${ant-command}" failonerror="true"> <arg value="-q"/> <arg value="clean"/> <arg value="ear"/> </exec> /Jimi > -----Ursprungligt meddelande----- > Från: Jan Matèrne (jhm) [mailto:apa...@materne.de] > Skickat: den 3 juli 2013 14:33 > Till: 'Ant Users List' > Ämne: AW: Sending options to ANT task? Specifically the -q option to make it > quiet > > You cannot reconfigure the logger Ant uses. > You have to start a complete new Ant instance. > > Jan > > sample: > > <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> > > > <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"/> > </ant2> > </target> > > <macrodef name="ant2"> > <attribute name="antfile"/> > <attribute name="target"/> > <element name="ant2-args" implicit="yes"/> > <sequential> > <java classname="org.apache.tools.ant.Main"> > <arg value="@{target}"/> > <ant2-args/> > </java> > </sequential> > </macrodef> > > </project> > > > -----Ursprüngliche Nachricht----- > > Von: jimi.hulleg...@svensktnaringsliv.se > > [mailto:jimi.hulleg...@svensktnaringsliv.se] > > Gesendet: Mittwoch, 3. Juli 2013 09:48 > > An: user@ant.apache.org > > 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 (http://ant.apache.org/manual/Tasks/ant.html). 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: user-unsubscr...@ant.apache.org For additional > commands, e-mail: user-h...@ant.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org