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 Tue, 24 Jul 2007 14:08:58 GMT
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
-- 
Charles Knell
cknell@onebox.com - email



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

Hi Charles,

There seems to be an issue with the antelope.taskdef file for a few 
tasks.  Try using the antlib.xml instead.  The example below works fine 
for me using the current AntelopeTasks_3.4.2.jar from 
http://antelope.tigris.org.  I tested this on both Ant 1.6.5 and 1.7.0. 

<project name="fileutil_test" basedir="." default="test">

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

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

I did notice that on your date format, I think you wanted MM rather than mm.

Hope this helps,

Dale


cknell@onebox.com wrote:
> There are a number of problems with the example task:
>
> <fileutil file="foobar.txt" property="moddate">
>    <lastmodified format="...">
>  </fileutils>
>
> - The opening and closing tag names do not match ("fileutil" vs. "fileutils").
> - The <lastmodified> tag is not closed.
>
> Even after correcting for these, I get an error message from ant when I run the target:
> ------------------------------------------------------------------------------------------
> <taskdef resource="ise/antelope/tasks/antelope.taskdefs"/>
>
> <target name="test">
>   <fileutil file="build.xml" property="date.last.modified">
>     <lastmodified format="yyyy-mm-dd" />
>   </fileutil>
>   <echo>${date.last.modified}</echo>
> </target>
>
> ts.xml:6: No public execute() in class ise.antelope.tasks.typedefs.file.FileLength
> ------------------------------------------------------------------------------------------
>
> I have dowloaded and installed AntelopeTasks_3.4.2.jar in the lib directory of my 
> %ANT__HOME% directory.
>
> Can anyone offer a useful analysis of the error message and suggest a fix?
>
> Thanks.
>   

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