Skip to content

Instantly share code, notes, and snippets.

@vegaasen
Last active December 4, 2017 11:51
Show Gist options
  • Save vegaasen/69844d6018d0d81b9a7c93cc6a572d5a to your computer and use it in GitHub Desktop.
Save vegaasen/69844d6018d0d81b9a7c93cc6a572d5a to your computer and use it in GitHub Desktop.
Artifactory to Nexus conversion

Artifactory to Nexus

Exporting from Artifactory

Select the option in Artifactory as an administrator user. Choose to export everything with all options enabled. Choose somewhere on the server to store the files and copy these to a required location.

Importing to Nexus

In order to import stuff in to Nexus, trigger the following commmand from the base-folder where the files were exported to (e.g .m2/*).

find . -type f -not -path './mavenimport\.sh*' -not -path '*/\.*' -not -path '*/\^archetype\-catalog\.xml*' -not -path '*/\^maven\-metadata\-local*\.xml' -not -path '*/\^maven\-metadata\-deployment*\.xml' | sed "s|^\./||" | xargs -I '{}' curl -u 'uploader:uploader' -X PUT -v -k -T {} https://<nexus-url>/repository/libs-release-local/{} ;

That is it. All files and folders should be created in Nexus within the defined portion (example above shows libs-release-local) :-).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment