How to copy/clone a maven2 repository server

妖精的绣舞 提交于 2019-12-24 03:49:12

问题


I want to create a local maven2 repository so we can download dependencies faster.

we use sbt

what is the simplest way to take all or some depedencies from http://oss.sonatype.org/content/repositories/releases and put it in our server

I was thinking of a script to download some jars and put it in a sftp server and use sftp resolver with sbt https://github.com/harrah/xsbt/wiki/Resolvers


回答1:


A pretty simple way would be to install a repository manager. A popular one is Sonatype Nexus (the application that serves http://oss.sonatype.org). The repository manager is installed on your server, and set up to proxy online Maven repositories. Then you download your dependencies from the repository manager as though it was the actual server. The first time you download a dependency, it'll be as slow as before (the proxy will download it from the internet), but after that, it'll serve its cached copy. There are some details on this question.



来源:https://stackoverflow.com/questions/12127441/how-to-copy-clone-a-maven2-repository-server

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