How to get repository url and plugin id from marketplace for Eclipse plugin
Asked Answered
M

2

5

I am provisioning Eclipse and Eclipse plugins to an Ubuntu Virtual Machine using vagrant and chef. All plugins need to be installed using equinox.p2. Here is an example of installing Buildship plugin:

eclipse -application org.eclipse.equinox.p2.director -noSplash -repository http://download.eclipse.org/buildship/updates/e46/releases/1.0 -installIUs org.eclipse.buildship.feature.group

In many cases a plugin only provides a marketplace Install button and no update site URL and no details on plugin id.

How can I get the update site URL and plugin id for such a plugin?

Mile answered 15/8, 2016 at 12:39 Comment(0)
B
9

This information is hidden unless you own the entry on the marketplace. However you can obtain it using the marketplace API. For instance getting the details on the OS X Eclipse Launcher, by issuing curl http://marketplace.eclipse.org/node/364668/api/p on the command line and you'll get all the details in the form of XML. The update site URL is in updateurl, and the feature(s) are listed in ius. Replace the number with the identifier of the entry in the marketplace. You can find it by looking at the URL assigned to the Install link button.

Bolection answered 15/8, 2016 at 14:13 Comment(2)
Thanks so much for thing. Just a side note for people who may not know, you can copy and paste that url into your browser for the XML to get the information you may need.Higbee
To find out what should come after -installIU, I had to install manually once, then read the feature names from within Eclipse. (Installing JBoss Tools, feature groups org.jboss.ide.eclipse.as.feature.feature.group and org.jboss.tools.usage.feature.feature.group.)Forereach
C
0

Here's Returning a Specific Listing section from the Marketpalce REST API documentation.

There are two methods of returning a specific listing.

http://marketplace.eclipse.org/content/[title]/api/p

[...]

Calls to either URL will return a listing of contents of a node.

[title] is the identifier of a Marketplace plugin URL like in filesync in https://marketplace.eclipse.org/content/filesync. Fetch it and extract the two XPaths, //node/updateurl and //node/ius/iu, e.g. with Python (via pyfil).

$ wget -qO- http://marketplace.eclipse.org/content/filesync/api/p \
  | pyfil 'stdin.read()' \
    '__import__("xml.etree.ElementTree").etree.ElementTree.fromstring(x)' \
    '(x.find("node/updateurl").text,x.find("node/ius/iu").text)'
[
  "https://raw.githubusercontent.com/iloveeclipse/plugins/latest/",
  "FileSync"
]
Cyr answered 28/4, 2022 at 11:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.