내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.
해결됨

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

Avatar

Level 1

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!

주제

토픽은 커뮤니티 콘텐츠를 분류하여 관련성 있는 콘텐츠를 찾는 데 도움이 됩니다.

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Community Advisor

@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

원본 게시물의 솔루션 보기

3 답변 개

Avatar

정확한 답변 작성자:
Community Advisor

@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

Avatar

Level 1

Thanks for the guidance @AMANATH_ULLAH ! I got resolved.

Avatar

Community Advisor and Adobe Champion

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