I've tried to answer gwt-user problems with osgi few times. I hope this time it
will help and finally solve gwt-user issue. The way od deploying application
described in blog post is wrong. Also gwt quickstart is wrong.
You don't need gwt-user at runtime because:
- Java application written with GWT is compiled to Java Script
- Java .class files are not needed at all to run it
- Java Script do not depend on any Java classes
What you actually need is only to collect generated resources package them in
jar with additional classifier and install it instead of compiled Java
artifact. Below you might find example of maven-jar-plugin configuration which
catches generated artifacts from GWT project and package it with -gwt
classifier.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>gwt</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classesDirectory>${basedir}/target/${pom.artifactId}-${pom.version}/Application</classesDirectory>
<classifier>gwt</classifier>
</configuration>
</execution>
</executions>
</plugin>
Cheers,
Łukasz Dywicki
--
[email protected]
Twitter: ldywicki
Blog: http://dywicki.pl
Code-House - http://code-house.org
Wiadomość napisana przez Achim Nierbeck <[email protected]> w dniu 5 maj
2013, o godz. 12:34:
> btw. if you installed the war features no need to install the http feature
> anymore since it's included. :)
>
> Regarding your json issue, you should check with packages:exports 207 if it
> really exports the required packages.
>
> regards, Achim
>
>
> 2013/5/5 Jacob Sheck <[email protected]>
> Jean-Baptiste,
>
> Thanks for the pointer. I am still stuck with the json issue. I'll post
> back when I get this figured out.
>
> karaf@savoir> features:install war
> karaf@savoir> features:install http
> karaf@savoir> install -s
> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsr305/1.3.9_1
> Bundle ID: 205
> karaf@savoir> install -s
> mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jsr303-api-1.0.0/1.9.0
> Bundle ID: 206
> karaf@savoir> install -s
> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.json-lib/2.4_1
> Bundle ID: 207
> karaf@savoir> install -s
> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.gwt-dev/2.4.0_1
> Bundle ID: 208
> karaf@savoir> install -s
> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.gwt-user/2.4.0_1
> org.osgi.framework.BundleException: The bundle
> "org.apache.servicemix.bundles.gwt-user_2.4.0.1 [209]" could not be resolved.
> Reason: Missing Constraint: Import-Package: org.json; version="0.0.0"
> Bundle ID: 209
> karaf@savoir>
>
> Appreciatively
> Jacob
>
> -----Original Message-----
> From: Jean-Baptiste Onofré [mailto:[email protected]]
> Sent: Friday, May 03, 2013 11:51 PM
> To: [email protected]
> Subject: Re: GWT in Karaf
>
> Hi Jacob,
>
> try to use ServiceMix json-lib bundle:
>
> install -s
> mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.json-lib/2.4_1
>
> Regards
> JB
>
> On 05/04/2013 06:20 AM, Jacob Sheck wrote:
> > I am would like to run a simple web service Karaf. This example looks
> > promising.
> >
> > http://cmoulliard.blogspot.com/2011/12/run-google-web-toolkit-2-projec
> > t-on.html
> >
> >
> > I am not able to resolve the json dependency.
> >
> > karaf@savoir> install -s
> > mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.json/2
> > 0090211_1
> >
> > java.lang.RuntimeException: URL
> > [mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.json/
> > 20090211_1]
> > could not be resolved.
> >
> > I tried with Geronimo, but gwt-user doesn' recognize it.
> >
> > karaf@savoir> install -s
> > mvn:org.apache.geronimo.bundles/org.json/20090211
> >
> > Bundle ID: 305
> >
> > karaf@savoir> install -s
> > mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.gwt-us
> > er/2.4.0_1
> >
> > org.osgi.framework.BundleException: The bundle
> > "org.apache.servicemix.bundles.gwt-user_2.4.0.1 [300]" could not be
> > resolved. Reason: Missing Constraint: Import-Package: org.json;
> > version="0.0.0"
> >
> > Help with this issue, or guidance to a more recent example would be
> > greatly appreciated.
> >
> > Thanks
> >
> > Jacob
> >
> >
> > ----------------------------------------------------------------------
> > --
> >
> > CONFIDENTIALITY NOTICE: This e-mail message is for the sole use of the
> > intended recipient(s) and may contain confidential and privileged
> > information. Any unauthorized review, use, disclosure or distribution
> > of any kind is strictly prohibited. If you are not the intended
> > recipient, please contact the sender via reply e-mail and destroy all
> > copies of the original message. Thank you.
>
> --
> Jean-Baptiste Onofré
> [email protected]
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
>
>
> --
>
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
> Project Lead
> OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home>
> Commiter & Project Lead
> blog <http://notizblog.nierbeck.de/>