Migrating to Eclipse

It was fun but we want to develop our project in Eclipse. Here are the steps (order is important)

Import maven project to your Eclipse by clicking

Eclipse->File->Import->General->"Maven project"

and navigating to the folder that contains your project

Run

mvn gwt:eclipse

from command line

Go back to Eclipse, refresh project folder then right-click on the project node and select "Run As GWT Application"

Dismiss the GWT emulator since it will give you "Page not found" error. I will create a run target for you

Click Run->Run Configuration->GWT Application->Application

In the right pane next to the HTML field click "Browse" button

From the pop-up select war/com.td.engtools.Application/Application.html

Now you should be able to run emulator in the hosting mode from both command-line and from Eclipse

From now on tutorial will refer to root of your project (as seen in Eclipse) as $PROJECT

Prepping for fun

Clean errors

As is - our only test file generates some errors in Android console. To get rid of these add the following line into Application.gwt.xml

<source path="client" excludes="*/*Test*.java"/>

WARNING: Do not name your "regular" java file TestSomething.java that is reserved for "real" test classes!!!

Add ExtGWT to the project

We don't have to worry about gxt.jar however we still need bring in non-java files and add some configurations. So you will need to download actual extGWT distro. Once you have it:

Manually copy $GXT-ROOT/resources to new ext folder nested in the public folder of your client where currently you have your Application.html and Application.css ($PROJECT/src/main/resources/com/mycompany/foo/public/gxt) These will be copied over to war folder as part of the build process

Add the following 2 lines to $PROJECT/src/main/resources/com/td/engtools/public/Application.html

Share this post:

Written by Darrell Meyer
Darrell Meyer leads the Sencha GXT product team at Sencha. Before joining the company, Darrell was the creator of the popular open source MyGWT Widget Library for Google Web Toolkit (GWT). Darrell brings his expert Java and GWT knowledge to Sencha. With 10+ year’s experience building enterprise web applications, Darrell is equally well versed as both a software architect and user interface expert.Follow Darrell on Twitter

1 Comment

Thamizharasu

4 years ago

Hi,
I tried to setup Ext-Gwt project based on maven setup guide. Unfortunately this document is outdated and my project is not running. Do you have any latest steps to setup the project using maven?