Here is a bash script that migrates all maven packages from an on-prem or cloud instance of Sonatype Nexus to an Azure Artifacts feed.
What you will need:
- Login details to your Sonatype Nexus instance
- Minimum Contributor rights to your Azure Artifacts Feed
- Your local settings.xml file with valid credentials for your Azure Artifacts feed
- Ensure your linux distro has the following packages installed:
sudo apt-get -y install libxml2-utils
sudo apt-get -y install jq
How to use?
- Clone this repo
- Edit the script of your choice with your details (shown with the comments with an example) specifically your nexus instance and your repo name
- Run the script of your choice in the terminal!