I want to deploy Skalli in our infrastructure based on the Jetty runtime. I will define an Eclipse product and features to export it directly from my workspace. I will describe here in comprehensive all steps I had to do to make it running.

Note: When cloning Skalli from Git repo, it can be started within IDE without any problems.

There is yet a feature contained in Skalli: org.eclipse.skalli.feature. This feature does include a feature com.sap.ldi.projectportal.orbit.feature, which is NOT available in repo.

Therefore, I've replaced this by a new feature org.eclipse.skalli.orbit.feature and included the 3rdParty libraries as described in [1].

I've changed the org.eclipse.skalli.eclipse.feature, to use the latest versions of o.e.core.jobs, o.e.e.preferences, o.e.e.registry, o.e.e.security, o.e.e.security.win32.x86.

Note: If we include the windows specific platform security plugin, we should also consider to include the win32_64 and macosx version of these fragments. I will dont care for the moment, as I will deploy to Linux, but I've added a bug for this [5].

If I try to export org.eclipse.skalli.feature again, I got cycle references:

A cycle was detected when generating the classpath org.eclipse.skalli.common_0.1.0.201105251413, org.eclipse.skalli.testutil_0.1.0.201105251413, org.eclipse.skalli.api.java_0.1.0.201105251413, org.eclipse.skalli.common_0.1.0.201105251413.

AFAI understand it is related to the fragment "o.e.s.common.test", which is a fragment of "o.e.s.common". This bundle depends on o.e.s.testutil, which leads to a cycle.

Q1: I do NOT know how I can specify to IGNORE the test fragment when exporting a feature/product from IDE. Any idea?

My workaround was to close this project in workspace, which does work. I had to close those projects too to avoid cycle references:

I could not set o.e.e.ds and o.e.e.common via product editor, fixed it in text mode. Not sure whether its a bug, have to investigate.

If I validate the product, all dependencies are fine now.

I want to add also the Jetty configuration files to the deployment. I've added a folder to org.eclipse.skalli.feature/rootfiles, which contains all required Jetty config files. For a simple demo mode, I've also added the workdir with a preset of data to this rootfiles area.

I've added a simple start script bin/start_skalli.sh to start it with all required options:

I am wondering why it is working in IDE. There are slight differences running OSGi from IDE and native.

See also [2], where the same problem has been reported.

Note: you can simulate this in IDE by setting the property -Dosgi.compatibility.bootdelegation=falsein skalli launch config.

The reason for NoClassDefFoundError is that the org.eclipse.skalli.api.java.persistence bundle does NOT import javax.xml.parsers package.

I see two options:

a) import javax.xml.parsers in org.eclipse.skalli.api.java bundle

b) make javax packages visible to all bundles [3]

I would prefer option a) as this would allow to use different versions of XML parser.

I will add an import for packages

javax.xml.parsers

java.xml.transform

org.xml.sax

for bundles

org.eclipse.skalli.api.javaorg.eclipse.skalli.core

Server starts now fine, but JSPs will not be supported, due to fragment org.eclipse.jetty.osgi.boot.jsp is missing in feature org.eclipse.jetty.core. I've added this bundle to org.eclipse.skalli.eclipse.feature.

Note: I am not sure whether this is the right place. Probalby it has to be included in product export directly, as otherwise we get a reference from eclipse.feature to a specific runtime, here Jetty.

Now server starts, but when opening a browser JSP can NOT be compiled due to:

You have to update your launch config to use the bundle from workspace now and not from target.

I've also added the o.e.s.view.theme bundle to include the right icons. For an product export the folder src/main/java has been missing, which I added to the project.

Now everything is working fine, either from IDE with -Dosgi.compatibility.bootdelegation=false set, or running as product export with commandline script.

I've added a bug to support product export [4], and will add my changes as a patch set. It would be helpful, to get a review of someone of Skalli team to check whether this is the right implementation.