Check these links So, you want to write a plugin... , Openfire: Plugin Developer Guide , Apache Ant™ User Manual and Openfire: Building the Source .
Short story, in wildfire source you will find folder named plugins where you will put all your plugin folders in format described in Openfire: Plugin Developer Guide. When that is done, you will build your plugin using ant tool and build.xml file located somewhere in wildfire source.