ops4j / org.ops4j.pax.runner

Multi Framework OSGi Runner
http://team.ops4j.org/wiki/display/paxrunner/
47 stars 39 forks source link

Feature/prevent felix starting fragments #8

Closed duponter closed 8 years ago

duponter commented 9 years ago

In our application, we use the org.ops4j:maven-pax-plugin:1.5 to generate the config.ini for deployment on Felix 4.6.1. For test and production environments, we simply employ the noop runner to generate the script. For local development, we execute the pax:provision goal using the default Java runner.

In general, this setup works pretty well. However, when using fragment bundles (which are not meant to start up according to the OSGi specs), following exception is shown: org.osgi.framework.BundleException: Fragment bundles can not be started. at org.apache.felix.framework.Felix.startBundle(Felix.java:1782)

That's because they are categorised in the generated config.ini as 'to be started' instead of 'to be started'. This pull request should fix this.

2 remarks however:

  1. We've first started working from the master branch (1.8.7-SNAPSHOT), but then our Felix server could not start when executing the pax:provision goal. When we branch from the 'runner-1.8.6' tag, Felix starts as expected.
  2. Due to our limited experience in this project, we are aware that there may be better solutions to solve this problem. In that case, we are happy to learn which ones.

Thanks Erwin

ANierbeck commented 8 years ago

Hi, could you please create a Jira Issue for this, and it would be great if you would be willing to apply this PR yourself, we'll invite you to the repo shortly.

duponter commented 8 years ago

Hi, issue PAXRUNNER-452 has been created for this PR. How do I link the issue to this repository to see the Development section (containing number of branches, commits and pull requests - see image below) in the JIRA issue details?

screen shot 2015-11-30 at 11 36 35