Skip to content

Dependency groupId is incorrect for latest version #6

@dpcasady

Description

@dpcasady

The displayed dependencies block for a given plugin may be incorrect in the case that the plugin has had multiple groupId/artifactId combinations (system_ids) in bintray. Take the excel-export plugin. This plugin is currently at version 2.0.2 and had a previous groupId in bintray of pl.touk while the current version is org.grails.plugins.

When building the plugin page, it looks like plugin metadata is read from bintray and used to build out the plugin details on the page. Continuing our example, that metadata is read from https://api.bintray.com/packages/grails/plugins/excel-export and looks like so:

{
  "name": "excel-export",
  "repo": "plugins",
  "owner": "grails-excel-export",
  "desc": "This plugin helps you export data in Excel (xlsx) format, using Apache POI.",
  "labels": [],
  "attribute_names": [],
  "licenses": ["Apache-2.0"],
  "custom_licenses": [],
  "followers_count": 0,
  "created": "2016-11-28T18:56:02.983Z",
  "website_url": "https://github.com/TouK/excel-export",
  "issue_tracker_url": "https://github.com/TouK/excel-export/issues",
  "linked_to_repos": [],
  "permissions": [],
  "versions": ["2.0.2", "2.0.1"],
  "latest_version": "2.0.2",
  "updated": "2016-11-28T22:39:46.878Z",
  "rating_count": 0,
  "system_ids": ["org.grails.plugins:excel-export", "pl.touk:excel-export"],
  "vcs_url": "https://github.com/TouK/excel-export",
  "maturity": ""
}

From that data, the Plugins.es6 file builds the dependencies block from the latest_version, and the last value in the system_ids array. Herein lies the problem if the latest version does not correspond to that last system_id in the array. The result is:

dependencies {
    compile 'pl.touk:excel-export:2.0.2'
}

when it should be:

dependencies {
    compile 'org.grails.plugins:excel-export:2.0.2'
}

I'm not sure the best solution to fix this otherwise I would have made a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions