Is there any way to add a remote jar as local dependency in gradle?

27 Views Asked by At

I've an internship project, which I'm trying to build on my device.

The gradle build file uses a plugin com.axelor.app, which then downloads a jar file as one of the fundamental dependencies to build the app.

The problem I'm facing while using ./gradlew build is

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'axelor-demo'.
> Could not resolve all dependencies for configuration ':runtimeClasspath'.
   > A problem occurred configuring project ':modules:axelor-contact'.
      > Could not download axelor-core-6.0.4.jar (com.axelor:axelor-core:6.0.4)
         > Could not get resource 'https://repository.axelor.com/nexus/repository/maven-public/com/axelor/axelor-core/6.0.4/axelor-core-6.0.4.jar'.
            > Premature end of Content-Length delimited message body (expected: 4,423,264; received: 1,700,824)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Upon further search, I came to conclusion that download speed is very slow, even though I've good internet connection and tried different networks as well, still oftentimes the download fails midway.

Although, I've downloaded the jar locally, I need to know how do I integrate/add it to gradle build script so that instead of downloading it from maven central, it uses the local jar.

0

There are 0 best solutions below