# Resolve issue using biz.aQute.tester.junit-platform

**URL:** <https://bnd.discourse.group/t/resolve-issue-using-biz-aqute-tester-junit-platform/284>\
**Category:** GENERAL\
**Created:** [January 11, 2023, 12:36am UTC](https://bnd.discourse.group/t/resolve-issue-using-biz-aqute-tester-junit-platform/284 "2023-01-11T00:36:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![scott.y](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@scott.y](https://bnd.discourse.group/u/scott.y)\
**Post date:** [January 11, 2023, 12:36am UTC](https://bnd.discourse.group/t/resolve-issue-using-biz-aqute-tester-junit-platform/284/1 "2023-01-11T00:36:06Z")

</div>

I just discovered the OSGi Test project and I’m trying it with JUnit 5 in Bndtools. I’m seeing the following when doing a Resolve on my test bundle. I understand that osgi.cmpn is compile only but I don’t the general approach to handling this situation.  
I have junit-platform listed in the Bnd runrequires: clause.

Resolution failed. Capabilities satisfying the following requirements could not be found:  
[\<\>]  
⇒ osgi.identity: (osgi.identity=biz.aQute.tester.junit-platform)  
[osgi.cmpn version=7.0.0.201802012110]  
⇒ osgi.unresolvable: (&(must.not.resolve=_)(!(must.not.resolve=_)))

Thanks, Scott

---

<div class="post-metadata">

**Author:** ![bjhargrave](https://yyz2.discourse-cdn.com/free1/user_avatar/bnd.discourse.group/bjhargrave/32/10_2.png) [@bjhargrave](https://bnd.discourse.group/u/bjhargrave)\
**Post date:** [January 11, 2023, 1:05am UTC](https://bnd.discourse.group/t/resolve-issue-using-biz-aqute-tester-junit-platform/284/2 "2023-01-11T01:05:03Z")

</div>

You should not use `osgi.cmpn` any more. It is recommended to use the individual API jars for each spec you use. To prevent people from installing (and resolving) `osgi.cmpn`, its manifest requires the `osgi.unresolvable` capability which the resolver can never satisfy.

If you must use `osgi.cmpn` as a compile scope dependency, then you would need to tell the resolved to never use it.

```auto
-runblacklist: osgi.identity;filter:='(osgi.identity=osgi.cmpn)'

```

However, if you do that, you will need to supply other bundles, such as the individual API jars to enable a successful resolution.

The best solution is to completely avoid `osgi.cmpn` 🙂

---

<div class="post-metadata">

**Author:** ![scott.y](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@scott.y](https://bnd.discourse.group/u/scott.y)\
**Post date:** [January 11, 2023, 2:11am UTC](https://bnd.discourse.group/t/resolve-issue-using-biz-aqute-tester-junit-platform/284/3 "2023-01-11T02:11:33Z")

</div>

I thought the message was telling me that junit-platform was using osgi.cmpn. Am I mistaken on that? Is that not the case?

---

<div class="post-metadata">

**Author:** ![bjhargrave](https://yyz2.discourse-cdn.com/free1/user_avatar/bnd.discourse.group/bjhargrave/32/10_2.png) [@bjhargrave](https://bnd.discourse.group/u/bjhargrave)\
**Post date:** [January 11, 2023, 2:54am UTC](https://bnd.discourse.group/t/resolve-issue-using-biz-aqute-tester-junit-platform/284/4 "2023-01-11T02:54:47Z")

</div>

I don’t think so. It is saying the resource `osgi.cmpn` was added to the resolution solution but that `osgi.cmpn` requires an `osgi.unresolvable` capability and that cannot be satisfied.

---

<div class="post-metadata">

**Author:** ![scott.y](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@scott.y](https://bnd.discourse.group/u/scott.y)\
**Post date:** [January 12, 2023, 4:01pm UTC](https://bnd.discourse.group/t/resolve-issue-using-biz-aqute-tester-junit-platform/284/5 "2023-01-12T16:01:24Z")

</div>

Ok, thanks. I was wondering why there wasn’t a osgi.cmpn 8.0. I wasn’t aware that had fallen out of favor.

Toward that end, are there predefined repos that can be referenced that have all the OSGi R8 apis and reference implementations defined like this is for Enroute with R7? Seems reasonable that these would exist.

---

<div class="post-metadata">

**Author:** ![bjhargrave](https://yyz2.discourse-cdn.com/free1/user_avatar/bnd.discourse.group/bjhargrave/32/10_2.png) [@bjhargrave](https://bnd.discourse.group/u/bjhargrave)\
**Post date:** [January 12, 2023, 5:49pm UTC](https://bnd.discourse.group/t/resolve-issue-using-biz-aqute-tester-junit-platform/284/6 "2023-01-12T17:49:33Z")

</div>

All the R8 API jars are in Maven Central. However, there is no BOM like what enRoute provided since it would echo the problems of `osgi.cmpn` which creates a bad coupling between versions of completely independent APIs. Each application would need to decide which APIs to use and at what versions. Generally you want compile using the lowest API version which meets your needs. Then you can run against an implementation of that API version or any later version.

Most implementations are probably also available from Maven Central.
