ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: problem with replace token
Date Thu, 20 Nov 2003 06:49:43 GMT
>      i  am trying to replace the token in the file the 
> following is the code
> written for the same. This results in deletion of the file.
> 
> replace = project.createTask("replace");
> 
> f = new java.io.File(file) ;
> 
> replace.setFile(f) ;
> 
> replace.setToken("@SRC") ;


you have forgotten the closing '@'
  replace.setToken("@SRC@");


Jan

> 
> replace.setValue("test") ;
> 
> replace.perform() ;
> 
> 
> 
> Where as this is working fine.
> 
> <replace file="${file}" token="@SRC" value="test" />
> 
> 
> 
> what cud be the possible reason for this??
> 
> 
> 
> Parimala
> 
> 
> 
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message