Maven plugins for Glassfish ecosystem
This post is only a snapshot of what is available at the time of writing to use Glassfish from maven., seen from the perspective of a simple maven plugin developer (simple plugin or simple developer ?).
Before beginning asadmin-maven-plugin, I searched and tried several ways to use Glassfish from maven. Main use case is simply deployment and undeployment of applications.
There are two ways to do this “programmatically” :
Here are all the glassfish maven plugins I’ve found :
- cargo-maven2-plugin on http://codehaus.org/
The Cargo maven plugin project will provide the JSR-88 way soon or later.
- glassfish-maven-plugin on http://code.google.com
I couldn’t make this one work, source code available in the subversion repository has not moved since december, 2007. This plugin use the same approach as asadmin-maven-plugin : using the asadmin command
- glassfish-maven-plugin on http://java.net
No source code, no files released yet.
- maven-glassfish-plugin on http://java.net again
No source code, no files released yet.
- clownfish-maven-plugin on http://sourceforge.net
Appears to use the JSR-88 Glassfish implementation. I did not try this one yet.
Appart from this, the exec-maven-plugin allows to execute external commands and some posts on the net provide examples of using this plugin to invoke the asadmin command from a maven pom. Some others posts talks about using ant tasks inside maven pom to invoke asadmin.
In fact asadmin-maven-plugin is based on what Wouter van Reeven explain in a post called Deploying to GlassFish using Maven2 on the AMIS Technology Blog. I was using the exec-maven-plugin the way it’s explained there in my projects when I realized how much xml I had to copy/paste around.
At the end of the day, asadmin-maven-plugin is just a convenience maven plugin to execute the asadmin glassfish command leveraging the “convention over configuration” concept that maven teached to me.
In conclusion, I hope that the support for JSR-88 will soon be available in Cargo as we, developers, mostly need the cargo’s integration api usable from unit tests. On the other side, I hope that beside the immediate need of a working solution I’ll have time to maintain and continue asadmin-maven-plugin development.
Next time I’ll publish some documentation about asadmin-maven-plugin configuration.
Hi,
Clownfish plugin binary is now available at:
http://sourceforge.net/project/platformdownload.php?group_id=222137
Installation and usage is also available at:
http://clownfish.sourceforge.net
Cheers,
lyeung
Hi lyeung,
This post already provided a link to your project.
With your investment in jsr-88, have you in mind to work with the cargo team ? Just curious.
Regards,
eskatos
Hi Eskatos,
Thanks for providing this plugin. I will definately have a look at this later this week.
Thanks, Wouter
Yes, I’m open to this option.
Cheers,
lyeung
@Wouter van Reeven : give me feedback
@lyeung : nice, we all need support for jsr-88 in maven integration tests