ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: property expansion: expected behaviour?
Date Wed, 24 Apr 2002 15:33:11 GMT
On Wed, 24 Apr 2002, stephan beal <stephan@wanderinghorse.net> wrote:

> So any character data which legitmately uses $$foo for it's own
> purposes will then be hosed down to $foo?

Just like it is in Ant 1.4, yes.

> $$$foo, or will $$$foo be treated as two tokens: $ and $$foo? (or $$
> and $foo?).

To be honest, I don't know.  Let me see:

[bodewig@bodewig tmp]$ cat > foo.xml
<project default="bar">
  <target name="bar">
    <echo message="$$$baz" />
    <echo message="$$$$xyxxy" />
  </target>
</project>
[bodewig@bodewig tmp]$ ant -f foo.xml 
Buildfile: foo.xml

bar:
     [echo] $$baz
     [echo] $$xyxxy

BUILD SUCCESSFUL
Total time: 1 second

You can use three or four dollars.

> Given that, i think it should also not touch any $'d text unless it
> can find a matching variable.

It is not a question of what would have been the best way, more how it
has been in historic versions of Ant.

Ant used to swallow the character after a $ and there are tons of
build files that double the $ sign for just that reason.  If we drop
the special behavior for $$ these build files will be broken - no way.

Stefan

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message