jhy / jsoup

jsoup: the Java HTML parser, built for HTML editing, cleaning, scraping, and XSS safety.
https://jsoup.org
MIT License
10.9k stars 2.17k forks source link

OSGi - Jsoup imports its own packages #2158

Closed jhy closed 3 months ago

jhy commented 3 months ago

Discussed in https://github.com/jhy/jsoup/discussions/2145

Originally posted by **bencebarna** June 19, 2024 Hi! I have noticed that with the current maven-bundle-plugin configuration the OSGi manifest is generated in way that Jsoup imports it's own packages. Is this being done on purpose? I am asking because in my current project a 3rd-party bundle embeds and exports Jsoup (already notified the vendor not to do that) while the Jsoup bundle is also deployed standalone. The embedded Jsoup is a different version than the standalone one. And in some cases, during deplyment, the standalone bundle imports the embedded Jsoup packages from the 3rd-party lib and exports them with that version. Making the version of the standalone packages unavailable.
jhy commented 3 months ago

Updated per @bencebarna's suggestion in #2145.