How to move artifacts from a repository to another repository?

左心房为你撑大大i 提交于 2020-02-15 08:22:44

问题


My project now getting artifacts from the Central Repository. Now I created new Artifact repository and want my project getting artifacts from that. How can I download all artifacts from previous central repository to new created repository?


回答1:


Maven repository managers Nexus, Artfactory, Archiva are not designed to mirror the content of remote repositories. They cache any files retrieved by users, and this improves build efficiency and insulates you against network outages.

Like any cache the challenge is keeping up to date. What all the Maven repository managers do is download an incremental index of the remote content, enabling users to search for files and see new releases, without downloading everything. (In 2011 Maven Central was estimated at 350GB, source)

So in conclusion, just setup you Maven repository, point your build at it and the artifacts from Maven Central will be downloaded automatically.

Additional note:

  • It's worth looking at the capabilities of your repository manager. They may have additional non-standard features. For example Nexus Professional has a smart proxy feature for keeping hosted repositories synced, although I don't know if this will work with Maven Central


来源:https://stackoverflow.com/questions/22574919/how-to-move-artifacts-from-a-repository-to-another-repository

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!