How to move artifacts from a repository to another repository?

后端 未结 1 689
你的背包
你的背包 2021-01-20 19:20

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 a

1条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-20 19:46

    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

    0 讨论(0)
提交回复
热议问题