Community
Participate
Working Groups
The message in the Orbit news group indicates that com.google.gwt.user should not be installed: http://www.eclipse.org/forums/index.php?t=msg&th=205709&start=0&S=b0fecff194fd8ddcf280e5ebccbf8ed8 The Gerrit connector makes use of com.google.gwt.user.client.rpc.AsyncCallback which is provided by the bundle and hence users will end up with com.google.gwt.user when the Gerrit connector is installed. Is that a concern?
GWT provides two libraries. * gwt-user.jar Used for development time when developing and compiling GWT modules. * gwt-servlet.jar Deployed on the server. This maps one-on-one to the bundles available in Orbit. They are covered by the same CQ because the servlet bundle is just a subset of the user bundle. * com.google.gwt.user Used for development time when developing and compiling GWT modules. * com.google.gwt.servlet Deployed on the server.
Sorry, thought this was filled against Orbit. ;)
Note, in OSGi world it should matter. Please make sure to use Import-Package with the proper version requirement set. This will resolve to the servlet bundle. The user bundle does intentionally not export versions on the packages. P2 will also only resolve to the servlet bundle. Another recommendation I have is to develop the GWT module _not_ in an OSGi bundle but as a separate pure Java project. At runtime (when deployed on the server) a GWT module is pure JavaScript which doesn't need any Java packages at all. Thus, the dependencies are only used at development time. This is a bit confusing, though.
Thanks for the detailed background. That's exactly what I was looking for :). The com.google.gwtjsonrpc library imports the packages which don't seem to be part of the servlet bundle: com.google.gwt.user.rebind, com.google.gwt.user.server.rpc, I guess we should also add version constraints which are currently missing. I'll have to take another pass through these bundles... (In reply to comment #3) > Note, in OSGi world it should matter. Please make sure to use Import-Package > with the proper version requirement set. This will resolve to the servlet > bundle. The user bundle does intentionally not export versions on the packages. > P2 will also only resolve to the servlet bundle. Hmm, we distribute the 2.0.4 version of the gwt.user bundle and p2 seems to install that without complaint. > Another recommendation I have is to develop the GWT module _not_ in an OSGi > bundle but as a separate pure Java project. At runtime (when deployed on the > server) a GWT module is pure JavaScript which doesn't need any Java packages at > all. Thus, the dependencies are only used at development time. This is a bit > confusing, though. We are not actually using the bundles in the classical GWT way but we are need them since they are transitive dependencies of bundles that are part of the Gerrit server. We are using the classes to deserialize the JSON stream from the server but have custom transport layer that is not using GWT. I'll check if we could reduce imports to packages available in the gwt.servlet bundle.
(In reply to comment #4) > com.google.gwt.user.rebind, > com.google.gwt.user.server.rpc, Indeed, rebind isn't usually part of that but server.rpc is. Hmm. Distributing the full user bundle just because of that package seems wrong. Maybe we can get a comment from the developers if that package is really needed at runtime on the server? AFAIK the rebind functionality is only part of the client and doesn't work on the server anyway. > Hmm, we distribute the 2.0.4 version of the gwt.user bundle and p2 seems to > install that without complaint. Ouch. It shouldn't. Maybe I need to add different instructions to a p2.inf. It really should go only into a target platform. But maybe we need to rethink the way the bundles are structured currently.
I have updated the target platform definitions and version constraints in the gerrit bundles.
Created attachment 208796 [details] mylyn/context/zip