You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Cristiano Costantini (JIRA)" <ji...@apache.org> on 2013/12/08 13:52:35 UTC

[jira] [Comment Edited] (SMX4-1634) Create OSGi bundles for GWT 2.6.0

    [ https://issues.apache.org/jira/browse/SMX4-1634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13842495#comment-13842495 ] 

Cristiano Costantini edited comment on SMX4-1634 at 12/8/13 12:51 PM:
----------------------------------------------------------------------

Hi,
I have spent some time investigating which Export-Package and Import-Package headers are required to run GWT web applications on Servicemix, for which I have adapted some sample projects from the GWT main distribution to run on servicemix/karaf.

Please note first that the real GWT jar that it is needed on the server side is gwt-servlet (http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22gwt-servlet%22).

The samples I've adapted use a gwt-servlet jar patched by me with the following BND Tool configurations:
{code}
Export-Package: com.google.gwt.user.client.rpc.*;version=2.6.0.rc1, org.hibernate.validator.engine;version=2.6.0.rc1, com.google.web.bindery.requestfactory.vm.impl.*;version=2.6.0.rc1, !javax.validation, !org.hibernate.validator.*, !*.client.*, !*.impl.*, *;version=2.6.0.rc1

Import-Package: javax.servlet.*, javax.validation;resolution:=optional, org.json;resolution:=optional, javax.validation.*;resolution:=optional, org.json.*;resolution:=optional, !com.google.gwt.*, *;resolution:=optional
{code}

I recognize the result is not simple and clean, I strived to keep the imports as simple as possible, but this is the minimal set I've found to make the examples working. The alternative would be to make heavy use of optional imports.

The main issue is that bnd tool get confused by java imports for GWT client java code (code that does not get executed into the server, but it get compiled to javascript) that are left on gwt-servlet.jar but the imported classes aren't there and for the good reason of not being used at all.

As soon as this ticket is addressed, I'll update the adapted samples (you can find them here: https://github.com/cristcost/gwt-karaf-examples) to use this bundle and I'll test them.





was (Author: cristcost):
Hi,
I have spent some time investigating which Export-Package and Import-Package headers are required to run GWT web applications on Servicemix, for which I have adapted some sample projects from the GWT main distribution to run on servicemix/karaf.

Please note first that the real GWT jar that it is needed on the server side is gwt-servlet (http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22gwt-servlet%22).

The samples I've adapted use a gwt-servlet jar patched by me with the following BND Tool configurations:
Export-Package: com.google.gwt.user.client.rpc.*;version=2.6.0.rc1, org.hibernate.validator.engine;version=2.6.0.rc1, com.google.web.bindery.requestfactory.vm.impl.*;version=2.6.0.rc1, !javax.validation, !org.hibernate.validator.*, !*.client.*, !*.impl.*, *;version=2.6.0.rc1

Import-Package: javax.servlet.*, javax.validation;resolution:=optional, org.json;resolution:=optional, javax.validation.*;resolution:=optional, org.json.*;resolution:=optional, !com.google.gwt.*, *;resolution:=optional

I recognize the result is not simple and clean, I strived to keep the imports as simple as possible, but this is the minimal set I've found to make the examples working. The alternative would be to make heavy use of optional imports.

The main issue is that bnd tool get confused by java imports for GWT client java code (code that does not get executed into the server, but it get compiled to javascript) that are left on gwt-servlet.jar but the imported classes aren't there and for the good reason of not being used at all.

As soon as this ticket is addressed, I'll update the adapted samples (you can find them here: https://github.com/cristcost/gwt-karaf-examples) to use this bundle and I'll test them.




> Create OSGi bundles for GWT 2.6.0
> ---------------------------------
>
>                 Key: SMX4-1634
>                 URL: https://issues.apache.org/jira/browse/SMX4-1634
>             Project: ServiceMix 4
>          Issue Type: Task
>          Components: Bundles
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>             Fix For: bundles-2013.12
>
>




--
This message was sent by Atlassian JIRA
(v6.1#6144)