Error: "Could Not Transfer Artifact com.aspose:aspose-slides:pom:21.10"

Could not transfer artifact com.aspose:aspose-slides:pom:21.10 from/to AsposeJavaAPI (https://releases.aspose.com/java/repo/): Received fatal alert: handshake_failure -> [Help 1]

I receive this error randomly on different dependencies while building in a docker file or Jenkins pipeline.

This worked fine a month ago, but now we have started receiving these errors.

This is working fine locally.

I found a similar issue and could not tell how I could resolve this on my end.

@momin.siddique,
Thank you for contacting support.

Could you please share a simple project and describe step by step how to reproduce the error you are encountering?

We have the following dependencies in our Java project

<!--ASPOSE TOTAL-->
		<dependency>
			<groupId>com.aspose</groupId>
			<artifactId>aspose-pdf</artifactId>
			<version>22.4</version>
		</dependency>
		<dependency>
			<groupId>com.aspose</groupId>
			<artifactId>aspose-words</artifactId>
			<version>22.5</version>
			<type>pom</type>
		</dependency>
		<dependency>
			<groupId>com.aspose</groupId>
			<artifactId>aspose-cells</artifactId>
			<version>22.5</version>
		</dependency>
		<dependency>
			<groupId>com.aspose</groupId>
			<artifactId>aspose-slides</artifactId>
			<version>21.10</version>
			<classifier>jdk16</classifier>
		</dependency>
		<dependency>
			<groupId>com.aspose</groupId>
			<artifactId>aspose-slides</artifactId>
			<version>21.10</version>
			<classifier>javadoc</classifier>
		</dependency>
		<dependency>
			<groupId>com.aspose</groupId>
			<artifactId>aspose-imaging</artifactId>
			<version>22.5</version>
			<classifier>jdk16</classifier>
		</dependency>
		<dependency>
			<groupId>com.aspose</groupId>
			<artifactId>aspose-diagram</artifactId>
			<version>21.11</version>
			<classifier>jdk16</classifier>
		</dependency>

You can add these to a project and try to build through a docker file using the following commands.

FROM maven:3.5-jdk-11 AS buildstage

COPY pom.xml .
RUN mvn -B -f pom.xml dependency:go-offline
# Copy all other project files and build project
COPY . .
RUN mvn -B clean install


FROM tomcat:9.0.30-jdk11-openjdk
EXPOSE 8080
COPY --from=buildstage ./target/Watermarking.war /usr/local/tomcat/webapps/
CMD ["catalina.sh","run"]

This was working fine a month ago nothing was changed on our end.

If we build it locally without a docker file it works fine, however,
We are unable to build using a dockerfile and this results in our CI / CD pipelines failing.

It looks like the project cannot access the Java repo when built within a docker file.|

Can it be related to the ACL rules of the repo where the dependencies are hosted? as was in the case of issue that was reported a while ago by some other user?

@momin.siddique,
Thank you for the additional information. I’ve reproduced the error you described.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): SLIDESJAVA-39521

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@momin.siddique,
Our developers have investigated the case. We found that adding the following line to the Dockerfile solves the problem:

ENV MAVEN_OPTS="-Dmaven.wagon.http.pool=false"

Dockerfile:

FROM maven:3.5-jdk-11 AS buildstage

ENV MAVEN_OPTS="-Dmaven.wagon.http.pool=false"

COPY pom.xml .
RUN mvn -B -f pom.xml dependency:go-offline
# Copy all other project files and build project
COPY . .
RUN mvn -B clean install


FROM tomcat:9.0.30-jdk11-openjdk
EXPOSE 8080
COPY --from=buildstage ./target/Watermarking.war /usr/local/tomcat/webapps/
CMD ["catalina.sh","run"]

@andrey.potapov
This fixed the issue, Thank you for the support on this.

@momin.siddique,
We are glad that the issue has been resolved on your end. Thank you for using Aspose.Slides.