ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Iván Pérez Domínguez <ivanperezdoming...@gmail.com>
Subject Re: AW: Quiet output
Date Thu, 12 Oct 2006 08:24:50 GMT
Jan.Materne@rzf.fin-nrw.de wrote:
> Set the environment variabe ANT_OPTS to "-emacs" or "-quiet".
> 
Thanks, that was a great starting point. Actually, the name of the
variable is ANT_ARGS.

OK, now my question has turned into "How can I set an environment
variable from inside an build.xml file?"

I tried this:

<property environment="env" />
<target name="test">
   <property name="env.ANT_ARGS" value="-quiet -emacs" />
   <ant dir="tests" />
</target>

But it didn't work. Any idea?

> Jan 
> 
>> -----Ursprüngliche Nachricht-----
>> Von: Iván Pérez Domínguez [mailto:ivanperezdominguez@gmail.com] 
>> Gesendet: Donnerstag, 12. Oktober 2006 08:57
>> An: Ant Users List
>> Betreff: Re: Quiet output
>>
>> OK, that's closer to what I want but, is there any way to 
>> force this -emacs flag to be enabled even if the user didn't 
>> write "ant -quiet -emacs"? Maybe the ant task should allow 
>> options like that to be passed to ANT.
>>
>> Ninju Bohra wrote:
>>> You might want to look at the -emacs command line option to surpress 
>>> the 'prefixing' that appears on the output
>>>
>>> ----- Original Message ----
>>> From: Iván Pérez Domínguez <ivanperezdominguez@gmail.com>
>>> To: user@ant.apache.org
>>> Sent: Wednesday, October 11, 2006 2:54:30 PM
>>> Subject: Quiet output
>>>
>>>
>>> I'm writing a build.xml file that tests a program. Before 
>> using ANT, I 
>>> had a bash script that printed the results like init.d 
>> scripts do when 
>>> started/stopped. For instance, for an input file to be 
>> tested, called 
>>> mtp.mtp, it printed something like
>>>
>>> mtp.mtp                                             [OK]
>>>
>>> if everything went ok, and
>>>
>>> mtp.mtp                                             [!!]
>>>
>>> if something went wrong. In both cases, the real output was 
>> saved in a 
>>> log file.
>>>
>>> Now I'm using ANT, I'd like it to be the same way, but the output 
>>> happens to be way too verbose unless ANT is called with -quiet. Is 
>>> there any way to force this quiet flag, or to hide the 
>> commands output?
>>> I don't like ANT to prefix the output with the command that produced 
>>> it either. For instance, if I write
>>>
>>> <echo>Message</echo>
>>>
>>> ant prints something like
>>>
>>> [echo] Message
>>>
>>> Is there any way to hide that too?
>>>
>>> Cheers.
>>>
>>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 


Mime
View raw message