我正在使用 Maven 构建 GWT 应用程序。我的应用程序使用一些自定义 UI 表单而不是标准表单。我有带有自定义 UI 表单的文件,打包在 .jar
文件中。
我的.ui.xml
文件包含以下内容:
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui'
xmlns:nc='custompackage.gwt.fields.client.widgets.reference'
>
...
<nc:UIReferenceField width="100%" text = "123" nc:field="rf"/>
...
我的模块.gwt.xml
文件继承自定义类:
...
<inherits name="custompackage.gwt.fields.Fields"/>
...
当我构建 Maven 模块时,我得到:
Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.6.0:compile (default) on project geographical-view-for-osp-gwt-2: GWT Module com.netcracker.platform.ui.toolkit.gwt.i18n.i18n not found in project sources or resources.
我研究过类似的问题,但他们的解决方案对我没有任何帮助。你能帮我吗?
P.S.:我的模块在没有自定义字段的情况下构建良好。
最佳答案
我没有向我的 .pom 文件添加一些依赖项。我继承的模块依赖于它们,但它无法编译。
关于java - 在项目源或资源 GWT 中找不到类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37144121/