Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency groupId is incorrect for latest version #6

Open
dpcasady opened this issue Nov 28, 2016 · 1 comment
Open

Dependency groupId is incorrect for latest version #6

dpcasady opened this issue Nov 28, 2016 · 1 comment

Comments

@dpcasady
Copy link

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.

@sheehan
Copy link
Collaborator

sheehan commented Nov 29, 2016

Thanks for the info. It seems like in general the last value in the system_ids array corresponds to the latest_version. I'm not sure why this one's different but I'll look into it when I get a sec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants