In ant scripts and MS build files you can set properties at the top how do I do this in the CruiseControl file ccnet.config?
Asked
Active
Viewed 2,190 times
2 Answers
9
You can do this with cb:define. For example:
<cb:define myProjectName="Foo"/>
Then to use the defined property:
<project name="$(myProjectName)" queue="Bar"> </project>
More information about cb:define can be found here:
http://confluence.public.thoughtworks.org/display/CCNET/Configuration+Preprocessor

Dustin
- 388
- 1
- 9
-
@Dustin: do cb:define tags need to be at the root of the document or can they occur anywhere? – minty Oct 01 '09 at 19:35
-
1They can be anywhere. However, I believe that they need to occur before the first use of the property that you are defining. – Dustin Oct 01 '09 at 19:37
3
<cb:define />
creates a pre-processor constant, not a property. Pre-processor constants have global scope and may be defined only once. A property would be scoped to the block in which it is created and could be overloaded with the same name in a different block. You can use the <cb:scope>
tag to modify the scope of the pre-processor constant and mimic properties, as shown here:

user661037
- 31
- 2