페이지 트리
메타 데이터의 끝으로 건너뛰기
메타 데이터의 시작으로 이동

Current released version -- Atlassian Plugin SDK 3.4

Currently-supported applications: Confluence, JIRA, Bamboo, FishEye, Crucible and Crowd.

Atlassian Plugin SDK 3.4 is now available – see the release notes. If you have ideas for improvement or new features, or have found a bug, please raise a ticket on our issue tracker. Snapshot builds are also available for the stout-hearted.

We now have developer mailing lists for our products!

Sign up for Developer Updates to get release notifications for new versions, API changes, exclusive offers, and much more.

Download Latest Version (Windows)

Download Latest Version (Mac OS X, UNIX, Linux)

The Atlassian Plugin SDK includes Maven, a correctly-configured Maven settings.xml file, and a number of shell scripts to speed up and simplify plugin development. The scripts hide the complexities of Maven and provide the developer with less verbose commands, command-line help and auto-completion.

When running Maven commands against your project, make sure that you use the version of Maven bundled with the Atlassian Plugin SDK. This is important if you have a local version of Maven installed, as well as the Atlassian Plugin SDK. The simplest way is to use the atlas-mvn wrapper command instead of mvn. Another way is to put the bundled Maven on your path.

On this page:

Supported Atlassian Applications and Default Ports

The table below shows the applications currently supported by the Atlassian Plugin SDK, the minimum version of the application required, and the default port for each application.

Atlassian Application

Version

Default Port

Product Key

Caveats

Bamboo

2.3 +

6990

bamboo

 

Confluence

2.10 +

1990

confluence

 

Crowd

2.0.2 +

4990

crowd

 

Crucible

2.0.6 +

3990

fecru

 

FishEye

2.0.6 +

3990

fecru

 

JIRA

4.0 +

2990

jira

Plugins developed for versions of JIRA before 4.0 are supported, but using the SDK with versions of JIRA earlier than 4.0 is not. For developing plugins for JIRA 3.13 and earlier, take a look at the old JIRA PDK.

RefApp

1.0 +

5990

refapp

 

The SDK supports both static and dynamic plugins. The focus is on version 2 plugins, as supported by the Atlassian Plugin Framework.

Getting Started

Follow the setup guide to download and install the SDK.

Follow the step-by-step guide to create your first plugin. Alternatively, if you have an existing plugin, follow the conversion guide.

Shell Script Reference Guide

Click the links below to see the detailed descriptions of each shell script provided by the Atlassian Plugin SDK, along with the available parameters and some usage examples:

Getting Help

Help is at hand

Make sure you are not in the Maven command line interface (CLI) when you enter the help commands described below. If you are in the CLI, your command line will start with maven2>, and you will need to exit from the CLI first. Enter quit, exit or a friendly bye.

Getting an Overview of All the Scripts

Enter the following shell script to see an overview of all the scripts with a brief outline of their functionality:

atlas-help

Enter the following to see all possible help content:

atlas-help --verbose
Getting Help Text per Script

Each shell script provides help text if the first argument of the script is one of the following:

  • -?
  • -h
  • help
  • -help
  • --help

Examples:

atlas-clean help
atlas-cli -?
Reading the Reference Guide

See the detailed guide to all scripts.

Functional Overview and Examples

The Atlassian Plugin SDK provides a number of shell scripts wrapping the commands you will need to create, install and build your plugin.

The scripts are of the form:
atlas-xxx [--parameter-name parameter-value] [--parameter-name parameter-value]

  • Some scripts are purely Maven wrappers, and pass all parameters straight through to Maven.
  • Some scripts support interpreted parameters.
  • Some scripts have no parameters.

The details of all scripts are in the reference section.

In this section, we will look at some typical tasks and give examples of the SDK scripts you can use.

Creating a New Plugin from Scratch

Say you want to create a new Confluence plugin skeleton. Simply open a command window, go to the directory where you want to create the plugin and type:

atlas-create-confluence-plugin

Similarly, you would enter one of the following to create a plugin for JIRA, Bamboo or the RefApp:

atlas-create-jira-plugin
atlas-create-bamboo-plugin
atlas-create-refapp-plugin
Running a Plugin in an Application

Say you want to install and run your plugin in your host Atlassian application. Go to the plugin's project directory (where you created the plugin) and type:

atlas-run

Note that the above shell script will work for any host application, including Confluence, JIRA, etc. The script will determine the application, based on your plugin's specifications.

Specifying a Version of the Application

Say you want to run your plugin with Confluence 2.10.3. Go to the plugin's project directory (where you created the plugin) and type:

atlas-clean
atlas-run --version 2.10.3

Say you want to run your plugin with JIRA 4.0 snapshot. Go to the plugin's project directory (where you created the plugin) and type:

atlas-clean
atlas-run --version 4.0-SNAPSHOT

Note: Running atlas-clean will clear the previous version of the host application from your build output directory. You only need to do this if the previous application version was different from the one you need now.

Specifying an Application Server (Container)

Say you want to run your plugin with Confluence 2.10.3 and JBoss 4.2.x. Go to the plugin's project directory (where you created the plugin) and type:

atlas-run --version 2.10.3 --container jboss42x
Specifying a Version of SAL

Say you want to run that plugin but with Confluence 2.10.3 and SAL 2.0.5:

atlas-run --version 2.10.3 --sal-version 2.0.5
Running Integration Tests against a Different Application

Say you have a RefApp plugin but want to run your integration tests against Confluence:

atlas-integration-test --product confluence
Running your Plugin in Multiple Applications

Say you want to run that RefApp plugin in multiple applications simultaneously. In three separate tabs in your terminal (command window):

  • Type the following to run the plugin in the RefApp:
    atlas-run
    
  • Type the following to run the plugin in Confluence:
    atlas-run --product confluence --version 3.0-m9
    
  • Type the following to run the plugin in JIRA:
    atlas-run --product jira --version 4.0-SNAPSHOT
    
Using the Command Line Interface

The SDK bundles the Maven CLI plugin and pre-configures it properly with the pi and pu commands. To use it with your plugin's host application, go to the plugin's project directory (where you created the plugin) and type:

atlas-cli
Generating Test Data for Re-Use

Use the atlas-create-home-zip command to create a zip file of your application's home directory, and then load the contents of the home directory into the application every time you start it up.

For example, let's assume you want to prepopulate JIRA with a few projects and issues for testing on every clean startup. First, run JIRA using atlas-run and add your projects and issues. Stop JIRA, go to the project directory (where you created the plugin) and type:

atlas-create-home-zip

Copy the generated-test-resources.zip file to the test /src/test/resources/ directory. Then add the following element to the configuration of the maven-jira-plugin in your POM:

<productDataPath>${basedir}/src/test/resources/generated-test-resources.zip</productDataPath>

See atlas-create-home-zip.

Benefits of Using the Atlassian Plugin SDK

The Atlassian Plugin SDK makes your life easier by providing just one tool to help you do the following, no matter which Atlassian application your plugin is for:

  • Create a plugin skeleton from a Maven archetype, specific to the Atlassian application you are developing for.
  • Download the application binaries, install your plugin and start the application.
  • Dynamically re-install your plugin after changes during development. No restart required, not even for JIRA.
  • Write quality unit tests and integration tests.
  • Speed up the all-important code-deploy-test cycle.
  • Use the same commands for all Atlassian applications.

The SDK provides the above functionality by:

  • Shielding you from Maven complexity. With the Atlassian Plugin SDK, the days of fiddling with Atlassian parent POMs are over. You no longer have to hack the Atlassian Maven infrastructure into your existing one. You can compose Atlassian plugin development functionality into your existing Maven hierarchy. This makes it much easier to have a plugin as part of a multimodule project, for example.
  • Incorporating the Maven CLI plugin and PDK for rapid development.
  • Working with the Maven ITBlast plugin for multi-container integration tests.
  • Supplying the boiler-plate POM for bundling dependencies in META-INF/lib. (See Accessing Classes from Another Plugin.)
  • Using the OSGi Bundle Repository (OBR) to resolve plugin dependencies. OBR provides a way to install a number of plugins and their dependencies via a single zip file.
  • Automatically configuring the IDEA CLI plugin for rapid deployment.
  • Supporting debug mode, both remote and within your IDE.
  • Allowing easy upgrades to the latest version of the Atlassian Plugin SDK.

The SDK offers a set of well-defined goals that make it easy to do common development tasks. If you want to run the integration tests – and only the integration tests – you can say:
atlas-integration-test

Similarly, you can run the unit tests in isolation:
atlas-unit-test

You can also install your plugin from the command line, instead of having to browse to the correct page and make several clicks:
atlas-install-plugin
Or:
atlas-cli then pi

And so on. Refer to the details of all the available shell scripts.

RELATED TOPICS

Developing your Plugin using the Atlassian Plugin SDK

{children} 을 처리할 수 없습니다. 페이지를 찾을 수 없습니다: Welcome to the Atlassian Developer Network.
  • 레이블 없음