继承非gwt模块 [英] inherit a non gwt module
问题描述
我有一个使用gwt的项目,并且依赖于我公司的svn中的多个组件。在我的MainApp.gwt.xml中,我继承了这些模块。问题是,其中一个似乎不是一个gwt模块,所以我得到这个错误:
I have a project that uses gwt and has dependencies to several components in my company's svn. In my MainApp.gwt.xml I inherit those modules. The problem is, that one of those seems not to be a gwt module, so I get this error:
ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] GWT Module com.sample.project.sample-module-b not found in project sources or resources.
但是我也不能删除它,因为还有另一个模块,需要这个源代码模块-b中。如果我删除行
But I also can't just delete it, since there is another module, that needs sources from this module-b. If I delete the line
<inherits name="com.sample.project.sample-module-b"/>
从我的MainApp.gwt.xml中得到以下错误:
from my MainApp.gwt.xml I get the following error:
[ERROR] Errors in 'jar:file:/C:/pathToRepository/com/sample/project/sample-module-a/0.1-SNAPSHOT-sources.jar!/com/sample/project/a/to/ClassA.java'
[ERROR] Line 23: No source code is available for type com.sample.project.module-b.ClassB; did you forget to inherit a required module?
我在maven-dependencies中添加了module-a和module-b,但是没有做的伎俩。
是否有可能继承该模块,但它不是gwt模块?
我自己的类永远不会直接使用模块-B,只是在这种依赖关系中。
如何告诉module-a或我的MainApp使用来自模块b的源而不将其视为gwt模块?
希望有人能给我一个提示。
最好的问候,Kayz
I added both module-a and module-b to my maven-dependencies, but that didn't do the trick. Is there any possibility to inherit that module althogh it's not a gwt module? My own classes never use module-b directly, just in this dependency. How do I tell module-a or my MainApp to use sources from module-b without treating it as gwt module? Hopefully anybody kann give me a hint. Best regards, Kayz
推荐答案
要解决这个问题,我必须做以下事情:
在我的MainApp src / main / resources文件夹我把文件夹结构com.sample.project。在该文件夹中,我创建了文件module-b.gwt.xml,一切正常。
To solve this problem I had to do the following: Under my MainApp src/main/resources folder I put the folder structure com.sample.project. In that folder I created the file module-b.gwt.xml and everything worked fine.
这篇关于继承非gwt模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!