org.apache.tools.ant.taskdefs
Class Property
java.lang.Object
|
+--org.apache.tools.ant.Task
|
+--org.apache.tools.ant.taskdefs.Property
- public class Property
- extends Task
Will set a Project property. Used to be a hack in ProjectHelper
Will not override values set by the command line or parent projects.
- Author:
- costin@dnt.ro, Sam Ruby , Glenn McAllister
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getProject, getRuntimeConfigurableWrapper, getTaskName, init, log, log, maybeConfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
name
protected java.lang.String name
value
protected java.lang.String value
file
protected java.io.File file
resource
protected java.lang.String resource
classpath
protected Path classpath
env
protected java.lang.String env
ref
protected Reference ref
userProperty
protected boolean userProperty
Property
public Property()
setName
public void setName(java.lang.String name)
getName
public java.lang.String getName()
setLocation
public void setLocation(java.io.File location)
setValue
public void setValue(java.lang.String value)
getValue
public java.lang.String getValue()
setFile
public void setFile(java.io.File file)
getFile
public java.io.File getFile()
setRefid
public void setRefid(Reference ref)
getRefid
public Reference getRefid()
setResource
public void setResource(java.lang.String resource)
getResource
public java.lang.String getResource()
setEnvironment
public void setEnvironment(java.lang.String env)
getEnvironment
public java.lang.String getEnvironment()
setClasspath
public void setClasspath(Path classpath)
createClasspath
public Path createClasspath()
setClasspathRef
public void setClasspathRef(Reference r)
setUserProperty
public void setUserProperty(boolean userProperty)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
execute
public void execute()
throws BuildException
- Description copied from class:
Task
- Called by the project to let the task do it's work. This method may be
called more than once, if the task is invoked more than once. For example,
if target1 and target2 both depend on target3, then running
"ant target1 target2" will run all tasks in target3 twice.
- Overrides:
execute
in class Task
- Following copied from class:
org.apache.tools.ant.Task
- Throws:
BuildException
- if someting goes wrong with the build
loadFile
protected void loadFile(java.io.File file)
throws BuildException
loadResource
protected void loadResource(java.lang.String name)
loadEnvironment
protected void loadEnvironment(java.lang.String prefix)
addProperties
protected void addProperties(java.util.Properties props)
addProperty
protected void addProperty(java.lang.String n,
java.lang.String v)
Copyright ? 2000 Apache Software Foundation. All Rights Reserved.