ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stephan beal <step...@wanderinghorse.net>
Subject Re: Problem with '$' character in file names?!
Date Wed, 24 Apr 2002 14:17:20 GMT
On Wednesday 24 April 2002 15:30, Udo J├╝ttner wrote:
>  <include name="weblogic/rmi/internal/dgc/DGCClientImpl$HeartBeat.class"/>
...
> Everything works fine, except for that the file with the '$' character in
> its name is NOT included into the jar file. Is there a known problem with
> any special characters? I also tried to quote the '$' by using '\' - like
> one does in UNIX shells.
> Any help is welcome. Thanx in advance.

That looks like exactly the same problem as the post i just made on ant-devel 
about property replacement in general in general. Here the important bit:

Assumption: net.sf.antcontrib.logic.PropExpansionTest is a simple task which 
just takes the given character data and prints it out, doing property 
replacement if replaceproperties="true".


<taskdef name="propexpand" 
classname="net.sf.antcontrib.logic.PropExpansionTest"/>

<property name="whattodrink" value="milk"/>
<propexpand replaceproperties="true">
        $foo = "${whattodrink}";
        print "foo=$foo\n";
</propexpand>

<propexpand replaceproperties="false">
        $foo = "${whattodrink}";
        print "foo=$foo\n";        
</propexpand>

It produces this output:
property expansion = [true]
text=
        foo = "milk";
        print "foo=foo\n";

property expansion = [false]
text=
        $foo = "${whattodrink}";
        print "foo=$foo\n";


Note all the missing dollar signs in the first one.



----- stephan
stephan@einsurance.de - http://www.einsurance.de
Office: +49 (89)  552 92 862 Handy:  +49 (179) 211 97 67
"I didn't give in to the Nazis and I won't give in to the bladder." 
- The Queen Mum


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


Mime
View raw message