Hi,
I just tried something which seemed very simple after reading Taher's suggestion
in OFBIZ-7783
"For example if your problem is simply that you cannot build on a disconnected computer even though the gradle cache is available then the solution is
to issue the command ./gradlew --offline tasks-in-here. So one solution is to simply archive the gradle cache and restore it."
in the "Should we do binary releases?" thread
"You can also copy the .gradle cache from another computer and start using it with
the --offline flag"
My idea was to mix --offline with --gradle-user-home Gradle commands, because I wanted to do this on the same machine and did not know where to copy
the .gradle cache (where the dependencies are)
-g, --gradle-user-home <-> Specifies the Gradle user home directory. The
default is the .gradle directory in the user's home directory.
So, *on the same machine*, I copied the cache (830 MB) from .gradle directory to another place (I picked the shortest one, ie c:\gradle). I got 9
issues with file names too long (was surprised about that since from the user's home directory they should be longer)
Then tried to use "gradlew --offline -g c:\gradle ofbiz" but got a syntax error
and Gradle began to download the Internet again:
La syntaxe du nom de fichier, de répertoire ou de volume est incorrecte.
"Downloading https://services.gradle.org/distributions/gradle-2.13-bin.zip"
I stopped. I guess I missed something, and rather decided to set the set
GRADLE_USER_HOME to c:\gradle in the gradlew.bat script. but then got
Exception in thread "main" java.io.FileNotFoundException: "c:\gradle"\wrapper\dists\gradle-2.13-bin\4xsgxlfjcxvrea7akf941nvc7\gradle-2.13-bin.zip.lck
(La syntaxe du nom de fichier, de répertoire ou de volumeest incorrecte)
I then copied the missing wrapper folder in c:\gradle (400 MB). Despite Windows
and its damned limitation on paths names, it then worked perfectly well.
But it's still disappointing because you have to copy 1,2 GB instead of 150 MB
(160MB including OFBiz jars)
So my next question: should we use that as an advice to our users who can't use Gradle on their production and alike machines, or should we try to
refine and find a better option?
Thanks
Jacques