JSOUP not getting resolved

Avatar

Avatar

s1101v

Avatar

s1101v

s1101v

28-02-2021

Hello All - I am getting the below error because of that, OSGi bundle is not starting.

 

org.jsoup,version=[1.9,2) -- Cannot be resolved
org.jsoup.nodes,version=[1.9,2) -- Cannot be resolved
org.jsoup.select,version=[1.9,2) -- Cannot be resolved

 

Basically I just wanted to include JSOUP jar that should be embedded in my project's bundle. I tried adding the below to include the JSOUP in the bundle. I am using latest archetype (23), Can someone advise on how to include the embed the bundle.

Also please note that, I have already placed the required JSOUP jar in the "libs" folder.


<properties>
<system.dependencies>${project.basedir}/libs</system.dependencies>
</properties>

<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.9.2</version>
<type>jar</type>
<scope>system</scope>
<systemPath>${system.dependencies}/jsoup-1.9.2.jar</systemPath>
</dependency>


<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>4.1.0</version>
<inherited>true</inherited>
<configuration>
<instructions>
<Bundle-SymbolicName>com.test.core</Bundle-SymbolicName>
<Sling-Model-Packages>
com.test.core.internal.impl.models
</Sling-Model-Packages>
<Embed-Dependency>jsoup</Embed-Dependency>
</instructions>
</configuration>
</plugin>

View Entire Topic

Avatar

Avatar

KiranVedantam1992

Avatar

KiranVedantam1992

KiranVedantam1992

28-02-2021

Hi @s1101v,

 

The below error says that the JSOUP bundle is not resolved. To resolve the issue, check my answer here.

 

If you are trying to include JSOUP Jar, AEM does not support it. You need to install a bundle into AEM. Use this dependency in your pom and follow the steps mentioned in the above link.

 

<!-- https://mvnrepository.com/artifact/org.jsoup/jsoup -->
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.13.1</version>
</dependency>

 

Hope this helps.

 

Thanks,

Kiran Vedantam.