Hi guys! I'm trying to implement a repository hook for bitbucket server, which communicates with a REST service. I'm having issues with configuring the maven dependencies in such way that OSGi can find them during runtime or installation.
The first thing I've tried was to specify the version range for the package javax.ws.rs.client like that:
<Import-Package>
...other packages
javax.ws.rs*;version="[2.0,3.0)",
*"
</Import-Package>
When doing this, I'm getting the following error message:
Unable to resolve 139.0: missing requirement [139.0] osgi.wiring.package; (&(osgi.wiring.package=javax.ws.rs.client)(version>=2.0.0)(!(version>=3.0.0)))
When I mark the package as optional, the installation of the plugin is successful, but I get an exception:
Caused by: java.lang.ClassNotFoundException: javax.ws.rs.client.ClientBuilder not found by myhook
[INFO] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)
The javax.ws.rs-api depencency comes from this maven dependency in my pom:
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>2.19</version>
<scope>compile</scope>
</dependency>
I've also tried with scope provided, but no success.
When I look in the OSGi browser in Bitbucket, I can see the following:
The entries are not red (as described in the Atlassian documentation about the OSGi browser), but I can see they don't have "Provided by..."
Does someone have an idea where is the problem? Thanks!
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.