Maven Repository for Aspose returning 403 error

Team,

I am using all of the Aspose products like Email, PDF, Slides, Word… almost all.
We did not had build issues. Now we have a build issue which we never had.

My configuration :
repositories {
mavenLocal()
mavenCentral {
content { excludeGroup “com.aspose” }
}
maven {
url “Aspose Repository Browser /java/repo/
content {includeGroup “com.aspose” }
}
maven {
url 'https://artifacts.xyz.com/artifactory/my_company.maven.my_product.release'
content {includeGroup “com.aspose” }
credentials {
username = “${artifactory_user}”
password = “${artifactory_password}”
}
}
}

Error :
Caused by: org.gradle.internal.resource.transport.http.HttpErrorStatusCodeException: Could not GET ‘https://repository.aspose.com/repo/com/aspose/aspose-words/21.11/aspose-words-21.11.pom’. Received status code 403 from server: Forbidden

We changed url “https://artifacts.aspose.com/repo/" to "https://repository.aspose.com/repo/

What could go wrong in this.

@hassan.khan,

This is a known issue recently. But it has been sorted out now. Please read this thread and try again. We apologize for any inconvenience.

We followed the instructions on the thread you referred to. It is building locally, but not on Azure Devops. We tried with both Aspose Repository Browser /java/repo/ and Aspose Repository Browser /java/repo/ and neither work on Azure Devops. Both repository urls work when building locally. This used to work on Azure Devops last week. What changed?

We have a paid license. Here is the error and pom file details:

[ERROR] Failed to execute goal on project ce-shared-common: Could not resolve dependencies for project ___: Failed to collect dependencies at com.aspose:aspose-pdf:jar:18.6: Failed to read artifact descriptor for com.aspose:aspose-pdf:jar:18.6: Could not transfer artifact com.aspose:aspose-pdf:pom:18.6 from/to AsposeJavaAPI (Aspose Repository Browser /java/repo/): authorization failed for https://repository.aspose.com/repo/com/aspose/aspose-pdf/18.6/aspose-pdf-18.6.pom, status: 403 Forbidden → [Help 1]

	<repository>
		<id>AsposeJavaAPI</id>
		<name>Aspose Java API</name>
		<url>https://repository.aspose.com/repo/</url>
	</repository>

	<dependency>
		<groupId>com.aspose</groupId>
		<artifactId>aspose-pdf</artifactId>
		<version>18.6</version>
	</dependency>
1 Like

This is exactly our issue. When trying in local env its good.
The issue is in Azure Devops, the pipeline is failing.

Could not resolve com.aspose:aspose-words:21.11.
Could not get resource https://artifact.aspose.com/repo/com/aspose/aspose-words/21.11/aspose-words-21.11.pom.

1 Like

@hassan.khan @jchungeqh

It is building locally, but not on Azure Devops.

I have resolved similar issues for GitHub Actions by adding following step.

  • name: Clear DNS Cache
    run: |
    sudo systemd-resolve --flush-caches

You can see full GitHub Actions yml file at https://github.com/farooqsheikhpk/java-hello-world-maven/blob/master/.github/workflows/maven.yml.

Related GitHub Log: https://snipboard.io/UW751n.jpg

Please do something similar for Azure Devops.

Feel free to reach me for any issue related to it. Thanks.

@Amjad_Sahi FYI.