net.sf.antcontrib.property
public class Variable extends Task
This used to be a nice little task that took advantage of what is probably a flaw in the Ant Project API -- setting a "user" property programatically causes the project to overwrite a previously set property. Now this task has become more violent and employs a technique known as "object rape" to directly access the Project's private property hashtable.
Developed for use with Antelope, migrated to ant-contrib Oct 2003.
Since: Ant 1.5
Version: $Revision: 1.6 $
Method Summary | |
---|---|
protected void | addProperties(Properties props)
iterate through a set of properties, resolve them, then assign them
|
void | execute()
Execute this task.
|
void | setFile(File file)
Set the name of a file to read properties from. |
void | setName(String name)
Set the name of the property. |
void | setUnset(boolean b)
Determines whether the property should be removed from the project.
|
void | setValue(String value)
Set the value of the property. |
Parameters: props The feature to be added to the Properties attribute
Throws: BuildException Description of the Exception
Parameters: file the file to read properties from.
Parameters: name the name of the property.
Parameters: b set to true to remove the property from the project.
Parameters: value the value of the property.