Here are some technical solutions that can be used when migrating from Nexus to Artifactory.
Importing the data
The two ways of importing the data from Nexus to Artifactory are:
- By importing Nexus files into Artifactory repositories.
- By declaring the Nexus repositories as remote repositories in Artifactory.
A combination of both techniques is also possible.
Pros and cons of importing Nexus files directly into Artifactory:
Nexus will not be needed after the import and can then be shutdown. All deployment and cache management will be done using Artifactory only.
The import can take a long time. Artifactory, unlike Nexus, organizes files, folders, metadata and all other information in a Relational Database Management System (RDBMS). All the files need to be inserted and cataloged correctly inside Artifactory, so that in cases where there are a large number of files and data, the downtime required for an import can be significant.
One important point to note about the import: When using SNAPSHOT local repositories, the numbering will be done in Artifactory. Therefore all the previous SNAPSHOTS need to be imported before a new deployment can be done.
Pros and cons of declaring nexus repositories as remote repositories:
- Content from the Nexus repository and new content in Artifactory are clearly separated. So, if there were a lot of old files and legacy-projects in Nexus that are unused and just taking up space, these soon become apparent, allowing you to identify them and clean things up if you wish.
- Both servers are running and synchronized (unidirectionally from Nexus to Artifactory), so the migration is smooth and incremental without the need for a long down time.
- The files need to be synchronized, and therefore deployed twice (in Nexus and then automatically in Artifactory’s cache).
- Both servers (Nexus and Artifactory) need to be running and maintained.
- With many writes to local repositories, synchronization may slow build times.
- When the synchronization of most of the files and folders is complete, some sort of disconnection needs to be planned.
Local repositories are essentially equivalent in both Nexus and Artifactory. The main points to watch for are:
- In Artifactory, the different layouts (Maven 2-1, Ivy, NuGet, …) are configurable at the time that the local repository is created, and you can modify the maximum number of snapshot versions per local repo.
- Protecting releases from deletion is done using permission targets and removing the Delete permission.
- Local repositories in Artifactory can manage many additional package types, compared to Nexus: RPM, NPM, RubyGems, etc…
- Artifactory can automatically clean POM repository references, which is a feature that does not exist in Nexus.
The remote repositories are completely equivalent, and verifying the cache TTL values is important.
The concept of a “Group” in Nexus is called a “Virtual Repository” in Artifactory.
There is a conversion tool available here.