'Unable to resolve sun dependency after embedding JGIT dependency in AEM

AEM: 6.5.12

JGIT:6.1.0

JavaEWAH:1.1.2

I am trying to embed JGit dependency to my pom.xml.

<!-- https://mvnrepository.com/artifact/org.eclipse.jgit/org.eclipse.jgit -->
<dependency>
   <groupId>org.eclipse.jgit</groupId>
   <artifactId>org.eclipse.jgit</artifactId>
</dependency>

by adding

<Embed-Dependency>someAnotherDependency,org.eclipse.jgit;scope=compile|runtime</Embed-Dependency>

This resulted another dependency not resolving which is

<dependency>
   <groupId>com.googlecode.javaewah</groupId>
   <artifactId>JavaEWAH</artifactId>
</dependency>

which is something JGIT required. So added it to embed dependency as well

<Embed-Dependency>someOtherDependency,org.eclipse.jgit,JavaEWAH;scope=compile|runtime</Embed-Dependency>

When I added these two I got another dependency issue

Vinit_Pillai_0-1652427977570.png

the error on this one is not familiar to me. When I remove my embedded dependencies (leaving one which was already there) the error disappears.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source