メイン コンテンツをスキップする 補完的コンテンツへスキップ

無署名のジョブをNexusリポジトリーに移行

Talend Administration Centerをアップグレードした後に、新しいTalend Administration Centerで実行する前に、Nexusリポジトリーに公開済みの無署名のジョブを移行する必要があります。

始める前に

[Redeploy] (再デプロイ)オプションがNexus側で有効になっていることを確認します。

手順

  1. Talend Administration Centerパッケージに含まれているアーカイブArtifact-Repository-Nexus-<version>.zipを解凍して、migration-<version>フォルダーを取得します。
  2. configurationサブフォルダーに移動し、設定ファイルrepository.propertiesを開きます。
  3. 設定ファイルを編集して、実際の状況に従って以下の詳細を指定します。
    • リポジトリータイプ
    • リポジトリーのURL
    • リポジトリーID
    • グループIDまたは検索キーワード
    • ユーザー名とパスワード
    • ライセンスファイルへのパス
  4. migration-<version>フォルダー内のJARファイルnexus-signature-migration-<version>.jarを実行します。
    java -jar nexus-signature-migration-<version>.jar

タスクの結果

Nexusリポジトリーに公開された古いジョブがローカルファイルシステムにダウンロードされ、署名されてNexusリポジトリーに再デプロイされます。
トラブルシューティング: 移行が失敗してもエラーメッセージが表示されない場合は、次の手順を試してください。
  1. Nexus Repository Managerに管理者としてログインします。
  2. [Server administration and configuration] (サーバーの管理と設定)ボタンをクリックします。
  3. Update stored script by name APIまでスクロールダウンします。
  4. nameパラメーターの値にsearchと書き込みます。
  5. 検索スクリプトがまだない場合は、bodyパラメーターのvalueに次のスクリプトを貼り付けます:
    { "name": "search", "content": "import org.sonatype.nexus.repository.storage.Query; 
    import org.sonatype.nexus.repository.storage.StorageFacet; 
    import org.sonatype.nexus.repository.storage.Query.Builder; 
    import groovy.json.JsonOutput; 
    import groovy.json.JsonSlurper; 
    def search = new JsonSlurper().parseText(args); 
    log.info('search arguments: ' + args); 
    def repositoryId = search.repositoryId; 
    def groupId = search.g; 
    def artifactId = search.a; 
    def version = search.v; 
    def data = []; 
    def repo = repository.repositoryManager.get(repositoryId); 
    StorageFacet storageFacet = repo.facet(StorageFacet); 
    def tx = storageFacet.txSupplier().get(); 
    tx.begin(); 
    def builder = Query.builder(); 
    if(groupId != null){ builder.where('group = ').param(groupId); };
    if(version != null){ if(builder.hasWhere()){ builder.and('version = ').param(version); }else{ builder.where('version = ').param(version); } };
    if(artifactId != null){ artifactId =[artifactId]; log.info('artifactId: ' + artifactId); if(builder.hasWhere()){ builder.and('name in ').param(artifactId); }else{ builder.where('name in ').param(artifactId); } };
    def query = builder.build() ;
    log.info('query: ' + query.getParameters());
    log.info('query: ' + query.getWhere());
    def components = tx.findComponents(query , [repo]);
    components.each{ ArtifactResult artifact = new ArtifactResult(); artifact.groupId = it.attributes().child('maven2').get('groupId'); artifact.artifactId = it.attributes().child('maven2').get('artifactId'); artifact.version = it.attributes().child('maven2').get('baseVersion'); artifact.extension = it.attributes().child('maven2').get('packaging'); artifact.last_updated = it.lastUpdated(); artifact.description = it.attributes().child('maven2').get('pom_description'); log.info('search arguments: ' + it.attributes()); log.info('search getProperties: ' + it.getProperties()); log.info('search getEntityMetadata: ' + it.getEntityMetadata()); log.info('search getMetaPropertyValues: ' + it.getMetaPropertyValues()); data << artifact; };
    tx.commit();
    tx.close();
    return JsonOutput.toJson(data);
    class ArtifactResult{ String groupId; String artifactId; String version; String extension; String last_updated; String description; } ", "type": "groovy" }
  6. [Try it out!] (試してみる)をクリックします。

このページは役に立ちましたか?

このページまたはコンテンツに、タイポ、ステップの省略、技術的エラーなどの問題が見つかった場合は、お知らせください。改善に役立たせていただきます。