In the Bitbucket plugin project I am working on I am using kerb4j-client in order to establish kerberized connection to 3rd party service.
<dependency>
<groupId>com.kerb4j</groupId>
<artifactId>kerb4j-client</artifactId>
<version>0.0.8</version>
<scope>compile</scope>
</dependency>
kerb4j-client depends on kerb4j-common which in turn refers to com.sun.security.auth.module.Krb5LoginModule class which is the one I am getting NoClassDefFoundError when trying to run the plugin flow.
The Krb5LoginModule is a part of JVM and exists in both JDK/JRE's rt.jar, at least as of the v1.8.0_181 I am using.
I checked the MANIFEST.MF from the plugin jar and do see "com.sun.security.auth.module;version=0;resolution:=optional" there
I checked /plugins/servlet/upm/osgi on the server but when expanding my plugin "Import Package" section the report around it looks like this:
com.google.gson version: 0, resolution: optional
Provided by System Bundle
com.sun.security.auth.module version: 0, resolution: optional
javax.annotation version: 0, resolution: optional
Provided by System Bundle
Understandably, when looking under System Bundle "Export Package" no com.sun.security.auth.module is listed.
What would be the approach to resolve this?