A transitive maven dependency may prevent karaf in pax exam from starting properly

Description

I've encounteret two places where a transitive maven dependency have prevented karaf in pax exam tests from loading karaf features.

The first problem was when I added mockrunner dependencies to be able to use MockHttpServletRequest and MockHttpServletRespons in a pax exam test:

  1. I added the following dependencies to the pom.xml file of the pax exam project:

  2. The purpose of the dependencies was to provide version numbers to the pax exam config, that's why the dependencies were provided:

  3. In the karaf.log of the pax exam test, I could see karaf start, and then nothing happened, no error messages until the test timed out. No karaf features were loaded

  4. By trial and error I figured out that one of the transitive dependencies of the dependencies I included was the culprit, and when I excluded the culprit, karaf started normally in pax exam, and all features were loaded:

The second problem I had was that the pax-jdbc features repository for pax-jdbc 1.3.0 had a transitive dependency to karaf 4.1.1 that gave karaf 4.1.7 in pax exam startup problems. I.e. it wasn't a dependecy in the feature file that gave the problem, but a transitive dependency of the feature file dependency.

  1. The feature file dependency that caused karaf not to start properly in pax exam:

  2. The feature file with exclusion of the troublesome transitive dependency (here karaf startet properly in pax exam)

Environment

None

Status

Assignee

Unassigned

Reporter

Steinar Bang

Labels

None

Affects versions

Priority

Major
Configure