.
This is an advanced feature that should only be considered when all other options have been excluded.
When using the migration wizard to upgrade from Nexus Repository 2 to Nexus Repository 3, you can choose which specific repositories to migrate. By default, when you choose a repository, it configuration. settings, security and all of its content will be migrated into Repository 3.
In exceptional cases it may be desired to migrate the configuration of a repository, but not migrate the content contained by it.
Example Use Cases
Very large proxy repositories in Repo 2 containing mostly old components not applicable to current builds. Time and disk space is saved in the new instance, at the risk of future failing builds because some content is no longer available to proxy at the remote site.
Retaining a hosted repository config, with plans to later use an Import task or REST API to put new content into that hosted repo of identical configuration.
Basic testing scenarios where you only want to verify the proper migration of certain repos, and wish to avoid the delay caused by migrating content you either know already migrates successfully or don't care to test.
How to Configure Nexus Repository 3 to not migrate content from selected Nexus Repository 2 Repositories
This capability is only applicable when using the official Migration Wizard.
- Identify the repository names in repo 2 that you will select in the wizard to migrate into repo 3, but you don't wish to migrate content from.
- In Repository 3, edit sonatype-work/nexus3/etc/nexus.properties file.
- Add a property nexus.migration.repositories.skip.content with a comma separated value list of all repo names that should skip content migration.
- Start Repository 3 after adding the property, then use the migration wizard to upgrade repo 2 to repo 3.
Example
Repository 2 has repositories named
- maven1
- maven2
- maven3
- maven4
You want to only migrate repository config for maven2, maven3 and maven4 into repository 3
You decide you don't want to migrate the content from maven3 and maven4, only maven2.
You edit sonatype-work/nexus3/etc/nexus.properties and add the following line:
nexus.migration.repositories.skip.content=maven3,maven4
In the migration wizard you DO NOT select in the UI maven1. You do select all other repositories.
After the migration wizard is complete, Nexus Repository 3 should contain configuration for maven2, maven3 and maven4 repos, but only maven2 will have any content in it migrated from Nexus Repository 2.