The only way to start a project without a plugin is to compile it and run it on the server. If you are using Netbeans, just hit run. The IDE will compile and deploy the project to the server. Another way is to simply compile it with the following command (you can omit tests and reports):
mvn clean:clean resources:resources compiler:compile war:exploded resources:testResources compiler:testCompile surefire:test gwt:compile war:war
After that, you are ready to deploy the war file. To deploy it to Glassfish, there are now three options:
Maven GlassFish Plugin
The first option would be to use the Maven GlassFish Plugin . This plugin allows you to interact with a local or remote GlassFish installation and manage Glassfish domains and component deployments from the Maven build life cycle.
Maven Embedded GlassFish Plugin
The second option is to use the Maven Embedded Glassfish Plugin . As its name indicates, this plugin does not rely on an existing installation, but uses a built-in GlassFish that works in the same JVM as the plugin. This plugin is very nice if you want to keep your assembly portable (anyone can get your POM and run the assembly with GlassFish without installing it) with almost the same functions as a normal GlassFish installation, except for clustering, of course (you can use the pre-configured domain.xml if you want). See Testing with the GlassFish Maven Plugin and JavaDB Embedded for an example.
Maven Cargo Plugin
The work started by Kohsuke Kawagushi was finally integrated into Cargo and, starting with Cargo 1.0.1, is now supported by GlassFish 3.x. Thus, using the Maven Cargo plugin is the third option. This would be interesting for collectors who want to interact with containers in an agnostic way. But I'm not sure that Cargo allows all the flexibility of a special GlassFish plugin (for example, deploying JMS resources, etc.).
kospiotr Sep 01 '11 at 8:27 2011-09-01 08:27
source share