I've been trying to integrate deploying java .war
's in GlassFish V3 through Maven. While I have found a few plugins, none of them look to be very active:
And I got the most information out of Eskato's Blog, it was written March 2008, so I don't know what the state of GlassFish Maven integration is, nor can I find a suitable plugin to work with. With the Maven GlassFish Plugin I have had some success, but it still doesn't work entirely well for all goals it says it supports, which makes some of the commands ineffective.
Has anyone else been able to integrate Glassfish V3 and Maven successfully? If so, what resources did you use to get it done?
Update: CARGO-491 has been fixed and I've updated my answer accordingly. To summarize, there are now basically three options:
A first option would be to use the Maven GlassFish Plugin. This plugin allows to interact with a local or remote GlassFish install and the management of Glassfish domains and component deployments from within the Maven build lifecycle.
The second option would be to use the Maven Embedded Glassfish Plugin. As stated by its name, this plugin doesn't rely on an existing install but uses an embedded GlassFish, running in the same JVM as the plugin. This plugin is extremely nice if you want to keep your build portable (anybody can get your POM and run a build involving GlassFish without having it installed) with almost the same features as a normal GlassFish install, except clustering of course (you can use a preconfigured domain.xml
if you want). See Testing with the GlassFish Maven plugin and JavaDB Embedded for an example.
The work initiated by Kohsuke Kawagushi as been finally integrated in Cargo and, starting with Cargo 1.0.1, GlassFish 3.x is now supported. Using the Maven Cargo plugin is thus a third option. This would be interesting for builds that want to interact with containers in an agnostic way. But I'm not sure Cargo allows all the flexibility of the GlassFish specific plugin(s) (e.g. deployment of JMS resources, etc).