fineract icon indicating copy to clipboard operation
fineract copied to clipboard

FINERACT-2108: Fix gradle build error

Open HarimbolaSantatra opened this issue 1 year ago • 10 comments

Description

As mentioned in the Jira ticket, com.burgstaller:okhttp-digest:1.10 is no longer available on Maven Central nor any other repositories.

The full error:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'fineract'.
> Could not resolve all files for configuration ':classpath'.
   > Could not find com.burgstaller:okhttp-digest:1.10.
     Searched in the following locations:
       - https://plugins.gradle.org/m2/com/burgstaller/okhttp-digest/1.10/okhttp-digest-1.10.pom
     Required by:
         project : > org.asciidoctor.jvm.gems:org.asciidoctor.jvm.gems.gradle.plugin:3.3.2 > org.asciidoctor:asciidoctor-gradle-jvm-gems:3.3.2 > com.github.jruby-gradle:jruby-gradle-core-plugin:2.0.2 > io.github.http-builder-ng:http-builder-ng-okhttp:1.0.3

* Try:
> If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Get more help at https://help.gradle.org.

Credit:

Checklist

  • [X] Write the commit message as per https://github.com/apache/fineract/#pull-requests

  • [X] Acknowledge that we will not review PRs that are not passing the build ("green") - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.

  • [ ] Create/update unit or integration tests for verifying the changes made.

  • [X] Follow coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.

  • [ ] Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes

  • [X] Submission is not a "code dump". (Large changes can be made "in repository" via a branch. Ask on the developer mailing list for guidance, if required.)

HarimbolaSantatra avatar Aug 23 '24 16:08 HarimbolaSantatra

Hi @HarimbolaSantatra , we addressed this by adding Apache Archiva to the repositories section of the buildscript. That is:

repositories { maven { url 'https://plugins.gradle.org/m2/' } mavenCentral() maven { url "https://archiva-repository.apache.org/archiva/repository/all-public/" } }

The above approach was adopted because we weren't sure that "io.github.rburgst:okhttp-digest:1.21" is an in-place replacement for "com.burgstaller:okhttp-digest:1.10".

ufonduo avatar Aug 24 '24 06:08 ufonduo

@ufonduo which lib use it, can not found it in project

zhao007z8 avatar Aug 26 '24 11:08 zhao007z8

Required by: org.asciidoctor.jvm.gems:org.asciidoctor.jvm.gems.gradle.plugin:3.3.2 > org.asciidoctor:asciidoctor-gradle-jvm-gems:3.3.2 > com.github.jruby-gradle:jruby-gradle-core-plugin:2.0.2 > io.github.http-builder-ng:http-builder-ng-okhttp:1.0.3

@zhao007z8

ufonduo avatar Aug 26 '24 15:08 ufonduo

How about:

buildscript.configurations.classpath.resolutionStrategy.force( 'com.burgstaller:okhttp-digest:1.10', 'io.github.rburgst:okhttp-digest:3.1.0')

... shorter... one-liner...

vidakovic avatar Aug 26 '24 21:08 vidakovic

@ufonduo It is the official replacement, mentioned in this issue, at github.com/rburgst and at mvnrepository.

HarimbolaSantatra avatar Aug 27 '24 06:08 HarimbolaSantatra

How about:

buildscript.configurations.classpath.resolutionStrategy.force( 'com.burgstaller:okhttp-digest:1.10', 'io.github.rburgst:okhttp-digest:3.1.0')

... shorter... one-liner...

@vidakovic There's a deprecation warning:

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

With --warning-mode all, we can see that it's from build scripts from custom/acme/.../build.gradle, although I don't know if it is related to this change.

HarimbolaSantatra avatar Aug 27 '24 07:08 HarimbolaSantatra

@HarimbolaSantatra @vidakovic I believe the mentioned dependency was already removed from Fineract. I dont think there is anything to do here. @alberto-art3ch Please share your thoughts.

adamsaghy avatar Aug 27 '24 09:08 adamsaghy

I can confirm that the current develop branch is successfully building the jar file. The affected version was 1.9 and 1.8.4, so maybe it was fixed along the way.

HarimbolaSantatra avatar Aug 27 '24 09:08 HarimbolaSantatra

I can confirm that the current develop branch is successfully building the jar file. The affected version was 1.9 and 1.8.4, so maybe it was fixed along the way.

I would say we should have this fix for those versions only then ;)

adamsaghy avatar Aug 27 '24 09:08 adamsaghy

I think we need some sort of confirmation and we can close this PR

HarimbolaSantatra avatar Sep 04 '24 17:09 HarimbolaSantatra

@HarimbolaSantatra guys, anything happening here?

galovics avatar Oct 04 '24 16:10 galovics

@galovics This PR addresses a dependency problem linked with com.burgstaller:okhttp-digest:1.10. Current develop version build successfully but we can't really confirm that it was indeed removed from Fineract.

HarimbolaSantatra avatar Oct 04 '24 16:10 HarimbolaSantatra

@HarimbolaSantatra I can confirm the dependency has been removed. I'll close this PR.

galovics avatar Oct 08 '24 09:10 galovics