ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: uptodate question
Date Thu, 12 Dec 2002 16:04:19 GMT
I also thought of this, but didn't like the .. either which required prior
knowledge of the relative relationship of ${src} and ${bkp}.

       <uptodate property="srcs.uptodate">
           <srcfiles dir="${src}" includes="**/*.java" />
           <mapper type="glob" from="*.java" to="../${bkp}/*.java" />
       </uptodate>

But what you're saying about making ${bkp} absolute kind of surprises me.
The mapper is fed a relative path to the fileset's 'dir' (which is indeed
${basedir} in this case ;-), and turns it into an absolute one? This would
fail with code like new File(dir, mapper.map(relativePath))... So the result
of the mapper is first checked to see if it's absolute, and if not prepended
with 'dir'???

Is this documented at all? I find it a little counter-intuitive. --DD

-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org] 
Sent: Thursday, December 12, 2002 5:22 AM
To: ant-user@jakarta.apache.org
Subject: Re: uptodate question

On Thu, 12 Dec 2002, Michael Nascimento Santos <mister__m@hotmail.com>
wrote:

> Could anyone suggest a more portable solution that works no matter
> where ${src} and ${bkp} points to? Otherwise, I'll have to live with
> that... :-)

Make ${bkp} an absolute path to start with (using <property>'s
location attribute).

Stefan

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message