ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ckn...@onebox.com
Subject RE: Re: How can I capture a file's date to a property?
Date Wed, 25 Jul 2007 10:04:18 GMT
Thanks again.
-- 
Charles Knell
cknell@onebox.com - email



-----Original Message-----
From:     Dale Anson <danson@grafidog.com>
Sent:     Tue, 24 Jul 2007 20:13:41 -0600
To:       Ant Users List <user@ant.apache.org>
Subject:  Re: How can I capture a file's date to a property?

What those mean is that there are other tasks or types with the same 
name loaded via one of the numerous jars in your ant classpath.  You can 
make the messages go away by using namespaces, which then lets Ant 
explicitly pick the right task or type.  Try it like this and the 
'trying to override' messages will go away:


<project name="fileutil_test" basedir="." default="test" 
xmlns:a="antlib:ise.antelope.tasks">

    <taskdef resource="ise/antelope/tasks/antlib.xml"
             uri="ise.antelope.tasks"/>

    <target name="test">
        <property name="ant.jar" value="${ant.library.dir}/ant.jar"/>
        <a:fileutil file="${ant.jar}" property="ant_date">
            <a:lastmodified format="yyyy-MM-dd"/>
        </a:fileutil>
        <echo>timestamp on ant.jar is ${ant_date}</echo>
    </target>
</project>

This is a good thing to do when using third-party tasks, especially if 
they are from more than one source.  It makes it a lot easier to figure 
out what task comes from where.

Dale


cknell@onebox.com wrote:
> Thanks. That does it, but what's the story on this set of messages that are displayed
when I run the task?
>
> Trying to override old definition of task antcallback
> Trying to override old definition of task antfetch
> Trying to override old definition of task assert
> Trying to override old definition of task bool
> Trying to override old definition of task foreach
> Trying to override old definition of task if
> Trying to override old definition of task limit
> Trying to override old definition of task math
> Trying to override old definition of task post
> Trying to override old definition of task stopwatch
> Trying to override old definition of task switch
> Trying to override old definition of task var
> Trying to override old definition of task replace
> Trying to override old definition of task length
> Trying to override old definition of datatype sort
>   

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




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


Mime
View raw message