GWT compiler can't find sources of depending module in IntelliJ IDEA

丶灬走出姿态 提交于 2019-12-21 20:35:59

问题


I'm using IDEA 117.216

It would be great if CrazyCoder sees this question :)

How do you guys reference another module so GWT compiler sees it ?

When I say module I mean module in IntelliJ IDEA's terminology.

Here is my situation. I have midside project (GAE + GWT + RequestFactory). Now I created Android module in my project. The idea is that it will use C2DM and talk to the server via RequestFactory (RF).

So naturally I created 3rd module within my project and moved all RF proxies and interfaces there so I can reference it both from GWT/GAE module and Android module.

Android module likes it, but GWT compiler doesn't. It can't find classes that I moved to "shared" module. Giving me errors such as:

[ERROR] Errors in 'file:/C:/work/sideprojects/courierapp/src/com/blah/courierApp/client/admin/AdminPage.java'
[ERROR] Line 77: No source code is available for type com.blah.shared.proxies.OrderProxy; did you forget to inherit a required module?
[ERROR] Line 81: No source code is available for type com.blah.shared.factories.AdminRequestFactory; did you forget to inherit a required module?

I need to note that SharedClasses module is added as dependency for GWT module. But still GWT doesn't know where its sources are.

It seems to me it's this bug.

How do you solve this ? I don't really want to have two steps of compilation: build shared classes jar with sources first, then build GWT project that references that jar and etc...


回答1:


It's more like IDEA-67661 where the responsible developer explains why it is so:

IDEA 10 indeed includes to the classpath source roots from modules with GWT facets only. This ensures that unneeded directories aren't added to the classpath. Also you need to have a GWT Facet in a module to enable GWT-specific completion and inspections in it...




回答2:


You must let .java files in the module. GWT compiler works with them, not with .class files.



来源:https://stackoverflow.com/questions/10185057/gwt-compiler-cant-find-sources-of-depending-module-in-intellij-idea

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!