ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: Question using @ in exec/arg
Date Fri, 13 Apr 2007 06:47:28 GMT
Hmmmm .... a simple
  <project>
    <echo> @ </echo>
  </project> 
works for me ...


In <macrodef> you have to mask the @ sign because it's starting the reference to an
attribute name.
  <macrodef name="">
    <attribute name="foo"/>
    <sequential>
      <echo> @{foo} prints value of attribute foo </echo>
      <echo> @@ prints simple at-sign </echo>
    </sequential>
  </macrodef>



Jan

>-----Urspr√ľngliche Nachricht-----
>Von: Rebhan, Gilbert [mailto:Gilbert.Rebhan@huk-coburg.de] 
>Gesendet: Freitag, 13. April 2007 08:05
>An: Ant Users List; bkumler@goldengate.com
>Betreff: RE: Question using @ in exec/arg
>
> 
>Hi,
>
>
>-----Original Message-----
>From: Bret Kumler [mailto:bkumler@goldengate.com] 
>Sent: Thursday, April 12, 2007 7:47 PM
>To: Ant Users List
>Subject: Question using @ in exec/arg
>
>/*
>I'm going to use p4 sync @labelname and I was wondering if the @ sign
>will work in the following task.
>[ ... ]
>
>Do I have to single quote the @ sign? 
>*/
>
>I think you have to mask via @@, i.e. see ant manual
>.../manual/CoreTasks/macrodef.html =
>
>"...
>The escape sequence @@ is used to escape @. This allows @{x} to be
>placed
>in the text without substitution of x by using @@{x}. This corresponds
>to the $$
>escape sequence for properties. 
>...
>"
>
>Regards, Gilbert
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message