Hi,
to get the file modified date you can use something
like this:
<project>
<scriptdef name="getlm" language="javascript">
<attribute name="file"/>
<attribute name="property"/>
<![CDATA[
fileName = attributes.get("file");
propName = attributes.get("property");
file = new java.io.File(fileName);
last = file.lastModified();
project.setNewProperty(propName, last);
]]>
</scriptdef>
<getlm file="files.xml"
property="buildfile.last"/>
<echo>buildfile is last modified at
${buildfile.last}</echo>
</project>
The above build script defines getlm script def which
retrives the modification date via javascript ans sets
a new property with the size. Mind that
file.lastModified() returns long number so you should
parse it to a Date to suit your needs.
I borrowed the above script from a previous thread in
ant's mailing list called Ant Get FileSize using
exec?. You can see it for the original source.
HTH Ivan
--- T E Schmitz <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am using the signjar task to sign a set of jar
> files for a WebStart
> application. Some of the jars have already been
> signed by Sun (e.g.
> mail.jar) and as a jar mustn't have more than one
> signature I need to
> exclude those files from being signed.
>
> I misunderstood and tried the "lazy" attribute but
> it only prevents
> re-signing with the same signature.
>
> a) Is there a means of determining which jars are
> signed with the
> purpose of building an exclude list?
>
> b) I would like the signed jar to bear the same
> modification date as the
> original. I can't see any means of obtaining a
> file's modification date
> in order to touch the new file with it.
>
> Thanks in advance for any ideas.
>
> --
>
>
> Regards/Gru�,
>
> Tarlika Elisabeth Schmitz
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
__________________________________
Do you Yahoo!?
Check out the new Yahoo! Front Page.
www.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]