Posted by bhavanishankar
on March 6, 2011 at 6:40 AM PST
To start using Embedded GlassFish Server Open Source Edition 3.1 in your Maven project, all you need to do is to have the following configuration in your pom.xml:
<goal>start</goal> <!-- this will run during pre-integration-test phase -->
<goal>deploy</goal> <!-- this will run during pre-integration-test phase -->
<goal>undeploy</goal> <!-- this will run during post-integration-test phase -->
<goal>stop</goal> <!-- this will run during post-integration-test phase -->
<!-- Run maven tests during integration-test phase.
Because the Embeddeded GlassFish should be up & running with the app deployed
in order to run the tests. -->
In 3.1 version of the plugin, lot of new configuration options are added to start/admin/deploy/undeploy goals.
I have made the complete 3.1 plugin documentation available at http://embedded-glassfish.java.net/nonav/plugindocs/3.1/plugin-info.html
Please read the plugin documentation for the new configuration options. If you come across any issues while using the plugin or have any questions about it, please write to email@example.com or firstname.lastname@example.org
In addition to the plugin document, as a reference, there are plenty of tests @ http://java.net/projects/glassfish/sources/svn/show/trunk/v3/tests/embedded/maven-plugin which use this plugin.