Downloading complete maven remote repository to Local repository?

srinannapa picture srinannapa · Mar 13, 2010 · Viewed 27k times · Source

Is there any to get the entire remote repository, say from http://repo1.maven.org/maven2/ , to my local repository (to %USERPROFILE%)?

Answer

Pascal Thivent picture Pascal Thivent · Mar 13, 2010

From http://maven.apache.org/community.html:

Being a Good Maven Citizen

The concept of a public repository built into the core architecture of Maven makes it necessarily community-centric. There are a few simple things that Maven users may do to help keep that community thriving.

Be a Kind Public Repository User

The best thing that a user can do is to set up their own remote repository mirror containing the projects needed. There are several tools to make this simpler, such as Nexus or Archiva. This reduces strain on the Maven central repository, and allows new users to get acquainted with Maven easier and quicker. This is especially important for power-users and corporations. The incentive behind this is, controlling your own servers can give you desired level of security and more control over uptime, resulting in a better experience for your users. With that said, keep the following sentiment in mind:

DO NOT wget THE ENTIRE REPOSITORY!

Please take only the jars you need. We understand this is may entail more work, but grabbing all 9+ Gigs of binaries really kills our servers.

Host a Mirror

As an extention to the previous statement, if you have access to a large data repository with lots of bandwidth, please consider becomming a mirror for the Maven central repository.

As you can imagine, thousands of users downloading can put quite a strain on one server. If you wish to be a mirror, please file a request in the Maven Project Administration JIRA project.

Host a Public Repository

If you have any projects that you wish others to use, host them on your own public repository. That way, your users can simply add your repository to their own project repo list, and viola! Maven can keep you and your users in synch, growing your user-base due simply to its new-found ease of use.

Maybe if you explain why you'd like to get the whole central repo in %USERPROFILE% I could provide a better answer (if you you need to go offline, there are smarter solutions than getting 9+ gigs of artifacts). But for now, I don't get the point.