EDIT: I updated my answer with the extra steps provided by OP. Credits for OP for details.
I just broke the Eclipse setup, trying to install the latest Google plugin for Eclipse (for GWT 2.0), so I canโt confirm everything, but let's say the following prerequisites are fulfilled:
Have you tried:
Create a new project from Eclipse (New> Other ... then select the Maven Project and select the gwt-maven-plugin archetype).
Edit the generated pom.xml , update the gwt.version property to 2.0.0 (which was released in the central repo), add the Codehaus snapshot repository and set the version of gwt-maven-plugin to 1.2-SNAPSHOT (version 1.2 will not be released in the center , this should happen soon) 1.2 (which was also released in the center).
Add <runTarget> to the gwt-maven-plugin configuration as described in Using the Google Eclipse Plugin .
Configure the maven-war plugin as described on the page mentioned in the previous step.
Manually enable GWT in the project from the projectโs preferences by checking the Use Google Web Toolkit box . This step is not necessary as you will create / run using the Maven launch configuration, not the GWT Plugin for Eclipse.
This is what my pom.xml looks like:
<?xml version="1.0" encoding="UTF-8"?> <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"> <modelVersion>4.0.0</modelVersion> <groupId>com.mycompany.demo</groupId> <artifactId>my-gwtapp</artifactId> <packaging>war</packaging> <version>0.0.1-SNAPSHOT</version> <name>gwt-maven-archetype-project</name> <properties> <gwt.version>2.0.0</gwt.version> <maven.compiler.source>1.5</maven.compiler.source> <maven.compiler.target>1.5</maven.compiler.target> </properties> <dependencies> <dependency> <groupId>com.google.gwt</groupId> <artifactId>gwt-servlet</artifactId> <version>${gwt.version}</version> <scope>runtime</scope> </dependency> <dependency> <groupId>com.google.gwt</groupId> <artifactId>gwt-user</artifactId> <version>${gwt.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.4</version> <scope>test</scope> </dependency> </dependencies> <build> <outputDirectory>war/WEB-INF/classes</outputDirectory> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>gwt-maven-plugin</artifactId> <version>1.2</version> <executions> <execution> <goals> <goal>compile</goal> <goal>generateAsync</goal> <goal>test</goal> </goals> </execution> </executions> <configuration> <runTarget>com.mycompany.demo.gwt.Application/Application.html</runTarget> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.0.2</version> <configuration> <warSourceDirectory>war</warSourceDirectory> <webXml>src/main/webapp/WEB-INF/web.xml</webXml> </configuration> </plugin> </plugins> </build> </project>
Run the gwt:eclipse target (using m2eclipse Maven2> build ...) to configure your environment and create a launch configuration for your GWT modules.
Run gwt:compile gwt:run to compile and run the GWT module in GWT hosting mode.
Pascal Thivent Dec 12 '09 at 18:19 2009-12-12 18:19
source share