How to migrate .gradle from one machine to another machine

(noppanit.c) #1


I’m using Gradle 1.6 and would like to deploy our application to our internal jenkins server. It’s sitting behind firewall and cannot connect to the Internet. We have a proxy server but it’s NTLM and is blocked by default and it’s really hard getting that unblocked. It could take months but we need to deploy our application as soon as possible. So, I’m thinking of plan B. Developer machine can access to the Internet and download all the dependencies. How can I migrate .gradle folder from developer machine to jenkins server and run the build without Internet access?

I try this build from my machine

gradle build -g /tmp/lib

And I move /tmp/lib to jenkins machine just to test and run this command

gradle build test -g /tmp/lib --offline

But it’s still looking for dependencies from the Internet. Is there anyway I could export the whole dependencies and move that to another machine?


(Benjamin Muschko) #2

You might want to think about setting up your own internal binary repository instead of relying on Maven Central. That has the following benefits:

  1. You don’t have to rely on an external service to provide you with mission-critical dependencies. 2) You won’t need to connect to the internet to build your software. 3) You won’t have to migrate the local cache.

(noppanit.c) #3

Thanks for your fast reply. How can I do that? Is there any documentation for this? Thanks a lot.

(noppanit.c) #4

Also, I guess getting that approval might take sometime. Is there any quick way I could get that working first?

(Benjamin Muschko) #5

Have a look at some of the products out there. Many organizations use Artifactory or Nexus.