Hi Cristiano,
thanks for the update.
gist is fine. Let me take a look at it (later today, I'm just waking up
here in California ;)).
I keep you posted.
Regards
JB
On 02/01/2014 05:21 PM, Cristiano Costantini wrote:
Hi again,
at this Gist url: https://gist.github.com/cristcost/8733491
I have updated the pom.xml that compiles and works for producing a OSGi
version of gwt-servlet.jar
With this bundle, I've recompiled and deployed all the samples I've listed
on the initial message and they are working properly.
The headers are not optimal but I strongly believe they are the best
compromise for those who want to attempt to use this approach:
In particular, this line:
https://gist.github.com/cristcost/8733491#file-servicemix-bundles-gwt-servlet-pom-xml-L59
should be uncommented and I would expect to get BND to ignore missing
referenced packages, but apparently this is only possible when using BND
"wrap", when using BND "buildx" (the one used by maven-bundle-plugin's
bundle goal) it gives error for missing referenced packages...
So the best compromise is to leave the unreferenced packages with
resolution:=optional in Import-Package.
So, JB, can you have a look at it?
If you prefer an svn patch, I can create it tomorrow or monday.
Thank you!
Cristiano
2014-01-31 Cristiano Costantini <[email protected]>:
one more bit of information:
maven-bundle-plugin 2.3.7 uses BND 1.50.0
if I use "BND print" command:
java -jar bnd-1.50.0.jar print
~/dev/mvn_repos/local/com/google/gwt/gwt-servlet/2.6.0/gwt-servlet-2.6.0.jar
I get the same errors that I get from the maven-bundle-plugin
but If I use BND manually (using "gwt-servlet.bnd" file from my patch ->
https://gwt-review.googlesource.com/#/c/5351/7/servlet/gwt-servlet.bnd)
java -jar bnd-1.50.0.jar wrap -output .
\
-properties
~/dev/Open-Source/gwt-trunk/build/out/bnd/gwt-servlet.bnd
\
~/dev/mvn_repos/local/com/google/gwt/gwt-servlet/2.6.0/gwt-servlet-2.6.0.jar
it works.
Even if gwt-servlet.jar is a mess for many reason, it is appropriate to
ignore unresolved references in it.
Maybe it is possible to instruct maven-bundle-plugin to continue and
ignore unresolved references error... I'll check for it.
Cristiano
2014-01-31 Jean-Baptiste Onofré <[email protected]>:
Hi Cristiano,
ok catcha, I thought it was a patch for SMX.
Regards
JB
On 01/31/2014 05:45 PM, Cristiano Costantini wrote:
Hi Jean,
I'm working on the Spring bundles today, but I plan to resume my work on
GWT bundles tomorrow.
I'll be home and available to help!
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.
Ok, that patch however was for GWT and it works, but it has not been
taken
into account by GWT contributors.
So I tried to make one also using SMX infrastructure and its pom.xml is
copied here: https://gist.github.com/cristcost/8733491 but it does not
work.
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).
I was not aware of existence of BNDTools :-) I used BND directly with
an
Ant task.
there are three main jar in GWT distribution:
- gwt-user.jar
- gwt-dev.jar
- gwt-servlet.jar
what is needed at runtime on a Java server, is the last one.
Unfortunately
it is not a regular project but rather a subset of classes from
gwt-user.jar and gwt-dev.jar, so in gwt-servlet.jar there are unresolved
references which make maven-bundle-plugin fail (but BND 1.50.00
standalone
works).
The behaviour also depends on the maven-bundle-plugin version. Did you
try
with 2.4.0 ?
I'm able to compile gwt-dev-2.4.0 and gwt-user-2.4.0 simply by updateing
the parent to org.apache.servicemix.bundles/bundles-pom/12-SNAPSHOT
gwt-user-.2.6.0 and gwt-dev-.2.6.0 gives me "Unresolved references"
I'll try to now to compile my Ant patch with a BND tool of the same
version
of maven-bundle-plugin
Regards,
Cristiano
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com