【发布时间】:2012-04-28 10:16:39
【问题描述】:
我正在使用 IDEA 117.216
如果CrazyCoder看到这个问题就好了:)
你们如何引用另一个模块以便 GWT 编译器看到它?
当我说模块时,我指的是 IntelliJ IDEA 术语中的模块。
这是我的情况。我有中间项目(GAE + GWT + RequestFactory)。现在我在我的项目中创建了 Android 模块。这个想法是它将使用C2DM 并通过 RequestFactory (RF) 与服务器通信。
所以我很自然地在我的项目中创建了第三个模块,并将所有 RF 代理和接口移到那里,以便我可以从 GWT/GAE 模块和 Android 模块中引用它。
Android 模块喜欢它,但 GWT 编译器不喜欢。它找不到我移到“共享”模块的类。给我错误,例如:
[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?
我需要注意的是,SharedClasses 模块是作为 GWT 模块的依赖项添加的。但 GWT 仍然不知道它的来源。
在我看来是 this bug。
你如何解决这个问题?我真的不想有两个编译步骤:首先使用源构建共享类 jar,然后构建引用该 jar 的 GWT 项目等......
【问题讨论】:
标签: java gwt intellij-idea requestfactory gwt-compiler