Cannot resolve imported package in servlet bundle

Avatar

Avatar

chrisd62525856

Avatar

chrisd62525856

chrisd62525856

15-10-2015

I am trying to use a 3rd party project (Jsoup) in my servlet. I have gone through the steps to build and deploy a bundle fragment plugin as outlined here:

https://helpx.adobe.com/experience-manager/using/custom-sling-servlets.html

This part works fine, I deploy it successfully via web console bundles and it has an "active" status. In my servlet's pom.xml I then include the dependency as such:

<dependency>
            <groupId>org.jsoup</groupId>
            <artifactId>jsoup</artifactId>
            <version>1.8.1</version>
</dependency>

I then build my servlet, do the maven clean install and deploy the servlet via the web console bundles. However, under imported packages I keep getting this error :

org.jsoup,version=[1.8,2) -- Cannot be resolved
org.jsoup.safety,version=[1.8,2) -- Cannot be resolved

Can anybody please help me out, its driving me nuts! Any advice would be appreciated

View Entire Topic

Avatar

Avatar

chrisd62525856

Avatar

chrisd62525856

chrisd62525856

15-10-2015

Thanks for the reply, much appreciated. I have followed the steps outlined but the problem is still not resolved. I have done the export process on the jsoup jar and loaded the OSGi bundle fragment into AEM as per the instructions. This part works the fine. The 3rd party jar is in active state in AEM. The problem is that for some reason my servlet bundle does not pick it up once I upload it to AEM...