Quick overview of the status quo:
- I have a corporate maven repository that is hosted at a different location
- The internet connection to said repository is pretty slow
- I would like to host a cache/mirror at my site so my and my team can download dependencies faster
- We have a single dependency that stands out because it is 8GB in size which means it takes around 40min just to download
So I tried to use Artifactory OSS, but:
- The official 'repository replication' feature is locked behind a >=3k$/year paywall. It's basically the same as a 'remote repository' that caches proactively in one way or another. Pretty much the same situation with Sonatype Nexus OSS.
- I would generally be okay with using a plain 'remote repository' in Artifactory, but it behaves weirdly.
- The intended functionality is that a client requests a dependency from the on-site Artifactory remote repository pointing to the off-site actual server. If it's not cached, the on-site server downloads it from the off-site server. Then it's served to the client by the on-site server
- When a large dependency is requested, the on-site server starts downloading and after ~30s the client gets a socket timeout and stops the entire gradle build
- There is an option called 'store locally' that when deactivated forwards the request to the off-site server and doesn't cache at all
- What I'd want is the on-site server to start caching when a dependency is requested, but responding that the dependency is not present on this server (causing the client to look at the off-site server) or forward the request to the off-site server like it does when 'store localy' is disabled
After all I'm not sure where the problem is. Do I have to configure Artifactory or Gradle differently? Is there something else I could use to create a mirror? A totally acceptable solution would be to run a copy-script every night, but I'd prefer solving it with Artifactory OSS.