-
-
Notifications
You must be signed in to change notification settings - Fork 305
Open
Description
As an OSGi novice, I was very confused when my tests failed on JDK-25 and the Pax Exam team kindly helped me resolve that setting the Require-Capability explicitly. Since this is just the Java version can that be added dynamically instead of osgi.ee;filter:="(osgi.ee=UNKNOWN)"? Then the bnd plugin is future compatible. While I release on JDK-11, the tests failed due to cross-building on the latest JDK.
# Java 24
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=24))"
# Java 25
Require-Capability: osgi.ee;filter:="(osgi.ee=UNKNOWN)"I manually forced the correct value using,
// Workaround until the bnd plugin supports the latest JDK
val javaVersion = java.toolchain.languageVersion.get()
if (javaVersion.canCompileOrRun(25)) {
bnd(mapOf("Require-Capability" to
"""osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=${javaVersion}))""""))
}Metadata
Metadata
Assignees
Labels
No labels