How do I open the GWT samples in eclipse Helios and GWT

The examples that come with GWT SDK were built in different ways. Some are Maven builds, others use Ant. Eclipse can handle these common builds directly, but you have to choose the right option.

So, if you want to open the Expenses project in eclipse, you would look in the projects root directory (i.e. ../gwt2.4/samples/Expenses) where you'll find a file called pom.xml. That is a Maven build file. To import it into your Work space select:

  1. File->Import...
  2. Open Maven->Existing Maven Projects, and click on Next > button
  3. Browse your file system til you reach the Expenses folder. Click on it and Select OK.

At this point it will show you the Projects in that directory in the Projects: area of the window...only one in this case: /pom.xml com.google.gwt.sample.expenses:...etc.

  • click on the checkbox for that project, Next>
  • Finally, it ask you to map plugins. You'll need to select in the drop down menu under Actions the required plugins (such as m2e).

In other project folders you may find a build.xml file instead. That's an Ant build file. To import that you do something similar, but different (of course!):

  1. File->New->Project...
  2. Open the Java folder and select "Java Project from Existing Ant Buildfile", Next >
  3. Click the Browse button, dig through your directory to the project folder and select the build.xml file, and Open it.
  4. Project name should fill in automatically, just select the declaration to use in the middle window and click Finish.

相关推荐