Skip to main content Skip to complementary content
Close announcements banner

Migrating unsigned Jobs on the Nexus repository

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
    • username 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!.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!