Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

In Smartfacts 2022.11, we introduced an abbreviated link format for source code links. We provide a simple Java based migration tool for the migration between the old link format, e.g.

LINK:{"oslc:label": "<label>","ID": "<id>", "appliedStereotypes": "<...>", 
      "sf:linkType": "LT-<...>", "sf:unitId": "UN-<...>",
      "rdf:resource": "mdel://<...>?projectId=<...>&elementId=<...>&<...>" } 

into the new, abbreviated format, e.g.,

oslc://<linkTypeBriefName>/<unitBriefName>/<id>/?label=<label>

The migration is performed on a client PC using the checked-out source code containing links of the old format.

During the migration, all files of the specified directory and transitive sub-directories thereof are scanned for links of the old format. If possible, they are converted into the new format. The output logs every transformed link as well as problems during the conversion.

Prerequisites

  • Java 11 (JRE) or higher

  • The Source Code Link Format Definition file (see Model Warehouse Profile - Source Code Links) exported as .json file

  • The Git repository where the migration is to be applied, checked out into a directory of the client PC in the suitable branch

Usage

Download the .jar file below and enter the following in a Shell (e.g., cmd or PowerShell):

java -jar <download-path>\smartfacts.tools.abbrevlinkmigrator-1.2-jar-with-dependencies.jar
          -config <path-to-link-format-definition>.json -directory <path-to-source-code>

All available configuration parameters:

 -config <arg>          Abbreviated link format configuration (.json)
 -directory <arg>       Directory. Default to current directory
 -format <arg>          New link type format. Default to
                        oslc://%s/%s/%s/?label=%s
 -help                  show usage
 -oldLinkPrefix <arg>   Old link Prefix. Default to LINK:

Download

With the download, you accept our license conditions.

  • No labels