ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Difference between file and resource in property task
Date Wed, 29 Nov 2000 09:07:24 GMT
Jason Rosenberg <jason@squaretrade.com> wrote:

> I am wondering if there is any difference between the file attribute
> and the resource attribute for the property task.  The documentation
> seems to describe each one identically.

file will load the properties from a file. Its value is a filename,
either absolute or relative to the project's basedir. resource will
try to load the properties from the CLASSPATH, you could specify
org/apache/tools/ant/taskdefs/defaults.properties to load that file
from the ant.jar archive for example.

Is this clearer?
 
> I had hoped that the resource version would behave as a properties
> file does within a java app, that is, if a named .properties file
> exists within the current CLASSPATH, it should be enough just to
> refer to the properties file name (without any absolute path info).

It is supposed to work exactly that way, don't using any qualifier
will only work for files you'd find in the "unnamed" package space of
your CLASSPATH though.
 
> I can't seem to get it to work this way, however.

Could you please send an example (build file snippet + ant -verbose)?

Stefan

Mime
View raw message