JIRA Plugins2 overview
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:
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
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
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.