FINERACT-2108: Fix gradle build error
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:
- psathuluri (Github issue)
- Samart Singh Thakur (Jira Ticket)
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.)
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 which lib use it, can not found it in project
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
How about:
buildscript.configurations.classpath.resolutionStrategy.force( 'com.burgstaller:okhttp-digest:1.10', 'io.github.rburgst:okhttp-digest:3.1.0')
... shorter... one-liner...
@ufonduo It is the official replacement, mentioned in this issue, at github.com/rburgst and at mvnrepository.
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 @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.
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 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 ;)
I think we need some sort of confirmation and we can close this PR
@HarimbolaSantatra guys, anything happening here?
@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 I can confirm the dependency has been removed. I'll close this PR.