简体   繁体   中英

How not load a library into a entry point?

I'm developing a GWT application using Isomorphic's smartGWT tables. The problem is that I've got two entry points, one for the main application and one for a Chrome plugin.

The code of the plugin is very simple and don't need smartGWT however load it. The size of my plugin without smartGWT is 3kB, with smartGWT is 677KB.

If I remove the line that inherits the smartGWT library in the .gwt.xml file ( < inherits name="com.smartgwt.SmartGwt" /> ) for my Chrome plugin the application doesn't compile and throws the following error:

[ERROR] Line 18: No source code is available for type com.smartgwt.client.data.DSResponse; did you forget to inherit a required module?

How I can not load the SmartGWT without the compiling error?

I suggest you to split your GWT project in three projects:

  1. Project A: A GWT library With common code for GWT app and Chrome plugin, with no dependencies to SmartGWT
  2. Project B: A GWT app with dependency to A module and SmartGWT.
  3. Project C: a Chrome plugin with dependency to A module and no dependency to SmartGWT.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM