Hi Steinar,

The scope has an impact on the maven-bundle-plugin. In your case, it seems that 
the org.osgi.service.http.context package is not found.

Did you check the version range and the MANIFEST, and also if the 
org.osgi.service.http.context package is not embedded in your bundle ?
Does it occur outside of the test, at runtime ?

Regards
JB

> Le 19 mai 2021 à 21:41, Steinar Bang <[email protected]> a écrit :
> 
> Platform: debian 10.9 "buster", amd64, openjdk 11, maven 3.6.0, karaf 4.3.0
> 
> I'm in the process of turning my web whiteboard projects[1] into using
> the (much nicer) OSGi 7 web whiteboard, and I've encountered a curious
> problem:
> 
> Adding the maven dependency
>        <dependency>
>            <groupId>org.osgi</groupId>
>            <artifactId>org.osgi.service.http.whiteboard</artifactId>
>            <version>1.1.0</version>
>            <scope>provided</scope>
>        </dependency>
> to the bundles providing web whiteboard services, causes one of these
> bundles[2] to fail during startup:
> https://gist.github.com/steinarb/44dc8e29193ce5b7925761f701da7d12
> 
> The weird thing is that I can't find anything different in the bundle
> with the dependency added, vs. the bundle without the dependency added:
> 1. the manifest.mf files are identical with and without the dependencyb
> 2. the OSGI-INF files are identical with and without the dependencyb
> 3. the karaf feature.xml files are identical with and without the dependencyb
> 
> That these files aren't affected by the added provided dependency wasn't
> surprising.  That's what I expected.
> 
> But the load problem is a mystery.
> 
> Any ideas what causes it?
> 
> Thanks!
> 
> 
> - Steinar
> 
> References:
> [1] <https://github.com/steinarb/ukelonn>
> [2] <https://github.com/steinarb/ukelonn/tree/master/ukelonn.web.security>
> 

Reply via email to