私からすべての成果物を移動しなければなりませんでした1つのNexus 3リポジトリを別のNexus 3リポジトリにこれは偶然のだったら、私は手順(Windowsの)開発:ネクサスから
- をウェブインターフェース/ブラウズ/資産資産
- のリストをJSONを取った資産抽出し自分の値を収集することによって、URLを別のatrifactため
が
にアーティファクトURLを分割する "名前" 属性
- が.md5ているすべての資産を削除し、.sha1、Mavenの-のmetadata.xml
- はのpom.xmlあるすべての資産を削除しますそれぞれのそのような解析されたURLスクリプト(という名前publish.bat)を呼び出すための
path in the repository - it is in the format /<groupId path>/<artifactId>/<versionId>/<file name>
groupId- parse the path, replacing/with .
artifactId - parse the path,
version - parse the path,
file name - parse the path
packaging - the file name extension
:
@echo off
rem %1 = from repository URL
rem %2 = to repository URL
rem %3 = path
rem %4 = groupId
rem %5 = artifactId
rem %6 = version
rem %7 = file name
rem %8 = packaging
echo.
echo %1%3/%5/%6/%7
echo.
curl --remote-name --create-dirs --output %7 %1%3/%5/%6/%7
call mvn deploy:deploy-file -DgroupId=%4 -DartifactId=%5 -Dversion=%6 -DgeneratePom=true -Dpackaging=%8 -DrepositoryId=admin -Durl=%2 -Dfile=%7
del %7
注:-DrepositoryId =管理者は、Mavenのsettings.xml内のサーバー定義への参照ですターゲットリポジトリにパブリッシュするユーザーとパスワードを定義します。
例:
set FROM=source repository URL
set TO=target repository URL
call publish.bat %FROM% %TO% net/xyz/webtools net.xyz.webtools buildServer 03.06.00.01 buildServer-03.06.00.01.war war
は、なぜあなたはそれが必要なのでしょうか? – khmarbaise
いくつかのオプションがあります:https://groups.google.com/a/glists.sonatype.com/forum/#!topic/nexus-users/xdsKXeveUL0 –
@khmarbaise別のArtifactリポジトリに移行したいマネージャ – josefroselbearingpoint