I am working on a gradle project that should run on a machine without internet connection.
For that, I have created a task that takes the gradle cache and copies it into another directory, to be used as a local repository.
For a smaller test project with 2-3 dependencies that task did it’s job and I was able to execute “gradle build --offline” and run the project successfully.
I have built the project in online mode and it worked. I have ran my task to copy the cache to the local repository and it worked. However, when trying to run “gradle build --offline” I am getting errors like this (for several different jar files):
Could not download commons-math3.jar (org.apache.commons:commons-math3:3.4.1): No cached version available for offline mode
Checking both my local repository and the gradle cache, I couldn’t find the relevant jar file (in this case commons-math3-3.4.1.jar).
I have tried using “gradle build --refresh-dependencies”, I have tried to delete the cache and then using “gradle build” - nothing, it wouldn’t download the jar files, only the pom files. I have even tried to download the jars manually and put them in the correct directories in my local repository did not work.
Any help would be appreciated.