ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manoj Sadangi <msada...@manh.com>
Subject RE: replacetokens is not working
Date Tue, 13 May 2003 14:09:44 GMT
Hi Peter,
   I tried the begintoken and endtoken but it did not work.

thanks, 
manoj sadangi 


-----Original Message-----
From: peter reilly [mailto:peter.reilly@corvil.com]
Sent: Tuesday, May 13, 2003 10:05 AM
To: Ant Users List
Subject: Re: replacetokens is not working


"replacetokens" needs a begintoken and endtoken
attribute. These default to "@". 
You may do:

         <replacetokens begintoken="c" endtoken="m">
                   <token key="o" value="org"/>
        </replacetokens>


In ant 1.6 alpha, there is a new filter replacestring.

<loadfile ..>
   <filterchain>
      <linecontains>
          <contains value="pathmgr">
     </linecontains>
     <replacestring from="org" to="org"/>
  </filerchain>
</loadfile>

Peter

On Tuesday 13 May 2003 14:19, Manoj Sadangi wrote:
> I am parsing a property file and trying to replace all the occurance of
com
> with org.
> <loadfile srcfile="${path.propertyfile}" property="pf">
>   <filterchain>
>    <linecontains>
>   	<contains value="pathmgr"/>
>    </linecontains>
>  <replacetokens>
>       <token key="com" value="org"/>
>    </replacetokens>
>   </filterchain>
> </loadfile>
>
> this is returning a single line com.foo.foobar.main
> so the linecontain filter is working but the replacetoken is not working.
>
> any help would be appreciated.
>
> thanks,
> manoj
> ---------------------------------------------------------------------
> 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


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

Mime
View raw message