Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pde-dev] Web Application Bundle - running

Title: Web Application Bundle - running
OSGi will soon release a spec (now OSGi EEG RFC 66) for web application container that can deploy web application bundles. These are bundles that contain web applications, with an appropriate META-INF/MANIFEST.MF,  that can be deployed in an OSGi container. Without going into the spec, this basically means we can have a nice modular web application. Yeah!

The good folks over an SpringSource are making the reference implementation of the spec. See the blog post at http://blog.springsource.com/2009/05/27/introduction-to-the-osgi-web-container/ for details. The reference implementation works quite well.

Of course I want to be able to run by bundle by using an OSGi Framework launch configuration. That works now, which is the good new. The bad news is that my project must have all of the resources in the root folder of the project. So WEB-INF and META-INF folders plus all html, jsp, etc resources must be in the project root. If you do this, you can run the web application bundle with the OSGi Framework launch configuration now.

The problem is that this is very painful for build tools. In most build tools you want to have a folder to contain your resource to make it easy to select what gets put into the deployment archive (jar, war, etc) If everything is in the root of the project, you need a custom setup for every project that selects, the correct files and folders.

In a J2EE dynamic war project, you typically use a folder like WebContent and this runs fine in a tomcat container. Something similar is required for an OSGi Web Application Bundle.

Again, this is not required to actually use PDE today to run these bundles, but it is really, really painful to require all the resources to be in the project root. Using ant or maven to build these projects is still doable, but it requires a custom script or pom for each project to uniquely select the appropriate resources to add to the build output.

Any ideas?

--
Best Regards,

Don Laidlaw | Sr. Research Engineer |
Infor | office: +1 902-576-5185 | mobile: +1 902-401-6771 | don.laidlaw@xxxxxxxxx


Back to the top