AWS SDK in AEM as Cloud Service unresolved dependencies
Hello team,
We have a use case in place where we download json files from S3 and read them to create content fragments.
We are using version 1.11.141 currently. With this version, all the dependencies are resolved and things are working fine.
This version is very old and contains a lot of security vulnerabilities. Hence our need to use the latest version.
Dependency issues arise when we bump this to the latest version (1.12.348) or any version from the past couple of years.
Root pom.xml
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-osgi</artifactId>
<version>1.11.141</version>
<scope>provided</scope>
</dependency>
all/pom.xml
<embedded>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-osgi</artifactId>
<target>/apps/vendor-packages/application/install</target>
</embedded>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-osgi</artifactId>
</dependency>
core/pom.xml
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-osgi</artifactId>
</dependency>
Issue with v 1.12.348
io.netty.bootstrap,version=[4.1,5) -- Cannot be resolved
io.netty.buffer,version=[4.1,5) -- Cannot be resolved
io.netty.channel,version=[4.1,5) -- Cannot be resolved
io.netty.channel.nio,version=[4.1,5) -- Cannot be resolved
io.netty.channel.socket.nio,version=[4.1,5) -- Cannot be resolved
io.netty.handler.codec -- Cannot be resolved
io.netty.handler.codec.http,version=[4.1,5) -- Cannot be resolved
io.netty.handler.logging,version=[4.1,5) -- Cannot be resolved
io.netty.handler.ssl,version=[4.1,5) -- Cannot be resolved
io.netty.handler.stream,version=[4.1,5) -- Cannot be resolved
io.netty.util,version=[4.1,5) -- Cannot be resolved
io.netty.util.concurrent,version=[4.1,5) -- Cannot be resolved
I tried including dependency of io.netty separately and it is still not resolving.
Instead of using aws-java-sdk-osgi, i've tried using aws-java-adk-s3 (should suffice my need) and i'm running into the issue described in this post
I'm using the below bnd-maven-plugin
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<executions>
<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.*
-includeresource: @aws-java-sdk-osgi-1.12.348.jar!/
]]>
</bnd>
....
Can someone help me solve this problem please 🙏
Tagging @vijayalakshmi_s , Thanks in advance
Thanks.