Hi Cristiano,
I'm working on the Spring bundles today, but I plan to resume my work on
GWT bundles tomorrow.
Your patch can't be included in SMX bundle as you don't use the SMX
infrastructure (right now we use maven-bundle-plugin and shade). I don't
think BND and Ant are required to create a bundle for GWT.
Actually, maven-bundle-plugin uses BND (not BNDTools) and we should be
able to do OSGi bundles for GWT (I did GWT 2.4 bundles without problem).
The behaviour also depends on the maven-bundle-plugin version. Did you
try with 2.4.0 ?
Regards
JB
On 01/31/2014 04:33 PM, Cristiano Costantini wrote:
Hi Jean-Baptiste, hi all,
Today GWT 2.6.0 has been announced, and we have an open ticket SMX (
https://issues.apache.org/jira/browse/SMX4-1634) for making it available
for use in OSGi.
I care about this ticket because in the latest months in my spare time I
have studied and created example projects that use GWT inside ServiceMix:
- https://github.com/cristcost/gwt-karaf-examples (classic GWT examples
adapted to run on karaf/servicemix)
- https://github.com/cristcost/springsec (spring security applied to spring
beans and to JSP and Spring MVC that publish a GWT application over
ServiceMix - and includes AngulaarJS and jQuery basic examples)
- https://github.com/cristcost/gwt-websocket (example of Jetty WebSockets,
one with jQuery and one with GWT, over Karaf 2.3.3 - I needed to use a
newer Jetty version than the one in Smx 4.5.3)
- https://github.com/cristcost/sensormix (a full modular application
composed of many bundles, that interact with Android, Arduino and iOS with
Apache Camel and that publish a GWT web application over ServiceMix, see
the related slides http://cristcost.github.io/sensormix-slides/ )
For all these projects I need a gwt-servlet.jar (the GWT dependency
required on server side) that is compliant with OSGi by exporting the
required packages.
In November I proposed a patch to GWT Community, but it didn't raised
attention of so many contributors and this was not included in GWT 2.6.0.
So I rely in SMX4-1634 to obtain a GWT Bundle to use for the above projects.
Jean-Baptiste is already working on it but making GWT a bundle is not
straightforward and I would like to ask help to other SMX contributors.
The gwt-servlet.jar is not a regular project but rather a subset of
bytecode classes grouped together, so it's not easy to make it a bundle.
GWT uses Ant for build, and my patch uses a BND Ant task (version 1.50.0)
to add OSGi headers:
https://gwt-review.googlesource.com/#/c/5351/7/servlet/build.xml
with the following configuration for BND:
https://gwt-review.googlesource.com/#/c/5351/7/servlet/gwt-servlet.bnd
But if I apply the same BND configuration in project like the a servicemix
bundle (here is the pom.xml that I have used:
https://gist.github.com/cristcost/8733491) it does not work.
maven-bundle-plugin seems to behave differently than the BND tool and I
cannot understand the differences and fix it.
Could anyone help me?
Thank you all for the support!
Cristiano
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com