没有源代码可用于<xyz>类型;你忘了继承一个必需的模块吗?

时间:2015-06-18 18:56:40

标签: eclipse maven gwt

我试图在我的GWT项目中添加dependency。问题是我收到以下错误:

[INFO] --- gwt-maven-plugin:1.0-beta-2:codeserver (default-cli) @ mahlzeit-web ---
[INFO] Turning off precompile in incremental mode.
[INFO] Super Dev Mode starting up
[INFO]    workDir: E:\java\mahlzeit-web\mahlzeit-web\target\gwt\codeserver
[INFO]    Loading Java files in com.mahlzeit.web.App.
[INFO]    Tracing compile failure path for type 'com.mahlzeit.web.GoogleCalendarPanel'
[INFO]       [ERROR] Errors in 'file:/E:/java/mahlzeit-web/mahlzeit-web/mahlzeit-web-client/src/main/java/com/mahlzeit/web/GoogleCalendarPanel.java'
[INFO]          [ERROR] Line 54: No source code is available for type com.bradrydzewski.gwt.calendar.client.Calendar; did you forget to inherit a required module?
[INFO]          [ERROR] Line 161: No source code is available for type com.bradrydzewski.gwt.calendar.client.event.DeleteHandler<T>; did you forget to inherit a required module?
[INFO]          [ERROR] Line 162: No source code is available for type com.bradrydzewski.gwt.calendar.client.event.DeleteEvent<T>; did you forget to inherit a required module?

我知道我必须在我的<source ...>文件中添加App.gwt.xml之类的内容,但生成。我在Eclipse中使用gwt-maven-archetypes

如何添加此依赖项s.t. GWT编译器查找库.jar文件中的源代码?

1 个答案:

答案 0 :(得分:1)

您需要将适当的<inherits/>添加到src/main/module.gwt.xml

插件只会为包含META-INF/gwt/mainModule的JAR生成那些继承(如果你的意思是&#34;生成的是#34;),即几乎都没有。< / p>