Dominique,

Thanx for your answer.

Let me explain my backup control logic a littlebit: I always copy all my
source files to my ${bkp} dir if any of them has been touched. Before I do
that, I move my old backup files to a folder named ${bkp}${DSTAMP}${TSTAMP}.
So, my ${bkp} folder contains only the last version of my source files.

To decide if I should rebuild my javadocs, create a new backup and a few
other things, I need to know if any of my files has been changed. I have
been trying to use <uptodate> but with no success.

My ${src} and ${bkp} dirs are relative to ${basedir} and actually hold only
"src" and "bkp" at the moment.

I have already searched the archives for "update" and only found questions
and questions about this issue...

Has <uptodate> ever worked in such way? :-) Could anyone correct - or at
least tell me what do do about - the following snippet so that it works as
intended??? Any of the developers could tell me if I am missing something or
if I misunderstood some concept?

     <target name="check" depends="init">
        <uptodate property="srcs.changed">
            <srcfiles dir="${basedir}" />
            <mapper type="glob" from="${src}\*.java" to="${bkp}\*.java" />
        </uptodate>
     </target>

Tkx,
--
Michael Nascimento Santos
Sun Certified Programmer for the Java 2 Platform
Sun Certified Programmer for the Java 2 Platform 1.4
Sun Certified Web Component Developer for J2EE
Moderador SouJava - www.soujava.org.br

----- Original Message -----
From: "Dominique Devienne" <[EMAIL PROTECTED]>
To: "'Ant Users List'" <[EMAIL PROTECTED]>
Sent: Wednesday, December 11, 2002 4:32 PM
Subject: RE: uptodate question


> I'm not too sure I follow your backup thing going on, but if your ${src}
and
> ${bkp} variable also contain ${basedir} as a suffix, the regex won't
match.
>
> Mappers are fed relative paths compared to your ${basedir} I think. Try
> taking this info into account and that may solve your problem. --DD
>
> -----Original Message-----
> From: Michael Nascimento Santos [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 11, 2002 1:01 PM
> To: [EMAIL PROTECTED]
> Subject: uptodate question
>
> Hi,
>
> I want to do a few things if my backup dir content is older than my source
> dir content.
>
> I am trying to use the uptodate task, with no success, like this:
>
>     <target name="check" depends="init">
>        <uptodate property="srcs.changed">
>            <srcfiles dir="${basedir}" />
>            <mapper type="glob" from="${src}\*.java" to="${bkp}\*.java" />
>        </uptodate>
>     </target>
>
>     <target name="javadoc" depends="check" if="srcs.changed">
>         <delete dir="${doc}" />
>         <javadoc sourcepath="${src}" destdir="${doc}"
> packagenames="com.company.*" />
>     </target>
>
> I thought that maybe my concept of from and to attributes in the uptodate
> task was wrong, but nothing happened when I exchanged their values.
>
> I have several tasks that depend on the srcs.changed property being
> correctly set.
>
> All the properties above are properly defined and refer to directories
below
> ${basedir}.
>
> What am I missing???
>
> []s
> Michael Nascimento Santos
> Sun Certified Programmer for the Java 2 Platform
> Sun Certified Programmer for the Java 2 Platform 1.4
> Sun Certified Web Component Developer for J2EE
> Moderador SouJava - www.soujava.org.br
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to