Hi Daniele, I might have not understood your concern well enough... But here is what I do: I deploy a really small war file (without any deps of course) into the osgi container (I use felix...). There is another bundle from pax, called pax-web-extender, that "listens" for war files coming into the container and will then register them on the embedded jetty instance.
I use the following pax bundles: * org.ops4j.pax.web.pax-web-extender-war * org.ops4j.pax.web.pax-web-jetty-bundle * org.ops4j.pax.web.pax-web-jsp (might be superfluous) Then I use the felix-bundle plugin to create a MANIFEST.MF for my war file. It looks like that: <plugins> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <executions> <execution> <id>bundle-manifest</id> <phase>process-classes</phase> <goals> <goal>manifest</goal> </goals> </execution> </executions> <configuration> <supportedProjectTypes> <supportedProjectType>jar</supportedProjectType> <supportedProjectType>war</supportedProjectType> <supportedProjectType>bundle</supportedProjectType> </supportedProjectTypes> <instructions> <_include>-osgi.bnd</_include> </instructions> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <configuration> <archive> <manifestFile> ${project.build.outputDirectory}/META-INF/MANIFEST.MF </manifestFile> </archive> </configuration> </plugin> </plugins> There are some more instructions in the "osgi.bnd" file. You could have written them directly in the <instructions> section of the bundle plugin: Bundle-Classpath: ., WEB-INF/classes Web-ContextPath: mywebapp DynamicImport-Package: * Webapp-Context: mywebapp This creates a MANIFEST with Import-Package statements for all your dependencies - they are not included in the war file. The war file has no /lib folder, just WEB-INF/classes and META-INF/ are there. The bundle classpath is extended to include the classes in WEB-INF/classes. I use the scope "provided" for all dependencies. When the war file is deployed to the osgi container, the pax bundles from above will make it available to jetty. In my case the war file contains a simple wicket application that itself listens for other bundles to finally create content. So its just a few bytes and I can reload/redeploy the "content bundles" without affecting the whole application. Regards Eike On [Wed, 06.04.2011 23:09], Daniele Dellafiore wrote: > yes the idea is not to have the huber jar, it's all about this, is the main > feature :) > some guys in the felix maling list suggested me that's actually possible and > supported, it's called WAB, that's a war without /lib (a partially reverse > recursive achronim for A Better War) > > http://old.nabble.com/A-better-life%3A-quick-webapp-deploy-to31334158.html > > I'll go for that tomorrow. > > On Wed, Apr 6, 2011 at 4:27 PM, Martin Grigorov <mgrigo...@apache.org>wrote: > > > I'm not an OSGi user but here is what I'll do. > > > > 1) create a new Maven project with packaging type 'pom' > > 2) combine all wicket jars in one (uber-jar) > > there are several approaches here: > > 1) maven-shade-plugin > > 2) the way we did it in RC1 with maven-dependency-plugin: see > > > > http://repo2.maven.org/maven2/org/apache/wicket/wicket/1.5-RC1/wicket-1.5-RC1.pom > > > > Here check that works with simple Wicket app (e.g. the quickstart). > > > > Creating one big jar with all dependendies is against OSGi idea. The goal > > is > > to be able to replace dependencies without restarting, e.g. upgrade the > > service layer without undeploying the presentation. > > But if you still want to do it: start adding more dependencies to be > > packed > > in the uber jar (spring, hibernate) > > > > About WicketFilter: > > - you can use embedded Jetty or Guice Filter > > and org.apache.wicket.protocol.http.WicketFilter.FILTER_MAPPING_PARAM (I > > explained this earlier today in another thread) > > - OSGi 4.1+ has the notion of enterprise OSGi and you can use plain OSGi > > gymnastics to do that (I have no experience at all in this) > > > > > > > > -- > > Martin Grigorov > > jWeekend > > Training, Consulting, Development > > http://jWeekend.com <http://jweekend.com/> > > -- email: e...@eknet.org https://www.eknet.org pgp: 481161A0 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org