ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "didge" <di...@foundrylogic.com>
Subject RE: [error] Illegal Group Reference
Date Thu, 27 Feb 2003 05:34:47 GMT
replace="$[db.name}"/>

should be:
replace="${db.name}">

You put a [ where you probably wanted a {

didge

> -----Original Message-----
> From: Matt Raible [mailto:matt@raibledesigns.com]
> Sent: Wednesday, February 26, 2003 9:25 PM
> To: user@ant.apache.org
> Subject: [error] Illegal Group Reference
> 
> 
> Any idea why the following tasks cause an "Illegal group reference"?
> I'm no where near a regexp expert, I wouldn't even classify myself as a
> rookie ;-)  Any help is appreciated.
> 
> This task seems to be the cause:
> 
>         <!-- Replace database name in database creation script -->
>         <replaceregexp byline="true" 
>             file="../${app.name}/metadata/sql/mysql-create.sql"
>             match="${app.name}"
>             replace="$[db.name}"/>
> 
> ${app.name} = my-test
> ${db.name} = mytest
> 
> mysql-create.sql does exist and has the following contents:
> 
> create database if not exists my-test;
> grant all privileges on my-test.* to test@"localhost" identified by
> "test";
> 
> java.lang.IllegalArgumentException: Illegal group reference
>         at java.util.regex.Matcher.appendReplacement(Matcher.java:554)
>         at
> org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp.substitute(Jdk14Regex
> pRegexp.java:116)
>         at
> org.apache.tools.ant.taskdefs.optional.ReplaceRegExp.doReplace(ReplaceRe
> gExp.java:289)
>         at
> org.apache.tools.ant.taskdefs.optional.ReplaceRegExp.doReplace(ReplaceRe
> gExp.java:357)
>         at
> org.apache.tools.ant.taskdefs.optional.ReplaceRegExp.execute(ReplaceRegE
> xp.java:491)
>         at org.apache.tools.ant.Task.perform(Task.java:319)
>         at org.apache.tools.ant.Target.execute(Target.java:309)
>         at org.apache.tools.ant.Target.performTasks(Target.java:336)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
>         at
> org.apache.tools.ant.Project.executeTargets(Project.java:1250)
>         at org.apache.tools.ant.Main.runBuild(Main.java:610)
>         at org.apache.tools.ant.Main.start(Main.java:196)
>         at org.apache.tools.ant.Main.main(Main.java:235)
> 
> Thanks,
> 
> Matt
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 

Mime
View raw message