简体   繁体   中英

Migrate repositories from Sonatype Nexus 1.9 to 3.0

We have currently a Nexus repository (version 1.9) to store our Maven artifacts in an old server. In our new server, we have installed the last version of Nexus repository (3.0.2). Apparently, version 1.9 stores Maven artifacts directly in file system, according Maven coordinate tree ( org/apache/commons/... ), but version 3.0.2 stores artifacts in elastic search repo, as blob objects.

So my questions is: how migrate easily all artifacts from version 1.9 to new version 3.0.2? Migration tool should come with version 3.1, but I'm afraid that it concerns only migration from 2.x to 3.1. Is it a set of shell commands for this processus?

We have resolved our problem. Nexus 1.9 stores artifacts directly as file system, so we used a shell script to send artifacts with curl :

#!/bin/bash

REPOSITORY=your_repo
EXTENSIONS="*.jar *.pom *.xml *.md5 *.sha1 *.zip"

for tosearch in $EXTENSIONS;
do
     for file in `find . -name $tosearch`;
     do
         length=${#file}
         path=${file:2:$length}
         curl -# -u user:password --upload-file $path http://nexus.example.fr/repository/$REPOSITORY/$path
     done;
done;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM