AWS DynamoDB dependencies are not resolved in core Bundle in AEM Cloud | Community
Skip to main content
August 7, 2024
Solved

AWS DynamoDB dependencies are not resolved in core Bundle in AEM Cloud

  • August 7, 2024
  • 2 replies
  • 988 views

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: @7115038-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!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by AMANATH_ULLAH

@saravanan_ms 

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

2 replies

AMANATH_ULLAH
Community Advisor
AMANATH_ULLAHCommunity AdvisorAccepted solution
Community Advisor
August 7, 2024

@saravanan_ms 

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

Amanath Ullah
August 12, 2024

Thanks for the guidance @amanath_ullah ! I got resolved.

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
August 7, 2024

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.

Esteban Bustamante