Fix hidden OSGI wiring errors

Steps to reproduce

While OSGI could eventually resolve all dependencies, some conflicts
caused resolution to be extremely slow. Looking at Karaf's debug logs
would actually reveal the problems:

```
2019-01-27T01:32:36,132 | DEBUG | (Slf4jResolverLog:45) - Candidate permutation failed due to a conflict between imports; will try another if possible. (Uses constraint violation. Unable to resolve resource opencast-message-broker-api [opencast-message-broker-api/7.0.0.SNAPSHOT] because it is exposed to package 'javax.annotation' from resources javax.annotation-api [javax.annotation-api/1.3.0] and org.apache.felix.framework [org.apache.felix.framework [0](R 0)] via two dependency chains.

Chain 1:
opencast-message-broker-api [opencast-message-broker-api/7.0.0.SNAPSHOT]
import: (&(osgi.wiring.package=javax.annotation)(version>=1.3.0)(!(version>=2.0.0)))

 

export: osgi.wiring.package: javax.annotation
javax.annotation-api [javax.annotation-api/1.3.0]

Chain 2:
opencast-message-broker-api [opencast-message-broker-api/7.0.0.SNAPSHOT]
import: (&(osgi.wiring.package=com.entwinemedia.fn)(version>=1.4.0)(!(version>=2.0.0)))

 

export: osgi.wiring.package=com.entwinemedia.fn; uses:=javax.annotation
functional [functional/1.4.2]
import: (osgi.wiring.package=javax.annotation)

 

export: osgi.wiring.package: javax.annotation
org.apache.felix.framework [org.apache.felix.framework [0](R 0)])
2019-01-27T01:32:36,224 | DEBUG | (Slf4jResolverLog:45) - Candidate permutation failed due to a conflict between imports; will try another if possible. (Uses constraint violation. Unable to resolve resource opencast-message-broker-api [opencast-message-broker-api/7.0.0.SNAPSHOT] because it is exposed to package 'javax.annotation' from resources javax.annotation-api [javax.annotation-api/1.3.0] and org.apache.felix.framework [org.apache.felix.framework [0](R 0)] via two dependency chains.

Chain 1:
opencast-message-broker-api [opencast-message-broker-api/7.0.0.SNAPSHOT]
import: (&(osgi.wiring.package=javax.annotation)(version>=1.3.0)(!(version>=2.0.0)))

 

export: osgi.wiring.package: javax.annotation
javax.annotation-api [javax.annotation-api/1.3.0]
```

This patch fixes the problem, giving Opencast a huge boost when it comes
to boot performance.

Status

Assignee

Lars Kiesow

Reporter

Lars Kiesow

Severity

Performance

Tags (folksonomy)

None

Components

Fix versions

Affects versions

7.0

Priority

Major
Configure