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 05:43:03 GMT
<property name="xxx" refid="properties.path"/> will store the
names of the files into that property (= directory listing).

I played a little bit around. Solution: create a temporary 
property file using <concat> and load that.

        <concat destfile="tmp.prop">
            <fileset dir="." includes="*.properties"/>
        </concat>
        <property file="tmp.prop"/>
        <delete file="tmp.prop"/>


Jan


> -----Urspr√ľngliche Nachricht-----
> Von: Jens Skripczynski [mailto:skripi-lists@myrealbox.com]
> Gesendet am: Mittwoch, 7. Mai 2003 02:02
> An: mm
> Cc: user@ant.apache.org
> Betreff: Re: load property from refid
> 
> Hi,
> 
> you mean you have files:
> file1.properties
> file2.properties
> file3.properties 
> 
> and want to load all files with something like: 
>   <property file="*.properties"> ?
> 
> As far as I understand the manual you need to supply some
> name for the Property set:
> "One of these (value|location|refid) when using the name attribute".
> 
> so your code needs to look like:
> <property name="xxx" refid="properties.path">
> 
> this should make ant happy, but what the refid actually 
> specifies i don't know.
> 
> 
> mm:
> > I'm trying to load properties from more property files with this:
> > 
> > <path id="properties.path">
> >     <fileset dir="somewhere">
> >         <include name="**/*.properties"/>
> >     </fileset>
> > </path>
> > <property refid="properties.path">
> 
> > Documentation says:
> >       refid Reference to an object defined elsewhere. Only 
> yields reasonable
> > results for references to PATH like structures or properties.
> > 
> > Ant says:
> > You must specify file, resource or environment when not 
> using the name
> > attribute
> > 
> > What am I doing wrong?
> > Thanks for your help
> > Mirek Mocek
> 
> Ciao
> 
> Jens Skripczynski
> -- 
> E-Mail: skripi-lists(at)myrealbox(dot)com
> 
> Life is what happens to you while you're busy making other plans.
>                                    -- John Lennon
> 
> 
> ---------------------------------------------------------------------
> 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