How to run a GWT application from gwt-maven-plugin without any browser plugins?

For the GWT application that I create with the GWT Maven Plugin (gwt-maven-plugin), I can start the GWT development environment with

mvn compilation war: blown up gwt: run

and then launch the browser. This requires the browser to provide a plugin for GWT developers. (Firefox 6, for example, does not yet support the GWT plugin).

Does the GWT Maven plugin also allow you to simply run an included Jetty container with a GWT application without development mode?

+6
java java-ee maven-plugin gwt
Aug 31 '11 at 16:43
source share
2 answers

After configuring the gwt-maven plugin, you can simply run the following.

mvn jetty:run-war

After compiling gwt, the resulting war will be placed on the pier and launched through the Maven Jetty plugin.

+8
Sep 01 '11 at 13:38
source share
— -

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.).

+1
Sep 01 '11 at 8:27
source share



All Articles