ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Svetlin Stanchev" <stanc...@360t.com>
Subject bug or feature in <replaceregexp/> ?
Date Fri, 08 Aug 2003 19:14:45 GMT
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


Mime
View raw message