--- Bill Burton <[EMAIL PROTECTED]> wrote:
> This confused me too as the docs aren't clear on the distinction so I
> looked at the source to get the answer. The file attribute does what
> you would expect and loads a file from the file system. The resource
> attribute also loads a file but finds the file by calling
> getClass().getResourceAsStream("foo.properties") causing it to be loaded
> from the CLASSPATH which includes looking inside .jar's in the
> CLASSPATH.
That's what I finally ended up doing as well -- looking at the source-code
for <property> (only I had to look up getResourceAsStream over on the java
site as well :)
So, there's two issues I still have then: 1) it doesn't appear to work,
and 2) doesn't it imply that <property> should allow for nested
<classpath>?
As to 1 -- I tried putting the jar-file that contains the property file
into $ANT_HOME/lib, since I knew it'd get scooped up into java.class.path
along with all the other Ant jars, then I tried <echo>'ing out one of the
properties defined in that file, but it came out as the un-resolved
${property-name} string instead of the value the property should have been
set to.
As to 2 -- clearly, putting my jar-file in ant's lib dir was a kludge
around the fact that you can't specify <classpath> within <property>,
which is why I've now included ant-dev in the To line, along with the fact
that using the "resource" attr doesn't appear to have actually worked
regardless of my kludge -- maybe someone on there would like a diversion
away from the Dueling Proposals and just do a little coding :)
Thanks,
Diane
=====
([EMAIL PROTECTED])
__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/