Question

I'm using gwt-maven-plugin to manage a GWT project. I use the gwt:run goal all the time to run locally in "dev mode" for testing. I now want to compile my project into a war for deployment on Tomcat. When I run gwt:compile, however, I get compile errors that indicate a classpath configuration issue. An example:

Finding entry point classes
[ERROR] Errors in 'shared.MyClass.java'
[ERROR] Line 4: The import server.model.MyObject cannot be resolved

Any ideas? Do I need to manually add the server package to some config file somewhere? Thanks in advance for any info.

-tjw

Was it helpful?

Solution

Ok, I found the problem. I found this in the GWT forums by Thomas Broyer (a GWT dev):

I mean you have to "javac" classes that are referenced from annotations (in this case, the PlaceTokenizer classes referenced from @WithTokenizers; that'd be true also of your service, domain object, locator or service locator with RequestFactory, unless you use @ServiceName and @ProxyForName). Otherwise, GWT can work with only the *.java files, without the *.class.

I am trying to load in these classes from annotations since they are used with RequestFactory. My question is now this: How is this restriction not completely insane?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top