0

My bundle defines an interface, and a component that uses this interface implementations to call them all back (if some exists...).

A good analogy is the LogService; if one (or more) exists, calls them with the message.

Here's my DS declaration:

@Reference(cardinality= ReferenceCardinality.MULTIPLE,
        policy = ReferencePolicy.DYNAMIC,
        service = ITestResultsParserService.class)
public void bindTestResultsParser(ITestResultsParserService parser) {
    testResultsParserServices.add(parser);
}
public void unbindTestResultsParser(ITestResultsParserService parser) {
    testResultsParserServices.remove(parser);
}

So i expect that my bundle is able to deploy with or without that services implementations.

However, here's what eclipses gives me:

Eclipse Requirements

Why? This isn't a requirement at all! It's clearly optional.

I found this ticket which seems to talk about this issue, but its not clear why it's been closed. I added this to my bnd.bnd, as stated in the ticket:

-resolve.effective: active;skip:="osgi.service"

JSlain
  • 566
  • 3
  • 20
  • From the picture, it seems the osgi.service requirements are effective:=active which is what I would expect. Also, If you think you have found a bug in bnd, why not open an issue at https://github.com/bndtools/bnd/issues/new so it can be investigated? – BJ Hargrave Jun 03 '15 at 10:12
  • I agree this is probably a bug. – Neil Bartlett Jun 03 '15 at 10:29
  • I didn't open a bug since the ticket I was refering to explain exactly my problem, and has been closed. I thought i just didn't understood the solution well. Also, i'ld have to open a duplicate issue? Again: https://github.com/bndtools/bndtools/issues/859 – JSlain Jun 03 '15 at 11:27
  • It's not a duplicate of that issue though I agree it is confusingly similar. It's actually a bnd bug so I have raised the following: https://github.com/bndtools/bnd/issues/972 – Neil Bartlett Jun 03 '15 at 16:22
  • Wow, and already a pull request! That's what i call a good support! Thanks alot – JSlain Jun 03 '15 at 18:50
  • And the daily build just fixed the issue. – JSlain Jun 04 '15 at 11:37

1 Answers1

0

Since it was a bug which has been fixed, and not a question with a possible answer, i'm closing it.

JSlain
  • 566
  • 3
  • 20