Migrating unsigned Jobs on the Nexus repository - 7.2

Talend Data Integration Migration and Upgrade Guide

Version
7.2
Language
English (United States)
Product
Talend Data Integration
Module
Talend Activity Monitoring Console
Talend Administration Center
Talend Artifact Repository
Talend CommandLine
Talend Data Preparation
Talend Data Stewardship
Talend Identity and Access Management
Talend JobServer
Talend Log Server
Talend Runtime
Talend Studio
Content
Installation and Upgrade
After upgrading Talend Administration Center, you need to migrate the unsigned Jobs already published to the Nexus repository before you can execute them in your new Talend Administration Center.

Before you begin

Make sure the Redeploy option is activated on the Nexus side.

Procedure

  1. Unzip the archive Artifact-Repository-Nexus-<version>.zip included in the Talend Administration Center package to get the migration-<version> folder.
  2. Go to the configuration sub-folder and open the configuration file repository.properties.
  3. Edit the configuration file to specify the following details according to your actual situation:
    • repository type
    • repository URL
    • repository ID
    • group ID or search keyword
    • user name and password
    • the path to your license file
  4. Execute the JAR file nexus-signature-migration-<version>.jar in the migration-<version> folder.
    java -jar nexus-signature-migration-<version>.jar

Results

Your old Jobs published to the Nexus repository will be downloaded to your local file system, signed and redeployed to the Nexus repository.
Troubleshooting: If the migration failed and no error message is displayed, try following those steps.
  1. Log in to Nexus Repository Manager as admin.
  2. Click the Server Administration and Configuration button.
  3. Scroll down to the Update stored script by name API.
  4. Write search in the value of the name parameter.
  5. Paste the following search script in value of the body parameter if you don't already have the search script:
    { "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. Click Try it out!.