ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "GFC" <giandina.cas...@hccnet.nl>
Subject Re: bug or feature in <replaceregexp/> ?
Date Fri, 08 Aug 2003 21:20:53 GMT
I had a similar problem.
(posted earlier today)
I had to include the entry (in Jan's script b.t.w.)
    <replacefilter token="%|" value=":"/>
because in some of my library files the paths contain references like
    <path>[E%|/Oracle/Ora81/jdbc/lib/classes12.zip]</path>

Does this help?

Gian Franco

----- Original Message ----- 
From: "Svetlin Stanchev" <stanchev@360t.com>
To: "Ant Users List" <user@ant.apache.org>
Sent: Friday, August 08, 2003 9:14 PM
Subject: bug or feature in <replaceregexp/> ?


> I have in my global build.properties:
> 
> masterbuild.dir=masterbuild
> projects.dir=projects
> mountpoint.masterbuild=${build.root}/${masterbuild.dir}
> mountpoint.projects=${mountpoint.masterbuild}/${projects.dir}
> 
> ${build.root} is set in the (Windows) environment to
> d:\CleanStart\buildroot.
> 
> Starting from a (JBuilder-derived) compile classpath:
> <path>../<project_group_name>/<project_name>/Implementation/java/classes
> </path>
> 
> I want to get:
> <path>${mountpoint.projects}/<project_name>/dist/<project_name>.jar</pat
> h>
> 
> I am using:
>     <replaceregexp file="${tmp2}"
>       match="../${project.group}/(.*)/Implementation/java/classes"
>       replace="${mountpoint.projects}/\1/dist/\1.jar"
>       byline="true"/>
> 
> which sort of works, returning:
> <path>D:CleanStartbuildroot/masterbuild/projects/<project_name>/dist/<pr
> oject_name>.jar</path>
> 
> instead of: 
> <path>D:/CleanStart/buildroot/masterbuild/projects/<project_name>/dist/<
> project_name>.jar</path>
> 
> Why are some dir separators missing? Looks like replaceregexp expands
> correctly "one level" only... I am using in other contexts
> ${mountpoint.projects} and it gets resolved just right.
> 
> I suspected it might be because of the regular expression library (and
> platform-specific issues), so I've tried with a recent ORO lib in my ant
> libs subdir, but the result was the same. 
> 
> Maybe I don't see smth obvious, any hints?
> 
> Thankful,
> -- 
> Svetlin
> 
> 
> ---------------------------------------------------------------------
> 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