| Currently (11/07), the Atlassian Plugin Repository is only available in Confluence. |
How it Works
The plugin repository works by communicating with a server on the Atlassian network which returns an XML file containing information about all plugins that are compatible with a particular product and version. The Plugin Repository Client (which is itself a plugin) parses that XML file and displays the plugins in a table, from which administrators can download, install, enable, disable, and remove plugins.

So how does the plugin repository know about all the plugins? Through a series of XML metadata files which are committed to our SVN repository by the plugin authors. These metadata files follow a specific schema, and allow you to tell the plugin repository important information about your plugin: is it free or commercial? What's the current release? Which versions of Confluence is it known to work with. Where is the source kept? Where can users file bugs? You can even include release notes. The plugin repository can automatically construct a version history for your plugin.
Adding your plugin to the repository
Requirements
- Your plugin must be entirely self-contained: there must be no extra files or libraries to be installed beyond the plugin jar itself?
- Your plugin must be uploadable through the standard plugin installation methods. This means that your plugin will not need to be installed in WEB-INF/lib.
Step 1: Place your plugin JAR in a publicly accessible web location
Your plugin needs to be downloaded by the Confluence Repository Client, and as such it needs to be publicly accessible. Please note that the client can deal with basic authentication - which is useful for commercial plugins. In theory it should also deal with HTTPS, however that has not yet been tested.
Step 2: Check out the existing Repository Metadata
You will need the following:
- A Subversion account for svn.atlassian.com - you may need to speak to Jonathan Nolen
- A Subversion client
- An editor capable of dealing with xml (preferably one that validates against a schema - otherwise, you can use a web validator instead)
Once you are setup, check out the plugin metadata
svn checkout https://svn.atlassian.com/svn/public/contrib/repository/atlassian-plugin-repository/trunk/metadata.v2.confluence/ repository-metadata
You should end up with a repository-metadata directory containing all the current metadata. The files you are interested in are *-metadata.xml and repository.xml.
Step 3: Add your plugin to the repository
Create your file with the name plugin.key-metadata.xml, where plugin.key is your plugin key from your atlassian-plugin.xml file. For example, com.atlassian.confluence.plugins.socialbookmarking-metadata.xml. This is just a convention, but it helps if everyone sticks to it.
Copy the metadata in from another plugin and modify the xml to suit your plugin. Not everything is required, some node values have preset values, and correct element order is essential! See the schema documentation - or try to read the schema file listed in the metadata at the top; it's not as complex as it sounds!
Step 4: Validate your metadata file
I cannot stress this enough: validate your xml against the schema. If your plugin's metadata does not successfully validate, you will not be able to commit your file!
The easiest way is to use an editor (like IntelliJ IDEA) that validates inline, however you can always use the online XML Schema validator. The output of the online validator isn't pretty - but it does the job.
If you check in broken metadata, you will kill the repository dead - no further updates to the repository will be possible until the issue is fixed.
Step 5: Check-in your metadata file
Once you are happy with your metadata, check it back in:
svn -m "adding plugin x.y.z to the repository" commit

Is there a delay between committing the metadata and the plugin appearing to be available for clients?