When refering to directories, you should use the 'location' variant of
<property>:

    <property name="source.directory" location="./src"/>
    <property name="generated.source.directory" location="./lis"/>

That is likely to fix this for you.

    Erik

----- Original Message -----
From: "HANDSCHMANN Robert" <[EMAIL PROTECTED]>
To: "'Ant Users List'" <[EMAIL PROTECTED]>
Sent: Friday, January 04, 2002 9:38 AM
Subject: AW: How to use <uptodate> with <mapper type="glob"..>


I use version 1.4.1.
When I try:

    <property name="source.directory" value="./src"/>
    <property name="generated.source.directory" value="./lis"/>

    <target name="sqlj_files_uptodate">
        <uptodate property="sqlj.files.uptodate"  >
            <srcfiles dir= "${source.directory}" includes="**/*.sqlj"/>
            <mapper type="glob" from="*.sqlj"
to="${generated.source.directory}/*.java"/>
        </uptodate>
    </target>

I get:

...
FileSet: Setup file scanner in dir C:\HM\Java\sgi\sgdb\src with patternSet{
includes: [**/*.sqlj] excludes: [] }
 [uptodate] sgi\sgdb\batch\BatchFrame.sqlj added as
C:\HM\Java\sgi\sgdb\src\lis\sgi\sgdb\batch\BatchFrame.java doesn't exist.

The task looks in C:\HM\Java\sgi\sgdb\src\lis\ instead of
                  C:\HM\Java\sgi\sgdb\lis\.
I converts the source.directory into an absoulte path and then adds the
generated.source.directory,
instead of using the absolute format of the generated.source.directory.

- Robert


> -----Urspr�ngliche Nachricht-----
> Von: Erik Hatcher [mailto:[EMAIL PROTECTED]]
> Gesendet am: Freitag, 04. J�nner 2002 15:06
> An: Ant Users List
> Betreff: Re: How to use <uptodate> with <mapper type="glob"..>
>
> I do as you have attempted and put a directory prefix on the
> 'to' attribute
> and it works for me.  (although at the moment I'm running off
> of a CVS build
> of Ant).
>
> Here's what I do:
>
> <mapper type="glob"
>                from="*.java"
>                to="${build.classes.dir}/*.class" />
>
> What version of Ant are you using?  Also, what does 'ant
> -debug' report when
> it hits the mapper?
>
>
>
>
> ----- Original Message -----
> From: "HANDSCHMANN Robert" <[EMAIL PROTECTED]>
> To: "'Ant-User'" <[EMAIL PROTECTED]>
> Sent: Friday, January 04, 2002 8:04 AM
> Subject: How to use <uptodate> with <mapper type="glob"..>
>
>
> > I have a simple problem. I want to define a property that gets set
> > when some files are outdated compared to corresponding files in
> > another directory. I use the <update> task with a mapper:
> >
> > <uptodate property="sqlj.files.uptodate">
> >     <srcfiles dir="${source.directory}" includes="**/*.sqlj"/>
> >     <mapper type="glob" from="*.sqlj" to="*.java"/>
> > </uptodate>
> >
> > Unfortunately this doesn't work because I don't know how to
> define the
> > target directory.
> > I tried also with
> >     <mapper type="glob" from="*.sqlj"
> > to="${generated.source.directory}/*.java"/>
> > which doesn't work, either.
> >
> > Any ideas?
> >
> > Thanks,
> > Robert
> >
> > P.S: I need that as workaround for the bug in the <apply> task which
> > doesn't correctly handle the 'skipemptyfilesets' attribute.
> >
> > --
> > 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]>




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

Reply via email to