diff --git a/proposal/xdocs/src/org/apache/tools/ant/taskdefs/Property.xml b/proposal/xdocs/src/org/apache/tools/ant/taskdefs/Property.xml index 43b8fd64a..29e2f2dca 100644 --- a/proposal/xdocs/src/org/apache/tools/ant/taskdefs/Property.xml +++ b/proposal/xdocs/src/org/apache/tools/ant/taskdefs/Property.xml @@ -26,15 +26,23 @@
-
  <property name="foo.dist" value="dist"/>
+ + ]]>

sets the property foo.dist to the value "dist".

-
  <property file="foo.properties"/>
+ + ]]>

reads a set of properties from a file called "foo.properties".

-
  <property resource="foo.properties"/>
+ + ]]>

reads a set of properties from a resource called "foo.properties".

Note that you can reference a global properties file for all of your Ant builds using the following:

-
  <property file="${user.home}/.ant-global.properties"/>
+ + ]]>

since the "user.home" property is defined by the Java virtual machine to be your home directory. Where the "user.home" property resolves to in the file system depends on the operating system version and the JVM implementation. @@ -43,11 +51,11 @@ variants, this will most likely resolve to the user's directory in the "Doc and Settings" folder. Older windows variants such as Windows 98/ME are less predictable, as are other operating system/JVM combinations.

-
-  <property environment="env"/>
-  <echo message="Number of Processors = ${env.NUMBER_OF_PROCESSORS}"/>
-  <echo message="ANT_HOME is set to = ${env.ANT_HOME}"/>
-
+ + + +]]>

reads the system environment variables and stores them in properties, prefixed with "env". Note that this only works on select operating systems. Two of the values are shown being echoed. diff --git a/src/main/org/apache/tools/ant/taskdefs/Property.java b/src/main/org/apache/tools/ant/taskdefs/Property.java index 660f97879..a0d74eac7 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Property.java +++ b/src/main/org/apache/tools/ant/taskdefs/Property.java @@ -104,6 +104,7 @@ import org.apache.tools.ant.types.Reference; * * @ant.attribute.group name="name" description="One of these, when using the name attribute" * @ant.attribute.group name="noname" description="One of these, when not using the name attribute" + * @ant.task category="property" */ public class Property extends Task {