Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Reload plugin using QuickReload

fjodors
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.
February 24, 2016

Hello

I am unable to reload plugin using QuickReload.

I created adminUI plugin and I would like to update it without JIRA SDK restart. But from QuickReload tutorial I can't understand how can I configure QuickReload option.

Is there any another step-by-step guide?

 

Since FastDev and atlas-cli have been deprecated, I should use QuickReload like described here https://developer.atlassian.com/docs/developer-tools/automatic-plugin-reinstallation-with-quickreload

 

What should I do to reload adminui plugin (e.g. I 'd like to change organization name)?

 

1) I created quickreload.properties file in adminui folder

# Add directories to this file, one on each line, and the quick reload support will monitor them
    # and automatically load them as soon as they are compiled and assembled.
    #
    # You can use -Dquickreload.dirs=dir1,dir2,dir3 on the JVM command line to also specify directories
    # to monitor.
    -Dquickreload.tracked=C:/atlastutorial/adminUI,C:/atlastutorial/adminUI/src,C:/atlastutorial/adminUI/src/main/resources
    
    
    #
    # relative path to plugin
    #some/path/test-plugin
    # absolute path to plugin
    C:/atlastutorial/adminUI

 

2) pom.xml file contains following rows:

<plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-refapp-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <productVersion>${refapp.version}</productVersion>
                    <enableQuickReload>true</enableQuickReload>
                    <enableFastdev>false</enableFastdev>
                    
                    <pluginArtifact>
                        <groupId>com.atlassian.labs.plugins</groupId>
                        <artifactId>quickreload</artifactId>
                        <version>${quick.reload.version}</version>
                    </pluginArtifact>

 

3) JIRA SDK URL http://localhost:2990/jira/plugins/servlet/qr returns following parameters:

The following directories are being tracked for changes:

  • C:\atlastutorial\adminUI\target

The system property "plugin.resource.directories" is set to track the following plugin resource directories:

  • C:\atlastutorial\adminUI\src\main\resources

 

I don't understand what is the next step to make this functional working.

 

Thank you in advance,

Fyodor

 

 

 

 

 

 

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Answer accepted
FlorinM
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.
March 1, 2016

You just need to build your plugin using mvn package from the command line. QuickReload works by watching the target folder for jar files. When it sees the jar files changing (like when the project is built by maven), it picks them up and installs them.

Note: Changes to resource files (js, css, soy, etc) are easier to deal with and changes will be reflected on page reload without the need to reinstall the plugin.

HTH

Vladimir Vasic
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.
March 23, 2016

Can you please provide sample pom.xml which will enable changes to resource files (js, css,..) to take effect without reloading plugin and clearing browser cache?

FlorinM
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 4, 2016

You shouldn't need to do anything special about it. I guess your resources are in src/main/resources which is already tracked. See <JIRA_URL>/plugins/servlet/qr -> tracked resource directories. The trick here is to make sure you have batching turned off, otherwise instead of serving the updated files when you make changes, it will serve stale versions that were batched in a single file. 

TAGS
AUG Leaders

Atlassian Community Events