Ata*_*rus 4 migration repository nexus
我们目前有一个Nexus存储库(版本1.9),用于将我们的Maven工件存储在旧服务器中.在我们的新服务器中,我们安装了最新版本的Nexus存储库(3.0.2).显然,版本1.9根据Maven坐标树(org/apache/commons/...)直接在文件系统中存储Maven工件,但版本3.0.2将工件存储在弹性搜索存储库中,作为blob对象.
所以我的问题是:如何将所有工件从版本1.9轻松迁移到新版本3.0.2?迁移工具应该附带3.1版本,但我担心它只涉及从2.x到3.1的迁移.它是这个进程的一组shell命令吗?
我们已经解决了我们的问题 Nexus 1.9直接将工件存储为文件系统,因此我们使用shell脚本通过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;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1068 次 |
| 最近记录: |