GWT编译器无法在IntelliJ IDEA中找到依赖模块的源 [英] GWT compiler can't find sources of depending module in IntelliJ IDEA

查看:589
本文介绍了GWT编译器无法在IntelliJ IDEA中找到依赖模块的源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用IDEA 117.216

I'm using IDEA 117.216

如果 CrazyCoder会很棒看到这个问题:)

你们如何引用另一个模块,以便GWT编译器看到它?

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

当我说模块时,我指的是IntelliJ IDEA术语中的模块。

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

这是我的情况。我有中间项目(GAE + GWT + RequestFactory)。现在我在我的项目中创建了Android模块。我们的想法是,它将使用 C2DM 并通过RequestFactory(RF)与服务器通信。

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).

很自然地,我在项目中创建了第3个模块并移动了所有RF代理和接口,因此我可以从GWT / GAE模块和Android模块中引用它。

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模块喜欢它,但GWT编译器不喜欢它。它找不到我移动到共享模块的类。给我错误,例如:

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?

我需要注意 SharedClasses模块是作为GWT模块的依赖项添加的。但GWT仍然不知道它的来源在哪里。

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.

您如何解决这个问题?我真的不想有两个编译步骤:首先使用source构建共享类jar,然后构建引用该jar等的GWT项目...

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...

推荐答案

这更像是 IDEA-67661 ,负责任的开发人员解释原因是这样的:

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


IDEA 10确实包含来自模块
的类路径源根源仅限GWT方面
即可。这可以确保不需要的目录不会添加到类路径中的
。此外,您需要在模块
中使用GWT Facet以启用GWT特定的完成和检查...

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...

这篇关于GWT编译器无法在IntelliJ IDEA中找到依赖模块的源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆