Works with <fileset> out of the box with 1.4.1 I believe, but you can prove
me wrong ;-) --DD

-----Original Message-----
From: Sayatovic, Brian [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, May 23, 2002 3:23 PM
To: Ant Users List
Subject: RE: How do I load a wilcard properties file?

I tried htis, and it works, with one alteration:

        <path id="version">
                <fileset dir="${build.dir}" includes="*.version"/>
        </path>
        <property name="version.file" refid="version"/>
        <property file="${version.file}"/>

The refid on a fileset returned a raw .toString() on it which is not useful.
Only "PATH like elements" are usefil in properties (at least in Ant 1.4)

Regards,
Brian.

-----Original Message-----
From: Dominique Devienne [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 23, 2002 4:11 PM
To: 'Ant Users List'
Subject: RE: How do I load a wilcard properties file?


If has you say, the file is unique where you look for it, define a <fileset>
that finds it, then convert that <fileset> to a <property>. Then use that
property in property file...

<fileset id=" propfile " dir="somedir" includes="**/*version.properties" />
<property name="propfile" refid="propfile" />
<property file="${propfile}" />

If the fileset picks up more that one file, or none, it will likely crap
out. --DD

-----Original Message-----
From: Sayatovic, Brian [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, May 23, 2002 3:01 PM
To: Ant Users List (E-mail)
Subject: How do I load a wilcard properties file?

I have a properties file that will be of the form "*version.properties".
How can I load properties form this file into Ant?  I don't know what the
prefix will be and there *should* only be one instance of that file in the
directory I want to search.  I just don't know the entire name of the file
is going to be.

As near as I can, the "roperty" task expects a full filename, not a
wildcard.

Regards,
Brian.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to