asadmin-maven-plugin-0.2 released
I released the second version of asadmin-maven-plugin today.
It added the following features :
- Issue#1: support for maven projects with “ejb” packaging
- support for (un)deploying to remote glassfish instance (thanks to Larry Sanderson that provided the patch)
The following issues were fixed :
- Issue#2: asadmin is not found when only glassfishHome is specified and glassfishHome/bin not in PATH (thanks to streifi that provided a patch)
- Issue#3: asadmin:start-domain hangs on windows (thanks again to streifi)
Go to the project’s page for more information.
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” :
A repository for asadmin-maven-plugin
To ease the use of asadmin-maven-plugin I have set up a public repository that you can add to your maven settings / poms / proxies for maven to be able to download the plugin automagically.
The repositories are :
- Releases Repository : http://asadmin-maven-plugin.googlecode.com/svn/trunk/repository/releases - contains nothing ATM
- Snapshots Repository : http://asadmin-maven-plugin.googlecode.com/svn/trunk/repository/snapshots - contains the 0.1-SNAPSHOT
Here is the xml snippet you could add to your pom.xml file :
<pluginRepositories>
<pluginRepository>
<id>asadmin-maven-plugin-releases-repository</id>
<name>asadmin-maven-plugin-releases-repository</name>
<url>http://asadmin-maven-plugin.googlecode.com/svn/trunk/repository/releases</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>false</enabled></snapshots>
</pluginRepository>
<pluginRepository>
<id>asadmin-maven-plugin-snapshots-repository</id>
<name>asadmin-maven-plugin-snapshots-repository</name>
<url>http://asadmin-maven-plugin.googlecode.com/svn/trunk/repository/snapshots</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
Plus, if you browse the source tree you’ll find two exemple projects, a WAR and an EAR, that use this plugin.
A simple maven plugin for Glassfish: asadmin-maven-plugin
To seamlessly use Glassfish from maven projects, JSR-88 seems to be answer. The cargo maven plugin has JSR-88 support planned but this will take time.
I published some days ago a maven plugin that simply wraps the asadmin command and aims to provide maven integration for starting, stopping glassfish and deploying and undeploying applications and modules.
Go to the Google Code page of asadmin-maven-plugin to download a preview version named asadmin-maven-plugin-0.1-SNAPSHOT : http://code.google.com/p/asadmin-maven-plugin/
The api is designed for easy extensibility so feel free to submit contributions !
(more…)