Getting Quick Reload working on a standalone system

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

This widget could not be displayed.

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.

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 Behnke Community Champion Jun 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.

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

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)

This widget could not be displayed.

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

I have the same question.

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
Community showcase
Posted Thursday in United States

Local Atlassian Research Workshop opportunity on Sep. 28th

We're looking for participants for another workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sh...

46 views 0 0
View post

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you