New Property Loader

submit to reddit StumbleUpon Delicious Save to Delicious
To kick off the new year, I put together a little plugin to address the age old problem: "Hey, how can I use my application's property file settings to change AnthillPro's behavior?" Ok, so most of you don't have that problem. But some of you do and it's a pain.

The ahptool command line widget available in 3.7 allows properties to be set from the agent but takes its input as an XML document. So we need to convert a property file like:
this=that
someproperty=itsvalue
a.b.c=
d.e.f=hassomething

to an XML document that looks like this:
  <properties>    
    <property name="a.b.c"></property>
    <property name="someproperty">itsvalue</property>
    <property name="this">that</property>
    <property name="d.e.f">hassomething</property>
</properties>

This could probably be done a number of ways, but I put together a little plugin that takes care of doing it in Groovy. Here's a video showing the plugin in action and walking you through the code in case you want to do something similar.

I'm interested to know what other file formats teams are storing data in that should be read in like this. Adding some more options here, or allowing a number of properties files to be read in at once should be pretty easy to add.

You can download this plugin here.




© 2006-2010 Urbancode, Inc.
Anthill, AnthillPro, and AnthillOS are trademarks of Urbancode, Inc.
All other trademarks are owned by their respective owners.
tel: (216) 858-9000 fax: i (216) 393-0006 email:info@urbancode.com