Repository Management with Nexus
22.2. Migrating from Artifactory
This appendix provides a guideline for migrating a Maven repository from Artifactory to Nexus.
Typically migrating from Artifactory revolves around migrating hosted repositories only, since any proxy repositories configured in Artifactory can just be set up with the same configuration in Nexus and all data will be retrieved from the upstream repositories again.
Hosted repositories on the other hand have to be migrated. The best practice for migration is to use the import/export feature of Artifactory and migrate one hosted repository after another. Please consult the Artifactory documentation for step by step instructions on how to export a repository.
After the export you have to create a hosted repository in Nexus e.g. with the name "old-releases" as documented in Section 4.4, “Adding a New Repository”. This will create a folder in sonatype-work/nexus/storage/old-releases.
Now you are ready to take the exported repository and copy it into the newly created storage folder.
Going back to the Nexus user interface, navigate to the repository administration and select the Browse Storage panel. Right-click on the root folder of the repository and select Rebuild Metadata first and as a second step select Update Index. Once these tasks are completed, the migrated repository is ready to be used.
After these task are completed you will probably want to add the migrated repository to the Public Repositories group or any other group in which you want the migrated repository content to be available.
If you want to ensure that the repository does not get any further content added you can set the Deployment Policy to Read Only in the Access Settings of the repository Configuration panel.