Hi.

I came across this a while ago.  As you have spotted below 
javax.activation version 3.0.5 is the findbugs bundle from google.
However this contains different classes to the Jakarta project.   As such 
its not just a simple fix of changing or repacking the jsoup bundle. 

The findbugs bundle will need to be deployed into karaf. But given the way 
that services are resolved in OSGI, you may hit the problem of a down 
stream project depending on both Findbugs and Jakarta annotations.

My solution was to produce a bundle that merged both findbugs and 
javax.annotation.  This was then exported the package at both version 1 
and 3.

Cheers
Paul





From:   "Steinar Bang" <[email protected]>
To:     [email protected]
Date:   24/08/2021 20:53
Subject:        Re: jsoup 1.14.2 requires javax.annotation version between 
3.0 and 4.0



>>>>> Steinar Bang <[email protected]>:

>>>>> Steinar Bang <[email protected]>:
>> (I'll also open a ticket on jsoup and try to have them fix it
>> upstream. Since upstream is an OSGi bundle, it seems a pity to have it
>> be a broken OSGi bundle...)

> jsoup issue on the problem: https://github.com/jhy/jsoup/issues/1616

I've created a PR that fixes the issue, by removing the version
requirements from the javax.annotation imports:
 https://github.com/jhy/jsoup/pull/1617

But the problem is still not fixed, because jsoup also requires
javax.annotation.meta, which karaf does not provide.

The "culprit" is a provded dependency to 
mvn:com.google.code.findbugs/jsr305/3.0.5

See https://github.com/jhy/jsoup/issues/1616#issuecomment-904906532 for 
details.




Reply via email to