Question

I am looking for a way to reach my vision. What is the best way to go?

Here is my vision:

  1. I would like to build a captain casa app via maven (as a war file).
  2. Then i would like to create a osgi bundle from the builded war via maven.
  3. Next i would like build a artifact which could be downloaded and started via java webstart (jnlp).

The jnlp file should be download the osgi environment with web container support (maybe jetty osgi service), next download osgi bundled war. Then the osgi container and the jetty service should be started and my war should be deployed. Finally the app is running local in a osgi environment.

There are many questions to be answered:

  1. How can i build a captain casa app via maven to a war?
  2. Which maven plugin should be used to build the osgi bundle (pax, maven-bundle-plugin, tycho, ...) What are the differnce?
  3. How to build a jnlp artifact via maven which can deployed on a site?
  4. How must be modified the osgi bundle to support java webstart?

Known informations:

  • Blog entry to prepare osgi bundle for java webstart.
  • many pages to maven plugins, such as pax, maven-bundle-plugin, tycho, bnd, ...
Was it helpful?

Solution

It might be worth asking this as 3 separate questions, but when building Web application Bundles I use the maven-bundle-plugin version 2.2.0 (currently unreleased, so you'll need to depend on a snapshot).

Then I use the following file structure:

src/main/java - any .java files src/main/resources - any non .java files that should be on the classpath src/main/webapp - static content, images, html files jsps and so on

Then inside the pom once you have configured the normal data for the maven-bundle-plugin you specify the following:

<_wab>src/main/webapp</_wab>

this will cause the static content to be pulled into the bundle and the bundle to be structured with the classes and resources in the WEB-INF/classes directory.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top