So far you've discovered that you can create a plugin for Atlassian products and that you can make changes to that plugin, however starting and stopping the product can take several minutes each time. QuickReload significantly accelerates your plugin development loop by watching output directories for changes to P2 JAR files and uploading them into the running host application.
This procedure is for a Jira plugin, but it's the same for other Atlassian server and Data Center products.
Open the pom.xml
in your favourite text editor.
Search for the <build>
element, you should see something similar to this:
1 2<build> <plugins> <plugin> <groupId>com.atlassian.maven.plugins</groupId> <artifactId>jira-maven-plugin</artifactId> <version>${amps.version}</version> <extensions>true</extensions> <configuration> <productVersion>${jira.version}</productVersion> <productDataVersion>${jira.version}</productDataVersion> <enableQuickReload>true</enableQuickReload> ...
Confirm that <enableQuickReload>
is set to true
. If not, update your POM to match the example above, then save
your changes.
Open a Command Prompt window, and navigate to your myPlugin
directory.
Enter the atlas-run
command and wait for Jira to start up.
Log into Jira and confirm you can see the myItem menu, which does not have a dropdown menu when clicked.
Open a second Command Prompt window and navigate to yourmyPlugin
directory.
Enter the command atlas-create-jira-plugin-module
, and answer the prompts as follows:
1 2Choose a number (1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32 /33/34):25 Enter Plugin Module Name My Web Item: : Atlassian Developers Site Enter Section (e.g. system.admin/globalsettings): my-item-link/my-section Enter Link URL (e.g. /secure/CreateIssue!default.jspa): http://developer.atlassian.com/docs Show Advanced Setup? (Y/y/N/n) N: : N
Enter N when prompted to create another module.
Run the command:
1 2atlas-mvn package
and wait for your plugin JAR to build. When it's finished, you'll see:
1 2[INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 9.084 s [INFO] Finished at: 2016-08-22T17:09:56+10:00 [INFO] Final Memory: 32M/321M [INFO] ------------------------------------------------------------------------
Returning to the first command prompt window (the one in which you started Jira using the atlas-run
command),
you'll notice some log entries appearing. When the plugin has finished loading, you'll see:
1 2[INFO] [talledLocalContainer] Quick Reload Finished (1727 ms) - 'myPlugin-1.0.0-SNAPSHOT.jar'
Reload localhost:2990/jira in your browser window,
and you'll see that your menu is now showing the changes you just made:
The source code for this tutorial is available on Bitbucket at bitbucket.org/serverecosystem/myplugin. Alternatively, check out the Getting Started Tutorial FAQ
Still need help? Request support at the Developer Technical Support Portal.
If you'd like to keep learning about add-on development, you may want to try out the Confluence tutorial below:
Here are some other things you might like to do next:
The following resources will allow you to learn more about some of the tasks we covered in this tutorial:
Rate this page: