GWT Maven Plugin - gwt: run works, but gwt: compilation does not work. What for?

I am using gwt-maven-plugin to manage a GWT project. I use the gwt:run target all the time to gwt:run locally in "dev" mode for testing. Now I want to compile my project into a war for deployment on Tomcat. However, when I run gwt:compile , I get compilation errors indicating a class path configuration problem. 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 configuration file? Thanks in advance for any information.

-tjw

+4
source share
1 answer

Ok, I found a problem. I found this on the GWT forums by Thomas Breuer (GWT developer):

I mean, you should use the javac classes referenced by annotations (in this case the PlaceTokenizer classes referenced by @WithTokenizers; this also applies to your service, domain object, locator or service locator using RequestFactory if you are not using @ServiceName and @ProxyForName). Otherwise, GWT can only work with * .java files without * .class.

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

+5
source

Source: https://habr.com/ru/post/1389760/


All Articles