Reputation: 527
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?
Upvotes: 5
Views: 1685
Reputation: 527
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;
Upvotes: 7