Name
property
Synopsis
Sets properties in the project. Properties specified by users always
take precedence over properties defined by this task. The same is
true for properties defined by parent projects that invoke this
project using the ant task.
Attributes
-
classpath(1.3, 1.4, Path, N) The classpath to use when looking up a resource.
-
classpathref(1.3, 1.4, Reference, N) A reference to a classpath defined elsewhere in the buildfile.
-
environment(1.3, 1.4, String, *) A prefix used for retrieving environment variables. We use this in the upcoming example to retrieve the value of
TOMCAT_HOME. This was also covered in Chapter 4 under “Environment DataType.”-
file(all, File, *) The name of a properties file. This defines a set of properties (name-value pairs) according to the contents of the properties file.
-
location(all, File, *) Sets the property value to an absolute filename. If this attribute contains an absolute path, any "
/" and "\" characters are converted to current system conventions. If the path is relative to the project, it is expanded to an absolute path.-
name(all, String, N) The name of the property to set.
-
refid(all, Reference, *) A reference to a path or property defined elsewhere in the project.
-
resource(all, String, *) The Java resource name of a properties file. Uses a
ClassLoaderto load the properties file.-
value(all, String, *) An explicit value for the property.
When name is specified, one of
value, location, or
refid is required. Otherwise, one of
resource, file
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access