問題描述
paket khusus dalam toples eksternal GWT (specific packages in a external jar GWT)
i have a jar file with many packages, Out of which i need only a few in the Client Side GWT code, but i need this whole jar in my server side.
And as of now this jar doesn't have an xml file.
this is the jar structure ,
source.package1
source.package2
...
So here if i put a xml file in source folder with
<?xml version="1.0" encoding="utf‑8"?>
<module>
<inherits name='com.google.gwt.user.User'/>
<source path='package1'></source>
<source path='package2'></source>
</module>
for only those packages needed and inherit this in my project xml, will it work?
The reason for not including all the packages is, it is not GWT compatible. But the ones i am including are.
‑‑‑‑‑
參考解法
方法 1:
In general this will work, but you have to have .java file and not .class files for GWT to work on. So including the sources of that your (or just the two packages) is also required.
Since you seem to control the build of the other jar file you might want to build a specific gwt jar file that contains your gwt.xml and the .java files for those two packages.
(by mvairavan、Daniel Kurka)