Simple plugin Maven Archetype

Overview

It can be quite daunting trying to set up a plug-in project that can be used by the Moomba workbench. Therefore we've created a very simple Maven archetype that will create a skeleton project for you.

What you'll be needing

Bare Minimum

To create a new workbench plug-in, you will need the following:

  • Maven 2.0.4

Creating your project

Create your project by following this format:

mvn archetype:create   \
   -DarchetypeGroupId=org.karora  \
   -DarchetypeArtifactId=moomba-plugin \
   -DarchetypeVersion=0.1-SNAPSHOT   \
   -DremoteRepositories=http://www.karora.org/maven-snapshots/ \
   -DgroupId=<your-project-groupId>  \
   -DartifactId=<your-project-artifactId> \
   -Dversion=<your-project-version> (optional)

Here's one I prepared earlier:

$ cd $workspace_dir
$ mvn archetype:create   \
     -DarchetypeGroupId=org.karora  \
     -DarchetypeArtifactId=moomba-plugin  \
     -DarchetypeVersion=0.1-SNAPSHOT  \
     -DgroupId=com.my.project  \
     -DartifactId=MyPluginProject  \
     -DremoteRepositories=http://www.karora.org/maven-snapshots/

Building the project

To build the project simply use:

$ cd MyPluginProject
$ mvn package

Installing the built plug-in

Maven will have packaged the plug-in jar in the target directory. Copy this into the plugin directory of a valid runtime. If you don't have a runtime, you can down load one from Moomba under Spring-OSGi - deprecated. The plugin directory is under WebContent/WEB-INF/eclipse/plugins. Once you have copied the plugin into this directory and started the web container, then you can start the bundle in the OSGi console.

Project Details

The project creates a workbench perspective and contributes 2 view parts to this perspective and one action to the workbench and should look something like this:

Labels

 
(None)