For some requirements you can probably do a check, like if its a provide service capability: If the api package is included, then it makes sense to include that capability. For others, it will be more difficult. I guess in that case, you could only include the capability if the full api of that bundle is included in the api jar. That's probably good enough for these cases.

But it gets more difficult if a bundle is just providing a capability but no java api. In that case that bundle is not even considered for api generation. I fear the only way out is to add some metadata to that bundle which is then picked up by the api jar mojo to add the capabilities of that bundle. That information probably needs the api region it belongs to.

Regards
Carsten

Am 13.11.2020 um 12:55 schrieb Konrad Windszus:
Hi everyone,
I would like to gather some feedback on 
https://issues.apache.org/jira/browse/SLING-9883 
<https://issues.apache.org/jira/browse/SLING-9883>.
I already provided a draft PR (lacking tests for now) in 
https://github.com/apache/sling-slingfeature-maven-plugin/pull/59 
<https://github.com/apache/sling-slingfeature-maven-plugin/pull/59>.

IMHO using the bnd-resolver-maven-plugin helps to detect a lot of runtime issues 
already at compile time. I introduced that in 
https://github.com/apache/jackrabbit-filevault 
<https://github.com/apache/jackrabbit-filevault> some time ago and it turned 
out to be very useful.

The only thing I am not sure about is API Regions, as you cannot tell from an 
OSGi-Capability to which package it belongs. Any idea how one could support 
that?

Thanks,
Konrad



--
--
Carsten Ziegeler
Adobe Research Switzerland
[email protected]

Reply via email to