Skip to main content
Skip table of contents

Migrating the Artifactory Plugin

Overview

This page describes the updates and steps required to migrate the Artifactory Plugin from a version earlier than 21.12.1.

For a description of how the JFrog Artifactory plugin integrates with Mend, see Artifactory Plugin Overview .

Installation Updates

In earlier versions, there were 4 jar files that needed to be installed in the plugins/lib directory of the Artifactory server. From version 21.12.1 of the plugin, only a single jar needs to be installed.

The distribution is bundled in a zip file, with 4 files:

  • README.md - describing the plugin usage

  • mend-artifactory-plugin.groovy

  • mend-artifactory-plugin.properties

  • mend-artifactory-plugin-VERSION.jar

The plugin should be installed as before, with the following changes:

  1. Replace the mend-artifactory-plugin.groovy and the mend-artifactory-plugin.properties files.

  2. Remove the 4 jar files from the previous plugin in the plugins/lib directory, and place the new mend-artifactory-plugin-VERSION.jar file in the plugins/lib directory.

NOTE:

In order to remove files from this location, please add “force.delete“ to the file name. For example:

  • mend-artifactory-plugin.groovy.force.delete

  • wss-agent-report-<version>.jar.force.delete

Deleting the files in any other way may result in the files being re-added automatically by JFrog Artifactory.

Configuration Properties Updates

The following property keys were added:

  • userKey: This property was optional in the previous plugin version, but is now mandatory. It should contain a valid Mend user key.

Cron Job Configuration

In earlier plugin versions, in order to configure the interval at which the Artifactory repositories were scanned, the following string needed to be modified in the mend-artifactory-plugin.groovy file:

CODE
updateRepoWithmend(cron: "0 28 13 * * ?") {
  ...
}

From version 21.12.1, the mend-artifactory-plugin.groovy file looks like this:

CODE
/**
 * scanRepositoriesCron (java.lang.String) - A valid cron expression used to schedule job runs.
 * Modify this parameter to configure the desired schedule to scan your artifactory repositories.
 * See README.md for examples.
 */
def scanRepositoriesCron = "0 0 0 * * ?"

jobs {
    scanRepositories(cron: scanRepositoriesCron) {
        pluginAgent.runRepositoriesScan()
    }
}

To configure a schedule for scanning the Artifactory repositories:

  1. Open the mend-artifactory-plugin.groovy file in a txt editor.

  2. Modify the def scanRepositoriesCron = "0 0 0 * * ?" string.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.