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: load property from refid
Date Wed, 07 May 2003 06:52:29 GMT
> -----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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message