如何复制/克隆Maven2存储库服务器 [英] How to copy/clone a maven2 repository server

查看:100
本文介绍了如何复制/克隆Maven2存储库服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个本地maven2存储库,以便我们可以更快地下载依赖项.

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

我们使用sbt

最简单的方法是从 http://oss.sonatype中扣除全部或部分欠款. org/content/repositories/releases 放入我们的服务器

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

我当时正在考虑下载一些罐子并将其放入sftp服务器并使用sftp解析器和sbt的脚本 https://github.com/harrah/xsbt/wiki/Resolvers

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

推荐答案

一种非常简单的方法是安装存储库管理器.流行的是Sonatype Nexus(提供 http://oss.sonatype.org 的应用程序).存储库管理器安装在您的服务器上,并设置为代理在线Maven存储库.然后,您可以从存储库管理器中下载依赖项,就好像它是实际的服务器一样.第一次下载依赖项时,它会像以前一样慢(代理将从互联网上下载它),但是此后,它将提供其缓存的副本.有关此问题的详细信息问题.

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.

这篇关于如何复制/克隆Maven2存储库服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆