Maven build fails when using Aspose JavaApi repository

Dear,

We are using aspose-words in our java project, mostly for converting word documents to pdf.
Suddenly , since the last 5 hours our maven builds are failing with the error below:

Could not validate integrity of download from
spring-boot-starter-parent-2.3.9.RELEASE.pom

We are using the following aspose repository in our pom.xml:

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

and the following dependency:

<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-words</artifactId>
    <version>21.12</version>
    <type>pom</type>
</dependency>

When we remove the aspose repository and the aspose-words dependency the maven build is succesfull

Many thanks in advance

2 Likes

@kapatth Could you please try using classifier instead of type in the dependency configuration.

<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-words</artifactId>
    <version>21.12</version>
    <classifier>jdk17</classifier>
</dependency>

like described here: https://repository.aspose.com/words/21-12/

Hi, I tried but I had the same error.

@kapatth Could you please provide entire POM file for our reference. It looks like your application tries to download springframework from Aspose repository and expectedly cannot find it there.

pom.7z (1.6 KB)

I just attached it.

Thanks for the help

log.7z (1.4 KB)

I am also attaching the build log

@kapatth,

Please do the following:

  • Remove all Aspose dependencies in your .pom file.
  • Delete “boot” folder from “C:\Users<username>.m2\repository\org\springframework” (or other location that includes .m2)
  • Run maven build.
  • Return Aspose dependencies to .pom file.
  • Run the maven build again with Aspose dependencies.

After these steps, it should work for your .pom file for any subsequent builds.

Hi,

As it is a build through docker , does it make sense to follow these steps? Every build starts with an empty m2 repository.

Thanks

@kapatth,

You’re right, it doesn’t make sence in this case.
Please, add the folowing:

<repository>
	<id>spring-repo</id>
	<name>Spring Repository</name>
	<url>https://repo.maven.apache.org/maven2/</url>
</repository>

before defining the AsposeJavaAPI repository in your POM file and that should work.
I’ve attached a modified POM file to this answer.

pom.zip (1.6 KB)

We have the exact same problem in the same context with aspose-barcode, why does it suddenly appears at it was working before without any change in the pom ?

We have another repo in our pom which contains all others dependencies we need, so not sure your latest solution will fix the issue.

Hello, we have the same issue right now. It’s just suddenly stopped working.

Same here, changing the order of the repositories (aspose repo last) does not solve the issue either.

Gr, Steven.

I had already tried to use spring repo without fixing the issue. The only workaround for us in to install local the aspose lib while baking the image in docker. But we would prefer to avoid it ( there is a need to upload aspose jars to git repository) .

@kapatth @svanloon @dsablukov @lfraysse @alexey.maslov

Since yesterday, we are no longer able to maven build successfully as long as we have the aspose repository configured in our pom files. It seems to return a redirect page as the content for the requested artefacts instead of the actual content. This causes a fail during content validation.

FIXED.

This issue has been resolved now. Sorry for this inconvenience. Feel free to reach us for any issue related to Aspose Repository.

It is fixed, I confirm. Which was the problem? I am just curious.

1 Like

Problem solved at our side as well. Thanks for the fix.

1 Like

@kapatth

This was related to redirection added for non Aspose related artifacts.
Maven clients unable to resolved them internally. We have rolled back the redirection.