ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From EXT / FOCAL MALAPRADE Roland <ext.focal.malapr...@sncf.fr>
Subject RE: Problem with replaceregexp ...
Date Wed, 12 Feb 2003 17:25:50 GMT
Yup you need the library (unless you use JDK 1.4+)

Taken from Ant docs:

Similar to regexp type mappers this task needs a supporting regular
expression library and an implementation of
org.apache.tools.ant.util.regexp.Regexp. Ant comes with implementations for
the java.util.regex package of JDK 1.4, jakarta-regexp and jakarta-ORO, but
you will still need the library itself.

Also from Ant docs:
Ant will choose the regular-expression library based on the following
algorithm:

If the system property ant.regexp.matcherimpl has been set, it is taken as
the name of the class implementing
org.apache.tools.ant.util.regexp.RegexpMatcher that should be used. 
If it has not been set, first try the JDK 1.4 classes, then jakarta-ORO and
finally try jakarta-regexp. 

Roland.

> -----Message d'origine-----
> De : Marie Rajon [mailto:MRajon@isabel.be]
> Envoyé : mercredi 12 février 2003 18:18
> À : 'user@ant.apache.org'
> Objet : Problem with replaceregexp ...
> 
> 
> Hello,
> 
> I am trying to modify a properties file by updating a 
> property value with
> the function replaceregexp, but I get the error message "No supported
> regular expression matcher found".
> Here is a sample of my ant script:
> 
>  <replaceregexp byline="true">
>   	<regexp pattern="isalog4j.jar.version=(.*)"/>
>   		<substitution
> expression="isalog4j.jar.version=${testisalog4j.jar.version}"/>
>   	<fileset dir="D:\IsaOneToOne\">
>    		<includes="lib_list.properties"/>
>   	</fileset>
>  </replaceregexp> 
> 
> I expect the line
> "isalog4j.jar.version=1.00"
> to become
> "isalog4j.jar.version=2.00"
> in my file "D:\IsaOneToOne\lib_list.properties"
> ${testisalog4j.jar.version} is referenced in another property file.
> 
> Is this error message related to the fact that I need a 
> specific jar file (I
> already have the optional.jar in my lib directory)?
> 
> If you have any idea, just let me know!
> 
> Thank you in advance for your help
> 
> 
> Marie
> 

Mime
View raw message