Hi,
I am trying to use Jsoup library by creating an OSGi bundle out of it. I have created the bundles before so I am pretty much familiar with the process. I have also added the dependencies in the pom.xml like this:
<dependency> <groupId>org.jsoup</groupId> <artifactId>jsoup</artifactId> <version>1.7.3</version> </dependency>
I am also following the steps given here: https://helpx.adobe.com/experience-manager/using/html-parser-service.html
I have tried everything but still the dependencies are not getting resolved. Attached are the screenshots.
What do I do ?
Thanks in advance
Solved! Go to Solution.
Views
Replies
Total Likes
OPen the OSGi bundle in a tool like WInRAR:
[img]JSOUP.png[/img]
Extract and open the MF file. Remove the version information -- so it looks like:
[img]JSOUP2.png[/img]
Notice that there are no version information. Ensure a comma separetes the packages in the import section of the MF file.
After you modify the MF file, place it back into the OSGi bundle in the same location.
Views
Replies
Total Likes
the bundle that is installed is version 1.0.0, your code is using version 1.7.2. I suppose this is why dependencies are not resolved.
Views
Replies
Total Likes
Two things you can do
1. In your dependency change the version from 1.7.3 to 1.0.0 and it should resolve the issue as mentioned by @awedesh.
2. If you want to use the latest Jsoup, then dont install the JsoupBundle as mentioned in the article, instead include this latest version of jsoup jar in your bundle directly.
Views
Replies
Total Likes
The issue that I am facing is that the export package in json bundle are being exported as version 0.0.0. I have tried creating bundles out of jsoup library jar for every version from 1.7.2 to the latest 1.8.2 but I am still getting the same error.
Views
Replies
Total Likes
OPen the OSGi bundle in a tool like WInRAR:
[img]JSOUP.png[/img]
Extract and open the MF file. Remove the version information -- so it looks like:
[img]JSOUP2.png[/img]
Notice that there are no version information. Ensure a comma separetes the packages in the import section of the MF file.
After you modify the MF file, place it back into the OSGi bundle in the same location.
Views
Replies
Total Likes