-6

I am trying to set up a local maven repository using nexus to store ALL of the maven dependency libraries to be use in an offline environment. We need to be able to point our maven to this repository instead of trying to query the internet for a needed project library. There is no option of using the internet in our environment so I need an easy(ish) way to download literally every library maven could need in order to populate our repository. I am not asking for an opinion on what is the easiest, I just need a few methodologies that would work because I have no idea where to start with this other than spending the next year clicking links and downloading. I have found methods online that explain how to store project specific dependencies but I can't find a way to get ALL of the dependencies. I also know these libraries are continuous changing and be upgraded, so any ideas on how to keep them up to date without individually clicking and downloading each one would be great as well. Thanks!

Chris
  • 1
  • 1
    Downloading the internet is so 2012: http://w-shadow.com/blog/2009/06/12/download-the-entire-internet/ – alexbt Jan 26 '17 at 16:09
  • The answer here provides a suggestion : http://stackoverflow.com/questions/12127441/how-to-copy-clone-a-maven2-repository-server – alexbt Jan 26 '17 at 16:50
  • Thanks, I read this one before and that is exactly what we are doing, but this references a specific project's dependencies. How would I go about getting all dependencies without a project pulling them down? – Chris Jan 26 '17 at 17:01
  • How about this ? http://stackoverflow.com/questions/2439891/downloading-complete-maven-remote-repository-to-local-repository – alexbt Jan 26 '17 at 17:25
  • This does provide some guidance, thank you. – Chris Jan 26 '17 at 18:17

1 Answers1

0

MavenCentral is huge. Downloading it not only takes ages, they will block you if you try.

I understand very well that you cannot allow your developers to access MavenCentral during their development process. Our solution for this problem is as follows:

We have a proxy of MavenCentral that is only accessible to a few admins. If a developer needs a dependency that is not on our development Nexus, he writes a ticket to the admins. They check the dependency and if they approve, they start a job that copies the required dependency (together with all transitive dependencies) from the MavenCentral proxy to the development Nexus. This way, the admins have full control over what the developers use, but you need not copy MavenCentral as a whole.

J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142