Getting Quick Reload working on a standalone system

Jeff Turner June 16, 2016

When developing a plugin, sometimes one really needs to connect to an existing JIRA/Confluence – for instance, to test with real data. In the past that could be done with atlas-cli thusly:

ATLAS_OPTS="-Dusername=jturner -Dpassword=$WIKIPASS" atlas-cli --server wiki.redradishtech.com -p 80 --context-path / --cli-port 4330

But nowadays atlas-cli emits a scary warning:

[WARNING] >>>  WARNING: atlas-cli and fastdev are DEPRECATED in favour of QuickReload  <<<
[WARNING] 
[WARNING] >>>  WARNING: Support for atlas-cli and fastdev will be completely removed in the next AMPS version.  <<<

This leads to my question: how does one get Quick Reload working in an existing instance? Brad's doc on QuickReload is fun but entirely unhelpful, as it assumes plugin development always takes place by running atlas-run or atlas-debug within the plugin root directory.

2 answers

1 accepted

10 votes
Answer accepted
Jeff Turner June 16, 2016

After a day's researching..

  1. In your product, go to Manage add-ons, click 'All add-ons' and verify that the 'Confluence Quick Reload Plugin' (com.atlassian.confluence.plugins.quickreload) or 'JIRA Quick Reload Plugin' or equivalent is present. This plugin is pre-installed, product-specific, and not sufficient on its own.  

  2. Install the com.atlassian.labs.plugins.quickreload.reloader plugin manually:

    1. First, find the correct version (the latest bleeding-edge didn't work for me). View the source for the latest AmpsDefaults.java, and note the QUICK_RELOAD version number:

      public static final String DEFAULT_QUICK_RELOAD_VERSION = "1.24.1";

       This tells you what quickreload version would be deployed by atlas-run and friends.

    2. Go to https://maven.atlassian.com/content/repositories/atlassian-public/com/atlassian/labs/plugins/quickreload/, click the right version ('1.24.1' in this example), and copy the jar URL.

    3. In your Atlassian product, go to Manage add-ons. Click 'Upload add-on' and paste the jar link. For me it was https://maven.atlassian.com/content/repositories/atlassian-public/com/atlassian/labs/plugins/quickreload/1.24.1/quickreload-1.24.1.jar
    4. Verify the plugin is installed and enabled.
    5. Append /rest/qr/1.0/tracked to your app URL, and verify you get JSON output starting with:

      {"directories":[],"api":{"self":{"url":"https://www.redradishtech.com/rest/qr/1.0/tracked","method":"GET"},"api":
      ....
  3. Tell the Quick Reload plugin to monitor a particular directory (note that "directories" in the JSON above is [] aka. empty). As per the docs, this can be done via quickreload.properties file, or -Dquickreload.tracked=... properties in your bin/setenv.sh, but I find it easiest to do via a POST call to $BASEURL/rest/qr/1.0/tracked/$DIRECTORY. For instance:

    curl -H 'X-Atlassian-Token: nocheck' -X POST 'http://wiki.redradishtech.com/rest/qr/1.0/tracked/home/jturner/src/bitbucket.org/redradishtech/testplugin/target'

    To remove a path, change -X POST to -X DELETE.

By examining /rest/qr/1.0/api, you'll note the plugin allows unauthenticated installing, enabling and disabling of plugins, so should only be installed in a trusted development environment.

Jeff Turner June 16, 2016

Also, IMO atlas-cli is fundamentally a different beast to Quick Reload, and should not be deprecated. I've filed this at https://ecosystem.atlassian.net/browse/AMPS-1350

Steven F Behnke
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 16, 2016

I am under the impression that JAVA 8 has irreversibly broken fast dev and the other old tools. Attempts to fix them weren't promising so Quick Reload was developed to replace them.

Felix Grund (Scandio)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 20, 2017

Hi Jeff! Thanks you for this! I haven't switched to QuickReload up to now because I've always preferred to install my plugins on standalone systems. I have different CLI configurations configured as aliases for different servers. Can you tell me what the current status of your approach is? Is this answer still up-to-date? Felix

Shirley He November 6, 2017

Hi Jeff,

I've followed all the steps up to step 3 where I need to tell quickreload which directory to monitor. I was wondering where to put the quickreload.properties file? Is there anyway to hook quickreload up to an existing Jira instance without having to shut Jira down?

Thanks!

(If anybody else has a solution, the input would be greatly appreciated)

Francesco R
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 2, 2021

Thank you very much
This is the only way to have quickreload working on a Windows system. On Linux there are no problems: it's enough to specify the -Dquickreload.tracked option but on Windows till now I wasn't able to have it working.
With the -Dquickreload.tracked option, the tracked directory is shown in the output of /rest/qr/1.0/tracked but the path is modified and maybe it's the reason because it's not working.
I write -Dquickreload.tracked=D:\\my_devel_path\\my_plugin\\target and in reply to the /rest/qr/1.0/tracked I see \\\\my_devel_path\\my_plugin\\target while, setting the path with the curl command, it appears unmodified, with the leading D:\\ drive notation, exactly as i sent it into the command i.e. /rest/qr/1.0/tracked/D:\\my_devel_path\\my_plugin\\target
Maybe should I write them differently after the -Dquickreload.tracked option ?
I'm using quickreload 1.24.1

0 votes
Martin Bayer _MoroSystems_ s_r_o__
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 25, 2016

I have a problem with resources loading on simple page refresh.

I have a standalone JIRA running and as @Jeff Turner suggests, I added target folder of my plugin to tracked folders using curl -H 'X-Atlassian-Token: nocheck' -X POST 'http://localhost:2990/jira/rest/qr/1.0/tracked//home/martin/jira-project/target'. 

It works fine, when I package the project using 'mvn package', new version of plugin is succesfully installed and can be used immediatelly. But how should I do it to use my CSS and JS resources from project's  resources folder instead of using resources bundled to JAR file? Is it possible? Do you have any idea how to do it?

I already tried to do:

curl -H 'X-Atlassian-Token: nocheck' -X POST 'http://localhost:2990/jira/rest/qr/1.0/tracked//home/martin/jira-project/src/main/resources/js' but it didn't help

Thank you very much for any advice...

Brendan Patterson August 16, 2018

I have the same question.

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 17, 2018

Hi @Brendan Patterson,

We have a separate community for questions related to developing for Atlassian products. I would recommend re-raising your question there:

Thank you!

Regards,

Shannon

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events