This guide assumes that you have successfully setup an Eclipse environment for Openfire development. If you have not done so, please see Openfire SVN + Eclipse 3.3 + Subversive Installation Guide. I compiled this guide to the best of my knowledge. I apologize if it doesn't work for you.
Start Eclipse if you have not done so.
Click Run::External Tools::Open External Tools Dialog....
Select Ant Build.
Create new launch configuration by clicking on the New icon. A new launch configuration will be created and selected.
Rename the launch configuration in the Name: box as "Build All Plugins" or anything that you like.
Click on Buildfile::Browse Workspace....
In the left pane of the Choose Location window, expand openfire and select build.
In the right pane of the window, select build.xml.
Click OK button to close the Choose Location window.
Click on Targets tab.
Check plugins as the target to execute and un-check all others.
Click on Common tab.
Under the Display in favorites menu, check the External Tools.
Click Apply and Close button.
You can now build all plugins by clicking Run::External Tools::Build All Plugins.
This topic assumes that you want to build the "Broadcast" plugin.
Expand Ant Build.
If you follow this document from the beginning, there should already be a launch configuration named Build All Plugin (or some other name you gave).
Select that configuration item.
Duplicate the selected launch configuration by clicking on the Duplicate icon. A new launch configuration will be created and selected.
You may rename the launch configuration in the Name: box as "Build Broadcast Plugin" or anything you like.
Enter -Dplugin=broadcast in the Arguments: box. Note that the broadcast in -Dplugin=broadcast is the plugin name as well as the root directory name of the plugin.
Check plugin (note the absence of the letter 's') as the target to execute and un-check all others.
You can now build the Broadcast plugins by clicking Run::External Tools::Build Broadcast Plugin.
At a bare minimum, there must at least be two files in the plugin directory structure i.e. plugin.xml and a Java source file that contains a class that implements Plugin. Please read the Plugin Developer Guide for details of creating a plugin directory structure.
Setting up a launch configuration for your plugin is similar as in Setup Launch Configuration To Build An Existing Plugin topic above.
thanks for the article. i find the easiest way is to copy your plugin into the openfire plugin source directory and run the "plugins" target.
Thanks for this very helpful indeed.
Is it possible to debug jsp files that plugin's use?
Do you know how to debug jsp files that plugin's use?
could you create an introductory video by applying the same as explained in the post? I need help to create a plugin, but not is how to begin to do so, please help me