Hawron
Plugins

Plugins

You can replace components with a plugin or add new features to Hawron. Have a look at the included plugins like Jetty or the viewer to see what is possible. Note, every plugin becomes an own classloader (searches child-first), that should avoid problems with different versions of libraries.

Here is a short list of interfaces which can be used.

Look at Avalon to find out more about the lifecycle of components.

The following descriptor-example shows which settings are needed.

<?xml version="1.0"  ?>
<plugin>
   <name>My plugin</name>
    <instanceclass>MyPluginImpl</instanceclass>
    <interface>de.miethxml.hawron.context.viewer.Viewer</interface>
    <description>My plugin</description>
    <resources>
        <classpath src="my.jar"/>
    </resources>
</plugin>

   

Plugin-template

ant newplugin -Dplugin.name=foo

Will generate a new subdirectory "plugins/other/foo" and place there a generic buildfile and a plugins-descriptor. Optional you can add

-Dplugin.category=bar
this will create a subdirectory "plugin/bar/foo". Copy the plugin.properties to local.plugin.properties and uncomment your plugin there for building.