Dependency on junit-jupiter-api requires org.junit.platform.engine capability in target platform (despite effective directive)
In a project depending on junit-jupiter-api from Orbit in its target platform
...
<repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/2025-06/"/>
<unit id="junit-jupiter-api" version="5.12.2"/>
...
resolving my test project's Import-Package: org.junit.jupiter.api;version="[5.12.0,6.0.0)" using Tycho 5.0.0 (and 4.0.13) fails:
[ERROR] Missing requirement: junit-jupiter-api 5.12.2 requires 'org.junit.platform.engine; (&(org.junit.platform.engine=junit-jupiter)(version>=5.12.2)(!(version>=6)))' but it could not be found
[ERROR] Cannot satisfy dependency: com.teamscale.ide.eclipse.tests 2025.9.0.qualifier depends on: java.package; org.junit.jupiter.api [5.12.0,6.0.0)
[ERROR]
But AFAICT the requirement from the junit-jupiter-api JAR should not trigger a resolution failure:
Require-Capability: org.junit.platform.engine;filter:="(&(org.junit.platform.engine=junit-jupiter)(version>=5.12.2)(!(version>=6)))";effective:=active,
osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
as the resolver should only consider the requirement when effective:=resolve is used.
effective - (resolve) Specifies the time a requirement is considered, either resolve (default) or another name. The OSGi framework resolver only considers requirements without an effective directive or effective:=resolve. Other requirements can be considered by an external agent. Additional names for the effective directive should be registered with the OSGi Alliance.
Logically, the org.junit.platform.engine is not really required when one merely references the junit-jupiter-api.
Sadly P2 does not understand the effective directive (yet).