Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Overview

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

For a full description of how the JFrog Artifactory plugin integrates with Mend, see https://whitesource.atlassian.net/wiki/pages/resumedraft.action?draftId=34046111.

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 Block
updateRepoWithMend(cron: "0 28 13 * * ?") {
  ...
}

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

Code Block
/**
 * 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:

...

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

...

is available at: https://docs.mend.io/bundle/unified_agent/page/migrating_the_artifactory_plugin.html