JIRA Plugins2 overview

Developers can write plugins to enhance JIRA functionality in various ways. This page introduces JIRA "Plugins2" plugins.

For an overview of the add-on frameworks, i.e. Plugins2 and Atlassian Connect, see Building JIRA add-ons.

On this page:

About JIRA Plugins2 plugins

A JIRA Plugins2 plugin is a single JAR containing code, a plugin descriptor (XML) and usually some Velocity template files to render HTML.

The plugin descriptor is the only mandatory part of the plugin. It must be called atlassian-plugin.xml and be located in the root of your JAR file.

Each plugin consists of one or more plugin modules. These are of different types (for example a report, or a gadget) and each has an individual XML element describing it. Each module is described below together with the XML element required for it.

Here is a sample of the descriptor with highlighted elements:

<!-- the plugin key must be unique, think of it as the 'package' of the plugin -->
<atlassian-plugin key="com.atlassian.plugin.sample" name="Sample Plugin" plugins-version="2">
    <!-- a short block describing the plugin itself -->
        <description>This is a brief textual description of the plugin</description>
        <!-- the version of the plugin -->
        <!-- details of the plugin vendor -->
        <vendor name="Atlassian Software Systems Pty Ltd" url="http://www.atlassian.com"/>

    . . . 1 or more plugin modules . . .

Each plugin has a plugin key which is unique among all plugins (eg. "com.atlassian.plugin.sample"). Typically the root package name of the primary Java class is used. Each module within the plugin also has a module key which is unique within the plugin (eg. "myreport"). Semantically this equates to the class name of a Java class.

The plugin key + module key are combined to make the complete key of the plugin module (combining the examples above, the complete key would be "com.atlassian.plugin.sample:myreport"). Note: a : is used to separate the plugin key from the module key.

JIRA Plugin Module Types

You can view the plugin modules (Plugins2) are supported by JIRA on this page: JIRA Plugin Module Types.

Built-in JIRA system plugins

A number of functions and areas within JIRA 3 are shipped as built in plugins. These can also be useful for plugin developers who want to know more about how to create their own plugins, as they showcase the functionality that can be built.

The system plugins are referenced from the following files (located in /WEB-INF/classes:

  • system-workflow-plugin.xml - the built in workflow conditions, validators and functions.
  • system-customfieldtypes-plugin.xml - the built in custom field types.
  • system-project-plugin.xml - the built in project tab panels (ie roadmap, change log and popular issues).
  • system-reports-plugin.xml - the built in system reports (ie time tracking and developer workload reports).
  • system-portlets-plugin.xml - all of the built in system portlets.

and in other system-*-plugin.xml files in that directory. The plugin modules are all defined in JIRA in JiraModuleDescriptorFactory.java.

JIRA plugin lifecycle

Once you start building your own plugins, it is likely that you'll need to call on JIRA code to accomplish certain tasks; for example, to retrieve a list of users, make workflow changes or add new data to issues. We've compiled some resources about how JIRA works to help you know how to access that functionality.

See JIRA Plugin Lifecycle for more information on the JIRA environment from a plugin's perspective.

PicoContainer and Dependency Injection

JIRA uses PicoContainer to manage object creation throughout the system. It is important to understand how dependency injection works before trying to call JIRA functionality from your plugin. See the brief introduction to PicoContainer and JIRA.

Was this page helpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport