ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <>
Subject Re: AW: How can I set last modified date in html files using ant?
Date Thu, 10 Feb 2005 09:19:50 GMT
Personally I find beanshell to be easier to use than
javascript (or the other scripting languages) as it's
sytax is *very* close to java.

    <property name="filename" location="build.xml"/>
    <script language="beanshell">
      f = new File(filename);
      project.setProperty("date", "" + f.lastModified());
    <echo>Last modified is ${date}</echo>


Keith Hatton wrote:

>Ant Tasks -> Optional Tasks -> Script
>Be careful about the library dependencies - exactly which version of
>BSF/Rhino you need will depend on which version of Ant you have (that
>link currently points to the 1.6.2 manual).
>-----Original Message-----
>Hey! I never knew you can instantiate any class in Ant! Can you please 
>supply a url explaining  <script>?
>To unsubscribe, e-mail:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message