We are trying to add org.dom4j maven dependency but the bundle is unable to resolve. (AEM version 6.5.6, jdk version - 1.8)
We have added below dependency
Also we have tried using,
<Import-Package> javax.annotation;version=0.0.0,* </Import-Package>
But no luck, could you please check and let us know if any inputs.
1.One way to resolve is, If you added dependency to project and resolved in pom.xml in IDE in local,
go to your local repository .m2 folder (.m2\repository\log4j\log4j\1.2.12) get your jar according to dependency values and deploy it manually in OSGI Console.
2. The other way make use of Depfinder in OSGI console(http://localhost:4502/system/console/depfinder) to get required version of that bundle and download.
hi @SagarVerliani ,
You can simply use Eclipse plug-in project to convert the JAR into an OSGi bundle and deploy the bundle to AEM.
please refer below video
Also, attaching the bundle which i created. Try using this.
Also, check the threads-
Per the snippets you shared in your original post, could see that you have used "Embed-Dependency" entry in bnd-maven-plugin. (while the same is applicable for maven-bundle-plugin)
In case you are using maven-bundle-plugin as part of code package (core module), Have the desired dependency entry in core and main pom.xml and in plugin definition add the below.
<Embed-Dependency>*;scope=compile|runtime</Embed-Dependency> // "*" Denotes all dependency as part of <dependencies> entry in pom.xml <Embed-Transitive>true</Embed-Transitive> // Includes RunTime/compile time dependencies of each of the dependency in turn. Example: all Run time dependencies of org.dom4j