具有依赖项目源的超级开发模式
SuperDevMode with dependent Project Source
我有一个名为ProjectA
的GWT项目,这是一个使用GWT eclipse插件生成的简单Web应用程序项目。
另外,我还有第二个项目(projectB),这是一个纯Java项目,具有以下结构
src/com/test/shared/TestClass.java
src/com/test/Shared.gwt.xml
Shared.gwt.xml像这样:
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='shared'>
<inherits name='com.google.gwt.user.User'/>
<source path='shared'/>
</module>
TestClass.java 是:
public class TestClass {
public static void start() {
// do something
}
}
在项目A的gwt中.xml我包括了<inherits name="com.test.Shared" />
。我在项目A的某种方法中使用TestClass.start()
。然后,我将项目 B 包含在项目 A 中。因此,我右键单击项目A>属性>Java构建路径>项目并添加了项目B。我切换到Order and Export
选项卡并激活了项目B上的复选标记。
目前为止,一切都好。当我在项目 A 上执行 GWT 编译时,我没有收到任何错误,但是当我在 SuperDevMode 中运行项目 A 时,编译器会打印以下错误:
GET /recompile/mobilePhoneGapIOS
Job test.mobile.MobilePhoneGapIOS_1_4
starting job: test.mobile.MobilePhoneGapIOS_1_4
binding: mgwt.density=xhigh
Compiling module test.mobile.MobilePhoneGapIOS
Ignored 1 unit with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
Computing all possible rebind results for 'com.gwtplatform.mvp.client.ApplicationController'
Rebinding com.gwtplatform.mvp.client.ApplicationController
Invoking generator com.gwtplatform.mvp.rebind.ApplicationControllerGenerator
[ERROR] The type 'test.mobile.client.BootstrapperImpl' was not found.
[ERROR] Errors in 'gen/com/google/gwt/lang/test_00046mobile_00046MobilePhoneGapIOS__EntryMethodHolder.java'
[ERROR] Line 3: Failed to resolve 'com.gwtplatform.mvp.client.ApplicationController' via deferred binding
[WARN] For the following type(s), generated source was never committed (did you forget to call commit()?)
[WARN] com.gwtplatform.mvp.client.ApplicationControllerImpl
Unification traversed 597 fields and methods and 351 types. 2 are considered part of the current module and 22 had all of their fields and methods traversed.
[WARN] Some stale types ([test.mobile.client.BootstrapperImpl$7, test.mobile.client.BootstrapperImpl$6, test.mobile.client.BootstrapperImpl$5, test.mobile.client.BootstrapperImpl$4, test.mobile.client.BootstrapperImpl$3, test.mobile.client.BootstrapperImpl$2$3, test.mobile.client.BootstrapperImpl, test.mobile.client.BootstrapperImpl$2$2, test.mobile.client.BootstrapperImpl$2, test.mobile.client.BootstrapperImpl$1, com.gwtplatform.dispatch.rest.client.serialization.com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment, test.mobile.client.BootstrapperImpl$9, test.mobile.client.BootstrapperImpl$8, com.gwtplatform.mvp.client.com_gwtplatform_mvp_client_DesktopGinjectorImpl, com.gwtplatform.mvp.client.DesktopGinjectorProvider, test.mobile.client.BootstrapperImpl$2$1, test.mobile.client.com_gwtplatform_mvp_client_DesktopGinjector_DesktopGinjectorGinjector_fragment, com.gwtplatform.mvp.client.ClientGinjector, test.mobile.client.BootstrapperImpl$10]) were not reprocessed as was expected. This is either a compiler bug or a Generator has legitimately stopped creating these types.
[ERROR] Compiler returned false
[WARN] recompile failed
[WARN] continuing to serve previous version
错误没有显示TestClass类,但是当我注释掉它(不使用TestClass.start()
)时,它在SDM中编译没有问题。
我知道我可以预编译项目 B 并将源代码作为 jar lib 包含在项目 A 中,但我希望能够一直修改项目 B 的代码。
如何在使用链接的项目 B 时让超级开发模式工作?
生成器可能需要在路径中编译.class文件。因此,请尝试将 bin/(或 Eclipse 调用的任何内容)文件夹包含在类路径中
相关文章:
- webpack开发模式和生产构建模式之间有什么区别
- Pinterest API应用程序处于开发模式(因此我可以使用http重定向)
- 不确定我在PHP AJAX中使用的是什么开发模式
- ReactJS处于开发模式
- 在开发模式下屏蔽本地主机上的谷歌广告
- GWT开发模式或移动设备上的超级开发模式
- 具有依赖项目源的超级开发模式
- 开发模式下 Rails 3.2 的请求处理顺序
- Rails 4 App-JS在开发模式下可以与Webrick合作,但不能与Passenger/Apache2合作
- 如何从JavaScript中判断ReactJS是否处于开发模式
- AngularJS使用GruntJS的开发模式
- 生产模式下的UglifyJSPlugin显示一个React开发模式警告
- 是否有一个标准的方法来指定一个node.js应用程序是在生产模式(或开发模式)
- Jquery插件开发模式
- 封闭开发模式&Chrome打包应用——“document.write()”在打包应用的沙箱中不可用
- 在Chrome开发模式下设置函数调用的断点
- Meteor路由器在开发模式下工作,但不在生产模式下
- 奇怪的IE,Javascript只能在开发模式下工作(F12)
- Webpack/如何在开发模式下不捆绑JS文件
- 如何将jQuery代码转换为插件?以及插件开发模式