You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Nathan Mittler <na...@gmail.com> on 2006/09/05 01:48:18 UTC

Automating plugin creation and deployment with maven

Hi everyone,
Sparked by the attractiveness of Geronimo plugins, I'm trying to get my
hands around how to automate the creation and deployment of plugins from a
maven 2 build.  I've been shuffling through what little documentation there
is on this and think I need a little community help.

The Problem:
The problem is currently theoretical for us now as we don't yet have any
systems deployed with G.  But that aside, let's assume that there are
Geronimo servers deployed and we want to deploy new plugins without
redeploying an entirely new system.  Automating this directly from the build
(maven) is desirable, because of the simplicity.

As I see it, the problem can be essentially boiled down to three
repositories: the development m2 repo (our local CM repo), a remote m2 repo
(visible by all target Geronimo instances), and a target Geronimo instance.
Below, I've listed what I believe to be the steps involved in the process.
Steps 2&3 are where my question marks are  ...

Step 1: Plugin creation
The first problem is the creation of a plugin (.car file) with maven and
installation into our local (development) repo.  This can be achieved
through the car:package and car:installConfig goals in the CAR plugin.  You
still need to manually create a geronimo-plugin.xml and have it packaged
into the CAR.  No big deal.

Step 2: Plugin deployment to remote plugin repository
The second problem is a little trickier.  The idea is that the plugin
repository used by Geronimo may be local to a deployed system or may be a
global repo shared by all deployed systems.  In the case of a global
repository, you could simplify things by just making all Geronimo servers
point directly to the development repository (no deployment required).  This
may not be an acceptable solution for organizations that get nervous about
their CM machine being accessed externally, however.  If the development
repo cannot be used directly, is there an easy way to automate the
deployment of a plugin and all of its dependencies to a remote plugin
repository?  I believe the standard maven deploy plugin only deploys the
artifacts from the immediate project.

Step 3: Creation/update of geronimo-plugins.xml
Ideally, when a plugin is installed into a local repo or deployed to a
remote repo, the geronimo-plugins.xml file would get updated with the
information in the plugin's geronimo-plugin.xml.  Is there anyway to
automate this?

Step 4: Installation to a Geronimo instance
This is the simplest piece of the puzzle.  Once the plugin has been
installed into one of the plugin repositories known by the Geronimo
instance, you can simply use the command line deployer to install it into
Geronimo.

So that's my take on it, anyway.  Is this the general idea for how
deployment is expected to work, or am I missing the big picture?

Thanks in advance for the help,
Nathan Mittler