ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: AW: How can I set last modified date in html files using ant?
Date Thu, 10 Feb 2005 10:34:54 GMT
Ant uses the Apache BeanScriptingFramework (for short bsf), therefore
any bsf-supported language can be used.

My favorite is javascript, so my examples are written in js.
The only reason: I know that in contrast to the other :-)

Peter writes in bsh, sometimes in groovy ;-)
I think we have some jython hackers here ...


Jan

> -----Urspr√ľngliche Nachricht-----
> Von: Peter Reilly [mailto:peterreilly@apache.org]
> Gesendet am: Donnerstag, 10. Februar 2005 10:20
> An: Ant Users List
> Betreff: Re: AW: How can I set last modified date in html files using
> ant?
> 
> 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">
>       import java.io.File;
>       f = new File(filename);
>       project.setProperty("date", "" + f.lastModified());
>     </script>
>     <echo>Last modified is ${date}</echo>
> 
> Peter
> 
> Keith Hatton wrote:
> 
> >http://ant.apache.org/manual/index.html
> >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).
> >
> >Keith
> >
> >
> >-----Original Message-----
> >  
> >
> >Hey! I never knew you can instantiate any class in Ant! Can 
> you please 
> >supply a url explaining  <script>?
> >Thanks;
> >-nat
> >
> >---------------------------------------------------------------------
> >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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message