Hi,
I am trying to integrate Amazon DynamoDB with AEM Cloud, for which I added the below dependencies in core/pom.xml
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<version>1.12.767</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-dynamodb</artifactId>
<version>1.12.767</version>
</dependency>
Which let to additional dependencies, for which using "bnd-maven-plugin" included those dependencies.
<execution>
<id>bnd-process</id>
<goals>
<goal>bnd-process</goal>
</goals>
<configuration>
<bnd>
<![CDATA[
Import-Package: javax.annotation;version=0.0.0,*
-conditionalpackage: com.amazonaws.services.dynamodbv2.*,com.amazonaws.*,com.fasterxml.jackson.dataformat.*,org.bouncycastle.*
-includeresource: @aws-java-sdk-dynamodb-1.12.767.jar!/;lib:=true,@aws-java-sdk-cloudwatch-1.12.767.jar!/;lib:=true,@aws-java-sdk-sts-1.12.767.jar!/;lib:=true,@aws-java-sdk-1.12.767.jar!/;lib:=true,@jackson-dataformat-cbor-2.12.0.jar!/;lib:=true,@bcprov-jdk15on-1.68.jar!/;lib:=true
]]>
</bnd>
</configuration>
</execution>
But still, ended with these two dependencies unresolved in the bundle.
kotlin -- Cannot be resolved
com.sun.org.apache.xpath.internal -- Cannot be resolved and overwritten by Boot Delegation
Please suggest any solution for this or any alternation dependency for integration with AWS DynamoDB.
Thanks in Advance!
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
To resolve the issue with AWS dependencies please refer the approach mentioned in below link
https://myaemlearnings.blogspot.com/2021/08/embedding-third-party-dependencyosgi.html
To resolve the issue with AWS dependencies please refer the approach mentioned in below link
https://myaemlearnings.blogspot.com/2021/08/embedding-third-party-dependencyosgi.html
Thanks for the guidance @AMANATH_ULLAH ! I got resolved.
Hi,
If those dependencies are not required, you can simply add them as optional while wrapping your external jar into your bundle, otherwise you would need also to wrap them as part of your bundle, additionally, I think you should be good by using only the includeresource without the conditional package option, something like this:
<id>bnd-process</id>
<goals>
<goal>bnd-process</goal>
</goals>
<configuration>
<bnd>
<![CDATA[
Import-Package: your.kotlin.dependency;resolution:=optional,com.sun.org.apache.xpath.internal;resolution:=optional;version="[x.x)",*
-includeresource: your-dynamodb.jar;lib:=true
]]>
</bnd>
</configuration>
Here are some references: https://bnd.bndtools.org/instructions/includeresource.html
I hope this helps.
Views
Likes
Replies