Rate this page:
The Atlassian Plugin SDK is built on top of the Atlassian Maven Plugin Suite (AMPS). AMPS extends the Maven 2 build environment specifically for developing Atlassian plugins. When you create a project with the Atlassian Plugin SDK, AMPS is automatically configured as the build environment for your project.
This page provides more information about AMPS. You won't normally need to use AMPS directly, since the Atlassian Plugin SDK wraps AMPS commands with its own script-style commands. However, in some cases you may wish to invoke AMPS commands directly or specify configuration settings for AMPS, which you can do in the project POM.
For information on configuring AMPS settings see AMPS Build Configuration Reference.
AMPS provides a set of plugins for Maven 2. AMPS combines multiple plugins, conventions, and POM configuration.
Diagram: AMPS architecture:
The application-specific configuration is as follows:
AMPS Plugin Type
The commands are of the form , where:
In the table below, replace with the name of Atlassian application you are developing your plugin for. Fisheye and Crucible use the same plugin, so should be replaced with if you are developing for Fisheye or Crucible.
Create a plugin skeleton from a Maven archetype, specific to the Atlassian application you are developing for.
Download the application binaries (if not already downloaded), install your plugin, start the application with the container (application server) of your choice and your deployed plugin.
Start the application with the container of your choice and your deployed plugin, with remote debugging enabled.
Start the application with the container of your choice, and run all integration tests, then shut the application down.
Run the unit tests, excluding .
Runs Maven in its interactive command line mode
Creates a zip of the current application's data which can be used in future runs of the SDK.
Copy all runtime and compile-scoped dependencies into .
Install your plugin (via the PDK).
Uninstall your plugin (via the PDK).
This section describes how to run the following commands:
Say you want to create a new Confluence plugin skeleton. Simply go to the directory where you want to create the plugin and type:
Say you wanted to run an arbitrary plugin in Confluence. Simply go to the plugin's project directory and type:
Say you wanted to run your plugin with Confluence 3.4:
mvn confluence:run -Dproduct.version=3.4
Say you want to run your plugin with JIRA 4.2:
mvn jira:run -Dproduct.version=4.2
Say you wanted to run that plugin but with Confluence 3.4 and Tomcat 7:
mvn confluence:run -Dproduct.version=3.4 -Dcontainer=tomcat7x
Say you wanted to run that plugin in debug mode from your IDE. Set up a configuration in IDEA that executes from the project directory:
mvn confluence:run -Dcontainer=jetty6x
Say you wanted to write a new plugin for Confluence, with integration tests, but wanted minimal POM XML and you do not want to have to extend any other POM:
1 2 3 4 5 6 7
<packaging>confluence-plugin</packaging> ... <plugin> <groupId>com.atlassian.maven.plugins</groupId> <artifactId>maven-confluence-plugin</artifactId> <extensions>true</extensions> </plugin>
Say you had a Refapp plugin but wanted to run your integration tests against Confluence:
mvn package confluence:integration-test
Say you want to run the plugin in multiple applications simultaneously. In three separate tabs in your terminal (command window), type:
1 2 3 4 5
mvn refapp:run mvn confluence:run -Dproduct.version=3.4 mvn jira:run -Dproduct.version=4.2
You can now test your plugin on three applications side by side in your browser. This also means you can upgrade your plugin simultaneously:
mvn package confluence:install refapp:install
The CLI command, a feature of the bundled Maven CLI plugin, allows you to work with Maven through an interactive command line.
In this mode, Maven remains in a running state, so that you can enter commands interactively. This saves time for JVM startups between running commands.
To put Maven into CLI mode, run this command from the project home directory:
After a few moments, the CLI prompt appears:
1 2 3 4 5 6
... [INFO] [confluence:cli] [INFO] [cli:execute] [INFO] Opening port 4330 for socket cli access [INFO] Waiting for commands... maven2>
From there, you can enter Maven commands as usual. For a list of available commands, enter at the prompt.
The short form of the or command will use the latest version of the AMPS plugins. If you want to get a specific version of an AMPS command, use the longer form of the command. For example:
Rate this page: