Last updated Apr 4, 2024

Modify the plugin using QuickReload

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.

Step 1. Check QuickReload is enabled in your pom

This procedure is for a Jira plugin, but it's the same for other Atlassian server and Data Center products.

  1. Open the pom.xml in your favourite text editor.

  2. 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.

  3. Open a Command Prompt window, and navigate to your myPlugin directory.

  4. Enter the atlas-run command and wait for Jira to start up.

  5. Log into Jira and confirm you can see the myItem menu, which does not have a dropdown menu when clicked.

Step 2. Make a change to your plugin while the product is running

  1. Open a second Command Prompt window and navigate to yourmyPlugin directory.

  2. Enter the command atlas-create-jira-plugin-module, and answer the prompts as follows:

    1
    2
    Choose 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
    
  3. Enter N when prompted to create another module.

  4. Run the command:

    1
    2
    atlas-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] ------------------------------------------------------------------------
    
  5. 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'
    
  6. Reload localhost:2990/jira in your browser window, and you'll see that your menu is now showing the changes you just made:
    Atlassian Developers Site menu item in JIRA 7.2.2

Need Help?

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.

Next step

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:

Additional resources

The following resources will allow you to learn more about some of the tasks we covered in this tutorial:

Rate this page: