ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmo...@cleverlance.com
Subject Re: AW: load property from refid
Date Thu, 08 May 2003 20:01:01 GMT
Thanks a lot. I've used <concat> and it works great.
I'm also planning to use similar script in future targets, so you have saved me 
a lot of time. 

Is there some good manual about scripting?
(I have all the required jars, it works, but I'm not sure what I can use. 
Description, API, something..)

Mirek 

Quoting Jan.Materne@rzf.fin-nrw.de:

> > -----Urspr√ľngliche Nachricht-----
> > Von: Stefan Bodewig [mailto:bodewig@apache.org]
> > Gesendet am: Mittwoch, 7. Mai 2003 08:41
> > An: user@ant.apache.org
> > Betreff: Re: load property from refid
> > 
> > On Wed, 7 May 2003, Jan Materne <Jan.Materne@rzf.fin-nrw.de> wrote:
> > 
> > > I played a little bit around. Solution: create a temporary 
> > > property file using <concat> and load that.
> > 
> > Neat.
> > 
> > Stefan
> 
> 
> Thanx :-)
> 
> 
> Using <script> works, too, as you said:
> 
>         <fileset id="fs" dir="." includes="*.properties"/>
>         <script language="javascript"> <![CDATA[
>             // reference to the project
>             prj = self.getProject();
> 
>             // get a directory scanner
>             ds = fs.getDirectoryScanner(prj);
> 
>             // iterate over the file
>             propFiles = ds.getIncludedFiles();
>             for (i=0; i<propFiles.length; i++) {
>                 load = prj.createTask("property");
>                 file = new java.io.File(propFiles[i]);
>                 load.setFile(file);
>                 load.perform();
>             }
>         ]]>
>         </script>
> 
> 
> 
> Jan
> 




Mime
View raw message