Hello I am trying to integrate AWS SDK in my project. But the problem is after the deploy the bundle cannot be resolved.
In the project pom.xml
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<version>1.12.392</version>
</dependency>
In the core pom.xml
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
</dependency>
In the all pom.xml
<embedded>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<target>/apps/my-project-vendor-packages/application/install</target>
</embedded>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<type>jar</type>
</dependency>
After successfully deploying with this setup I got this error,
To resolve I found similar kinds of problems in communities. But none of them helped me or I missed something.
Reference: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aws-package-cannot-be-reso...
Method 2:
I also tried to deploy the "aws-java-sdk-1.12.392.jar" directly by OSGI. And then I get this error.
What should I do? How can I resolve this problem?
Solved! Go to Solution.
Try creating new module similar to core and include dependencies in it.
Here we need to create an OSGi bundle out of third party non-osgi dependency using maven-bundle-plugin
Below article mentions all the steps for it
https://myaemlearnings.blogspot.com/2021/08/embedding-third-party-dependencyosgi.html
Hi @Sady_Rifat ,
Have you tried the OSGi version of it?
https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-osgi/1.12.392
<!-- https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-osgi -->
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-osgi</artifactId>
<version>1.12.392</version>
</dependency>
On the OSGi console error, I think you are trying to install Jar rather than a bundle.
Hope this helps!
Regards,
Nitesh
Hello Nitesh,
Tried with aws-java-sdk-osgi
In AWS SDK For Java for OSGi I got the following error,
Try creating new module similar to core and include dependencies in it.
Here we need to create an OSGi bundle out of third party non-osgi dependency using maven-bundle-plugin
Below article mentions all the steps for it
https://myaemlearnings.blogspot.com/2021/08/embedding-third-party-dependencyosgi.html
Thanks a lot for this solution. It worked for me.
Views
Likes
Replies