GWT Compile "Add an entry point module" dialog

Alex Worden picture Alex Worden · Feb 26, 2010 · Viewed 12.9k times · Source

Can anyone explain where the Eclipse GWT plugin defines it's entry points?

In an attempt to get my old GWT project working again with GWT 2.0, I created a default GWT 2.0 project in Eclipse and was able to run it successfully. It's the one that asks for a name and calls the 'greet' servlet on the server, which responds etc... so far so good.

I then ported all the classes from my older maven GWT project over to this new GWT project in the hopes of getting the RPC calls to work. It had many dependencies, so I also copied over the maven pom.xml, commented out all of the gwt related plugins in the pom, and managed to get the Eclipse M2Eclipse maven pluging to recognize the pom and adopt all of the maven dependencies. All of the issues in Eclipse are now resolved and it looks good to go.

However, when I click on the GWT compile icon for the project, it pops up a "GWT Compile" dialog now asking me to "Add an entry point module". There are no entry points listed to choose from in this dialog. This is frustrating because I kept the exact same GWTApp.gwt.xml and moved my code into the previously-working auto-generated GWTApp.java class.

I can't imagine why the Eclipse plugin doesn't look in the GWTApp.gwt.xml file to figure out what the entry points are.

Can anyone explain how these entry points are defined or suggest why the project stopped working?

Thanks!

Answer

user2080225 picture user2080225 · Jan 11, 2015

I'm certain the following is the problem and solution. I've been doing GWT for about 6 years.

Whenever you import an existing maven (namely from a Mojo-generated archtype, but probably others) project into eclipse, you will get a broken configuration which will not allow you to debug until you fix it. But the fix is simple. What happens is the build path will be set to exclude all files from '[proj]/src/main/resources', and this has the effect of hiding the [proj].gwt.xml module file from eclipse. So all the GWT dialogs that look for those modules can't see them! So you can't even create a debug configuration that works.

Here's the fix:

Right-click the project, and open Properties -> Build Path dialog -> Source Tab, and look for the one ending in '.../src/main/resources', and you will see it has excluded: . So highlight just that entry and remove the '', so that it reads "Excluded: (None)". Now the dialogs (namely the debug configuration dialog), for GWT will all see your module file, and everything will work.