|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.cruisecontrol.config.DefaultPropertiesPlugin
The <property> element is used to set a property (or set of properties)
within the CruiseControl configuration file. Properties may be set at the global level
and/or within the scope of a project. There are three ways to set properties within CruiseControl:
Properties in CruiseControl are not entirely immutable: whoever sets a property last will freeze it's value within the scope in which the property was set. In other words, you may define a property at the global level, then eclipse this value within the scope of a single project by redefining the property within that project. You may not, however, set a property more than once within the same scope. If you do so, only the last assignment will be used.
Just as in Ant, the value part of a property being set may contain references to other properties. These references are resolved at the time these properties are set. This also holds for properties loaded from a property file, or from the environment.
Also note that the property ${project.name} is set for you automatically and will always resolve
to the name of the project currently being serviced - even outside the scope of the project
definition.
Finally, note that properties bring their best when combined with plugin preconfigurations.
| Constructor Summary | |
DefaultPropertiesPlugin()
|
|
| Method Summary | |
void |
loadProperties(java.util.Map props,
boolean failIfMissing)
|
void |
setEnvironment(java.lang.String environment)
The prefix to use when retrieving environment variables. |
void |
setFile(java.lang.String file)
The filename of the property file to load. |
void |
setName(java.lang.String name)
The name of the property to set. |
void |
setToupper(java.lang.String toupper)
Used in conjunction with environment. |
void |
setValue(java.lang.String value)
|
void |
validate()
Called after the configuration is read to make sure that all the mandatory parameters were specified.. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultPropertiesPlugin()
| Method Detail |
public void setName(java.lang.String name)
public void setEnvironment(java.lang.String environment)
public void setFile(java.lang.String file)
public void setValue(java.lang.String value)
value - public void setToupper(java.lang.String toupper)
environment. If set to true, all
environment variable names will be converted to upper case.
toupper -
public void validate()
throws CruiseControlException
CruiseControlException
public void loadProperties(java.util.Map props,
boolean failIfMissing)
throws CruiseControlException
loadProperties in interface PropertiesPluginCruiseControlException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||