Home‎ > ‎IDE‎ > ‎Eclipse‎ > ‎Plugins‎ > ‎

GWT

Setting up the GWT Eclipse plugin.

Installing GWT Plugin

  • Goto the Eclipse Marketplace. Click on Help > Eclipse Marketplace...


  • Search for 'google' and hit enter to filter the results.


  • Click on install for your version of Eclipse. In this case mine is Juno, so I click on 3.8/4.2...


  • Next confirm the plugins. I add them all and click on next.


  • Click on accept and finish.


  • Click on Ok. 

  • The last step is to restart Eclipse.

Basic Use

  • Click on the blue 'g' above package explorer.


  • Here are the options once you select on the blue 'g'...


Standard Java Project Package Format

Creating a GWT Project

This creates a project based on the standard Java packaging format. 

  • Click on the blue 'g' and select New Web Application Project...

  • Define the project settings. I entered Sandbox for the project name and tld.domain.project for package name.

  • And the finished project looks something like this.

GWT Project Plugin Settings

  • Right click on the project and goto Google > Web Toolkit Settings...

  • Configure the Entry point modules here.

  • Configure the war path here. 

Maven GWT Plugin Project Format

  • More about importing Maven projects with Eclipse
  • More about importing Maven projects with IntelliJ IDEA

Maven Project Creation

  • For this demo I'm going to choose this Archetype
  • The -DgroupId & -DartifactId can be changed to anything you desire. 
mvn archetype:generate -DarchetypeGroupId=com.github.branflake2267.archetypes \
-DarchetypeArtifactId=gwt-basic-archetype \
-DarchetypeVersion=1.0-SNAPSHOT \
-DgroupId=com.projectname.project \
-DartifactId=new-project-name \
-DarchetypeRepository=https://oss.sonatype.org/content/repositories/snapshots


  • Goto the OS terminal. Goto the Eclipse workspace directory you desire and then run the maven command above accordingly for your OS. In this case this works for *.nix systems.

  • Right click on the project and select Import.

  • Search for 'maven' and then select Existing Maven Projects.

  • Confirm the the pom.xml and click on finish.

  • Confirm maven lifecycle Eclipse settings and select finish. 

  • When its finished the project will look something like this.

GWT Project Plugin Settings for Maven

The project plugin settings are slightly different for Maven. 

  • GWT SDK path points to the ~/.m2/repository/... GWT sdk location

  • The war path is located in src/main/webapp for a maven project but doesn't have to be.



Comments