Excerpt |
---|
JIRA includes a plugin system that enables developers to write plugins which enhance JIRA's functionality in various ways. |
On this page:
Table of Contents |
---|
A JIRA 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 portlet) 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:
Code Block | ||||
---|---|---|---|---|
| ||||
<!-- 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 --> <plugin-info> <description>This is a brief textual description of the plugin</description> <!-- the version of the plugin --> <version>1.1</version> <!-- details of the plugin vendor --> <vendor name="Atlassian Software Systems Pty Ltd" url="http://www.atlassian.com"/> </plugin-info> . . . 1 or more plugin modules . . . </atlassian-plugin> |
Each plugin has a plugin key which is unique among all plugins (eg "com.atlassian.plugin.sample"). Semantically this equates to the package of a Java class. 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.
Each plugin is either of type "Plugins1" or "Plugins2". For details, please see Differences between Plugins1 and Plugins2.
The following types of plugin modules are supported by JIRA
Module Type | Since version... | Documentation | Description |
---|---|---|---|
portlet | 3.0 | Add new portlets to JIRA. Deprecated - please use Gadgets | |
gadget | 4.0 | Add a "Gadget" (portlet) to JIRA's dashboard | |
report | 3.0 | Add new reports to JIRA | |
customfield-type | 3.0 | Add new types of fields to JIRA | |
customfield-searcher | 3.0 | Add new types of field searchers to JIRA | |
project-tabpanel | 3.0 | Add new tabs to the Browse 'Project' screen | |
component-tabpanel | 3.10 | Add new tabs to the Browse 'Component' screen | |
version-tabpanel | 3.10 | Add new tabs to the Browse 'Version' screen | |
issue-tab panel | 3.0 | Add new tabs to the View Issue screen | |
issue-operation | 3.4 | Add new operations to the View Issue screen | |
resource | 3.5 | Downloadable resources from within any plugin | |
web-resource | 3.7 | Downloadable resources from within any plugin | |
servlet | 3.5 | A standard Java servlet deployed within a JIRA plugin | |
servlet-context-listener | 4.0 | Deploy Java Servlet context listeners as a part of your plugin | |
servlet-context-param | 4.0 | Set parameters in the Java Servlet context shared by your plugin's servlets, filters, and listeners | |
servlet-filter | 4.0 | Deploy Java Servlet filters as a part of your plugin | |
webwork | 3.1 | XWork/Webwork actions and views bundled with a plugin, enabling user interaction | |
component | 3.0 | Adds components to JIRA's component system | |
component-import | 4.0 | Accesses Java components shared by other plugins | |
module-type | 4.0 | Dynamically adds new plugin module types to the plugin framework | |
rest | 4.0 | Exposes services and data entities as REST APIs | |
rpc-soap | 3.0 | Deploys a SOAP service within JIRA | |
rpc-xmlrpc | 3.0 | Deploys an XML-RPC service within JIRA | |
jqlfunction | 4.0 | Adds a new function to JIRA's Advanced Search (JQL) | |
search-request-view | 3.7 | Add a new view in the Issue Navigator | |
user-format | 3.13 | Implements custom behaviours for user details. | |
workflow-condition | 3.0 | Add new conditions to the JIRA workflow | |
workflow-validator | 3.0 | Add new validations to the JIRA workflow | |
workflow-function | 3.0 | Add new post functions to the JIRA workflow | |
web-item | 3.7 | Add new links into the JIRA web interface | |
web-section | 3.7 | Add new tabs/sections into the JIRA web interface |
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.
Please refer to How to Build an Atlassian Plugin using the Atlassian Plugin SDK to set up your development environment and create a plugin template.
Please see Managing JIRA's plugins for instructions on how to deploy a JIRA plugin.