On the CruiseControl users mailing list Adam asked for a simple label incrementer that would work with a single character in a series (“a”, “b”, “c”, etc.). Simple enough, but not worth adding to the project, so here it is, test (first) and code.
(Suggestions for better sites for sharing code snippets?)
7 Comments
I should mention that http://pastie.org/ gave me Internal Server errors when I tried to use it.
I’ve used pastie. We also have a page on our confluence wiki where people upload code.
Pastie seems to have recovered today, so here’s the test and the code.
PasteBin version of test and code.
For cc versions after 2.8, how custom label incrementer plugins can be registered? Before 2.8, it can be registered with plugin element used in config file like below.
But this usage not registers the plugin for cc version 2.8.2.
You should be able to register it just like any other plugin. Previously you needed to register LabelIncrementer under the name labelincrementer but this is no longer the case. So you should be able to do something like:
<plugin name=”alphaincrementer” class=”com.jeffreyfredrick.cc.AlphaLabelIncrementer” />
and then use it in your project with:
<alphaincrementer />
Thanks for your reply. This is the tricky point that i have missed.
Post a Comment