views:

878

answers:

1

I am writing an application that integrates Geoserver with a custom component, intended to be hosted on a single servlet engine. Both are Maven based projects, and I would like to stay in Maven land to package it all into a nice distributable. The general idea I have is to add another module to my application that packages the application itself, Geoserver and all dependencies into one nice archive.

I am aware of the maven-assembly-plugin and its capability of storing all dependencies in a target folder, but I am not sure what would be the best way to create a package that it easy to deploy. Googling for any examples has not been successful.

Extra bonus points if the module can be started via mvn jetty:run.

+1  A: 

Have you considered packaging them into an EAR project. It will bundle a set of WARs (and jars), and allows you to specify or generate a deployment descriptor.

Rich Seller
you could use jboss:deploy to get the same effect as jetty:run
sal
@sal, is it exactly the same? I thought jboss:deploy is packaging the ear for delivery to an existing JBoss server via JMX, whereas jetty:run runs an embedded Jetty instance using the current project.
Rich Seller
@sal: the nice thing about jetty:run is that you can start an application without relying on any external server component. This means no extra deployment issues and no management of access rights, which is convenient e.g. for functional testing (both manual and automated).
Peter Becker
@Rich: had avoided the EARs so far, but you might be right. I'll look into that.
Peter Becker
I actually decided that it is much easier to use the Cargo plugin for managing the Servlet engine, which lets you run deploy multiple WARs into one engine started with a Maven goal.Since that wasn't my question (even if it should have been), I'll accept Rich's answer -- I believe he is right, but I haven't tested it.
Peter Becker