简体   繁体   中英

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. In our old Ivy repos, we used the Ivy Ant tasks to retrieve jars from Maven Central and load them into our local 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. 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.

Can anyone point me to some examples for how this might be done? My Google-fu apparently isn't as good as I thought :-). 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.

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. 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.

Not sure how the downloaded files from Maven central are located on your host that can reach it. 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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