You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Marie Rajon <MR...@isabel.be> on 2003/02/12 18:17:48 UTC
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
Re: Problem with replaceregexp ...
Posted by Antoine Levy-Lambert <le...@tiscali-dsl.de>.
Hello,
have a look at this link
http://ant.apache.org/manual/install.html#librarydependencies
Yours
Antoine
----- Original Message -----
From: "Marie Rajon" <MR...@isabel.be>
To: <us...@ant.apache.org>
Sent: Wednesday, February 12, 2003 6:17 PM
Subject: 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
>
RE: Problem with replaceregexp ...
Posted by William Ferguson <wi...@versata.com.au>.
Marie,
the RegExp implementation needs to in the classpath for your replaceregexp
task.
There are 2 ways to achieve this:
1) Ensure that the jar containing your chosen regexp implementation is in
the Ant bootclasspath.
This is typically done by putting the jar into the ANT_HOME\lib
directory.
2) Split the RegExp factory classes out of ant jar and reference them along
with your regexp implementation
in the classpath defined for your replaceregexp task definition.
William
-----Original Message-----
From: Marie Rajon [mailto:MRajon@isabel.be]
Sent: Thursday, February 13, 2003 4:18 AM
To: 'user@ant.apache.org'
Subject: 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