Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Not able to connect to Azure Blob Storage

Avatar

Level 3

I want to connect to azure blob storage and fetch a image from it using SAS key with java 

for this i have followed the steps mentioned here ( https://learn.microsoft.com/en-us/java/api/overview/azure/storage-blob-readme?view=azure-java-stable... 

and added dependencies

<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-sdk-bom</artifactId>
<version>{bom_version_to_target}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

in parent POM

 

<dependencies>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-storage-blob</artifactId>
</dependency>
</dependencies>

in child POM

but  its giving error when installing it on AEM server

adivj95_0-1690804495293.png

Please help me resolve this 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @adivj95 ,

Your dependency JAR is not OSGI-ready. That's why it's not resolving. See this documentation for Embedding Third-party dependency: https://myaemlearnings.blogspot.com/2021/08/embedding-third-party-dependencyosgi.html 

Still, if you are confused with this documentation there is a commit that shows exactly where you need to change: https://github.com/Sady-Rifat/aem-demo/commit/65f8ce112744134728bf2f85d7bc5f131a2ef290 

Hope this helps you.

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hello @adivj95 ,

Your dependency JAR is not OSGI-ready. That's why it's not resolving. See this documentation for Embedding Third-party dependency: https://myaemlearnings.blogspot.com/2021/08/embedding-third-party-dependencyosgi.html 

Still, if you are confused with this documentation there is a commit that shows exactly where you need to change: https://github.com/Sady-Rifat/aem-demo/commit/65f8ce112744134728bf2f85d7bc5f131a2ef290 

Hope this helps you.