Kazu's Log

Apr 25, 2016

How to write IntelliJ IDEA's Enterprise Plugin Repository XML

IntelliJ IDEA has a feature called “Enterprise Plugin Repository” that allows you to distribute plugins without uploading them to JetBrains’ Plugin Repository.

A repository needs a XML file to index plugins. The blog post and the DTD only explain <plugins> and <plugin>, but IDEA-88075 mentions that <plugin> can have <description>. Is that all?

RepositoryHelper and RepositoryContentHandler

Apparently RepositoryHelper.parsePluginList() is the class where IDEA loads the XML file. It uses SAX to process the XML file. RepositoryContentHandler has all SAX event handlers. According to the Javadoc comment. There are 2 XML schemas, and the handler can process both of them.

Supports both updates.xml and plugins.jetbrains.com formats.

Seems updates.xml is the format we saw, and plugins.jetbrains.com format is the format which is used by plugins.jetbrains.com/plugins/list/.

Elements you can use

<plugin> only has id, url and version as its attributes, but it can have the following elements:

  • idea-version
  • vendor
  • id (same as the id attribute)
  • name
  • description
  • version (same as the version attribute)
  • vendor
  • depends
  • change-notes
  • rating
  • downloadUrl or download-url (same as the url attribute)

Most of them just take a content of the element as is.