ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From HANDSCHMANN Robert <HANDSCHM...@scigames.at>
Subject AW: How to use <uptodate> with <mapper type="glob"..>
Date Fri, 04 Jan 2002 14:38:58 GMT
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:jakarta-ant@ehatchersolutions.com]
> 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" <HANDSCHMANN@scigames.at>
> To: "'Ant-User'" <ant-user@jakarta.apache.org>
> 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:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
>
>


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

--
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