PropertyTask

With PropertyTask, you can define user properties in your build file.

Table 51. Attributes

Name Type Description Default Required
name String The name of the Property. n/a Yes (unless using file or environment)
value String The value of the Property. n/a Yes (unless using file or environment)
environment String Loads properties from the environment with the specified value as prefix. Thus if you specify environment="myenv" you will be able to access OS-specific environment variables via property names "myenv.PATH" or "myenv.TERM". n/a No
file String Path to properties file. n/a No
override Boolean Whether to force override of existing value. false No
prefix String Used when properites are loaded from file. Prefix is applied to properties loaded from specified file. A "." is appended to the prefix if not specified. n/a No
refid String A reference to a previously defined propeprty n/a No
fallback String If a reference cannot be found within the current project scope this attribute specifies a fallback project scope. n/a No

Note

Important note about scope: when the <property> tag is called inside a <phingcall> tag, any properties are set in a new local scope. Thus, any properties or other variables set inside that scope will cease to exist (or revert to their previous value) once the parent <phingcall> tag completes.