简体   繁体   English

如何从Maven Central填充私人工厂

[英]How to populate a private Artifactory from Maven Central

I'm currently trying to migrate our existing Artifactory from using Ivy repos to Maven compatible repos. 我目前正在尝试将现有的Artifactory从使用Ivy回购迁移到Maven兼容回购。 In our old Ivy repos, we used the Ivy Ant tasks to retrieve jars from Maven Central and load them into our local Artifactory. 在我们以前的常春藤仓库中,我们使用了常春藤蚂蚁任务从Maven Central检索罐子并将它们装入我们的本地Artifactory。 This has worked well for us, but now I need to find an equivalent mechanism for extracting jars from Central and installing them into the private Artifactory. 这对我们来说效果很好,但是现在我需要找到一种等效的机制,用于从Central提取jar并将其安装到私有Artifactory中。 I've done a bunch of searching, but I can't seem to find an equivalent mechanism for populating Maven-compatible repos within our private Artifactory. 我做了很多搜索,但似乎找不到在我们的私有Artifactory中填充Maven兼容存储库的等效机制。

Can anyone point me to some examples for how this might be done? 谁能为我指出一些如何做到这一点的例子? My Google-fu apparently isn't as good as I thought :-). 我的Google-fu显然不如我想的那么好:-)。 Ideally this would be done using some sort of build plugin (that would be Gradle for us now), or shell script, so that it could be repeatable. 理想情况下,这可以使用某种构建插件(现在称为Gradle)或shell脚本来完成,以便可以重复。

Note that due to my company's policy, I am not allowed to simply setup my private Artifactory to connect to Central as a remote. 请注意,由于我公司的政策,不允许我简单地设置我的私人Artifactory以远程连接到Central。 Our Artifactory is firewalled off from direct connection to the Internet, so we have to have some way to download from Central and then push to Artifactory, while ensuring that all the Central contents (ie jars, pom, sha, etc) are loaded. 我们的Artifactory不受直接连接到Internet的防火墙的保护,因此我们必须有某种方法从Central进行下载,然后推送到Artifactory,同时确保已加载所有Central内容(例如jars,pom,sha等)。

Not sure how the downloaded files from Maven central are located on your host that can reach it. 不确定从Maven Central下载的文件如何位于可以访问它的主机上。 If it is downloaded and saved locally, you can use the JFROG CLI to upload all files to Artifactory while maintaining the original names of the files ( see the examples): https://www.jfrog.com/confluence/display/CLI/CLI+for+JFrog+Artifactory#CLIforJFrogArtifactory-UploadingFiles 如果已下载并保存在本地,则可以使用JFROG CLI将所有文件上传到Artifactory,同时保留文件的原始名称(请参见示例): https : //www.jfrog.com/confluence/display/CLI/ CLI + for + JFrog + Artifactory#CLIforJFrogArtifactory-UploadingFiles

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM