views:

599

answers:

3

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!

A: 

Just to be sure, that wouldn't be similar to this case, where the exclusion filter was a bit too large?

<classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry excluding="**" kind="src" output="target/classes" 
   path="target/base-resources"/>

I think that you may have an exclusion filter which is too aggressive on your "target/base-resources" directory.
It seems that you have an exclusion filter of "**". Won't that match everything?

You are right! This was the problem! :)))
I didn't know what the exclusion filter was and somehow it was added automatically during the development.

VonC
A: 

Right click the project and select properties. Expand and select Google -> Web Toolkit. The right pane will have a section called Entry Point Modules. Click the add button and select your .gwt.xml file.

Carnell
A: 

Thanks for the suggestions to my question - you prompted me to find the answer. I looked and did not have any exclusion filters but checked the Java Build Path in the project properties.

When I'd added the maven dependencies, it must have implicitly changed the defined source directory of the GWT eclipse project. (Probably to src/main/java or whatever that dumb long-winded maven default path is). Eclipse offered no hints that the Java classes were not on the project build path. Once I defined the src directory explicitly for the project, the gwt.xml module appeared in the GWT Compile dialog box!

On to the next hurdle... coz it still ain't working yet! :(

Thanks for your help!

Alex Worden