In this section, we will develop our very own plugin, the World Clock plugin. This is a very simple plugin that provides the time in different locales. We will go through all of the steps required to develop it from scratch. These steps are as follows:
Creating the plugin project
Generating the plugin project, using maven2
Writing the plugin interface and implementation
Creating a deployment plan
Installing the plugin
There are many ways in which you can develop plugins. You can manually create all of the plugin artifacts and package them. We will use the easiest method, that is, by using Maven's geronimo-plugin-archetype
. This will generate the plugin project with all of the artifacts with the default values filled in.
To generate the plugin project, run the following command:
mvn archetype:create -DarchetypeGroupId=org.apache.geronimo.buildsupport -DarchetypeArtifactId=geronimo-plugin-archetype -DarchetypeVersion=2.1.4 -DgroupId=com.packt.plugins...