Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strong>EDIT:</strong> I've updated my answer with additional steps provided by the OP. Credits to the OP for the details.</p> <p>I just broke my Eclipse setup trying to install the latest version of the Google Plugin for Eclipse (for GWT 2.0) so I can't confirm everything but, let's assume the following prerequisites are fulfilled:</p> <ul> <li>Eclipse 3.5</li> <li>Google Plugin for Eclipse (installed from <a href="http://dl.google.com/eclipse/plugin/3.5" rel="noreferrer">http://dl.google.com/eclipse/plugin/3.5</a>, see <a href="http://code.google.com/intl/en/eclipse/docs/getting_started.html" rel="noreferrer">instructions</a>)</li> <li>m2eclipse Plugin for Eclipse (installed from <a href="http://m2eclipse.sonatype.org/update" rel="noreferrer">http://m2eclipse.sonatype.org/update</a>)</li> </ul> <p>Did you try to:</p> <ol> <li><p>Create a new project from Eclipse (<em>New > Other...</em> then select <em>Maven Project</em> and choose the <em>gwt-maven-plugin</em> archetype).</p></li> <li><p>Edit the generated <code>pom.xml</code>, update the <code>gwt.version</code> property to <code>2.0.0</code> (which has been released in the central repo), <strike>add the <a href="http://mojo.codehaus.org/using-sandbox-plugins.html" rel="noreferrer">Codehaus Snapshot</a> repository</strike> and set the <code>gwt-maven-plugin</code> version to <strike><code>1.2-SNAPSHOT</code> (the version 1.2 isn't released in central, this should happen soon)</strike> <code>1.2</code> (which has been released in central too).</p></li> <li><p>Add a <code>&lt;runTarget&gt;</code> to the gwt-maven-plugin configuration as documented in <a href="http://mojo.codehaus.org/gwt-maven-plugin-1.1/eclipse/google_plugin.html" rel="noreferrer">Using the Google Eclipse Plugin</a>.</p></li> <li><p>Configure the maven-war-plugin as documented in the page mentioned in the previous step. </p></li> <li><p><strike>Manually enable GWT on the project from project preference by setting the <em>Use Google Web Toolkit</em> checkbox</strike> This step is unnecessary since you'll be building/running with a Maven run configuration, not the GWT Plugin for Eclipse.</p></li> </ol> <p>This is how my <code>pom.xml</code> actually looks like:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt; &lt;!-- GWT-Maven archetype generated POM --&gt; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; &lt;groupId&gt;com.mycompany.demo&lt;/groupId&gt; &lt;artifactId&gt;my-gwtapp&lt;/artifactId&gt; &lt;packaging&gt;war&lt;/packaging&gt; &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt; &lt;name&gt;gwt-maven-archetype-project&lt;/name&gt; &lt;properties&gt; &lt;!-- convenience to define GWT version in one place --&gt; &lt;gwt.version&gt;2.0.0&lt;/gwt.version&gt; &lt;!-- tell the compiler we can use 1.5 --&gt; &lt;maven.compiler.source&gt;1.5&lt;/maven.compiler.source&gt; &lt;maven.compiler.target&gt;1.5&lt;/maven.compiler.target&gt; &lt;/properties&gt; &lt;dependencies&gt; &lt;!-- GWT dependencies (from central repo) --&gt; &lt;dependency&gt; &lt;groupId&gt;com.google.gwt&lt;/groupId&gt; &lt;artifactId&gt;gwt-servlet&lt;/artifactId&gt; &lt;version&gt;${gwt.version}&lt;/version&gt; &lt;scope&gt;runtime&lt;/scope&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;com.google.gwt&lt;/groupId&gt; &lt;artifactId&gt;gwt-user&lt;/artifactId&gt; &lt;version&gt;${gwt.version}&lt;/version&gt; &lt;scope&gt;provided&lt;/scope&gt; &lt;/dependency&gt; &lt;!-- test --&gt; &lt;dependency&gt; &lt;groupId&gt;junit&lt;/groupId&gt; &lt;artifactId&gt;junit&lt;/artifactId&gt; &lt;version&gt;4.4&lt;/version&gt; &lt;scope&gt;test&lt;/scope&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;build&gt; &lt;outputDirectory&gt;war/WEB-INF/classes&lt;/outputDirectory&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt; &lt;artifactId&gt;gwt-maven-plugin&lt;/artifactId&gt; &lt;version&gt;1.2&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;goals&gt; &lt;goal&gt;compile&lt;/goal&gt; &lt;goal&gt;generateAsync&lt;/goal&gt; &lt;goal&gt;test&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;configuration&gt; &lt;runTarget&gt;com.mycompany.demo.gwt.Application/Application.html&lt;/runTarget&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;!-- If you want to use the target/web.xml file mergewebxml produces, tell the war plugin to use it. Also, exclude what you want from the final artifact here. &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt; &lt;configuration&gt; &lt;webXml&gt;target/web.xml&lt;/webXml&gt; &lt;warSourceExcludes&gt;.gwt-tmp/**&lt;/warSourceExcludes&gt; &lt;/configuration&gt; &lt;/plugin&gt; --&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt; &lt;version&gt;2.0.2&lt;/version&gt; &lt;configuration&gt; &lt;warSourceDirectory&gt;war&lt;/warSourceDirectory&gt; &lt;webXml&gt;src/main/webapp/WEB-INF/web.xml&lt;/webXml&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;/project&gt; </code></pre> <p>Run the <code>gwt:eclipse</code> goal (using m2eclipse Maven2 > build...) to setup your environment and create the launch configuration for your GWT modules.</p> <p>Run <code>gwt:compile gwt:run</code> to compile and run a GWT module in the GWT Hosted mode.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload