【问题标题】:GWT - Compilation error: No source code is available for typeGWT - 编译错误:没有可用于类型的源代码
【发布时间】:2012-08-06 23:40:03
【问题描述】:

我正在通过 Maven 构建 GWT 应用程序。

编译时得到以下信息:

Validating newly compiled units

一开始有这个警告:

[WARNING] Don't declare gwt-dev as a project dependency. This may introduce complex dependency conflicts

然后出现这个错误:

[ERROR] Line 19: No source code is available for type org.apache.commons.lang.StringUtils did you forget to inherit a required module?

尽管这个版本没有下降并且开发模式可以正常工作。 我怎样才能摆脱这些错误消息?

【问题讨论】:

    标签: java maven gwt compiler-errors gwt2


    【解决方案1】:

    也许原因在于您的模块文件。您应该识别要编译的包。这是在.gwt.xml 模块中配置的。

    <source path="packagename">
    

    而GWT编译器会编译包gwtxmlmodulepath.packagename

    See more

    【讨论】:

      【解决方案2】:

      该错误意味着某些客户端代码(将被编译为 javascript)包含对 Apache Commons 的 StringUtils 类的引用。这是不允许的,因为此库包含与 GWT 客户端不兼容的代码。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-07-12
        • 2013-10-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多