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

How to reload a plugin, after commandline deployment

Angelo Hannes September 1, 2015

I'm currently developing a JIRA plugin. After my changes I tried to deploy it to a test instance of JIRA I'm running on localhost.

I tried the following commands:

atlas-compile
atlas-package
atlas-install-plugin

And I also tried the following commands:

atlas-cli
pi

Both seem to work correctly. However the changes are only active after I restart the server. How can reload the plugin after deployment?

 

Thats the log I see in JIRA

[INFO] [talledLocalContainer] Sep 03, 2015 12:55:50 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
[INFO] [talledLocalContainer] Information: Initiating Jersey application, version 'Jersey: 1.8-atlassian-15 06/27/2014 08:32 AM'
[INFO] [talledLocalContainer] 2015-09-03 12:55:51,033 UpmAsynchronousTaskManager:thread-1 INFO admin 775x4494x1 1ag9vem 127.0.0.1 /rest/plugins/1.0/ [atlassian.plugin.loaders.ScanningPluginLoader] No plugins found to be installed
[INFO] [talledLocalContainer] 2015-09-03 12:55:51,033 UpmAsynchronousTaskManager:thread-1 INFO admin 775x4494x1 1ag9vem 127.0.0.1 /rest/plugins/1.0/ [atlassian.plugin.manager.PluginEnabler] Resolving 0 plugins
[INFO] [talledLocalContainer] 2015-09-03 12:55:51,033 UpmAsynchronousTaskManager:thread-1 INFO admin 775x4494x1 1ag9vem 127.0.0.1 /rest/plugins/1.0/ [atlassian.plugin.manager.PluginEnabler] Enabling 0 plugins: []
[INFO] [talledLocalContainer] 2015-09-03 12:55:51,141 UpmAsynchronousTaskManager:thread-1 INFO admin 775x4494x1 1ag9vem 127.0.0.1 /rest/plugins/1.0/ [atlassian.plugin.manager.DefaultPluginManager] Found dependent enabled plugins for uninstalled plugin 'com.example.MyPlugin': [].  Disabling...
[INFO] [talledLocalContainer] 2015-09-03 12:55:51,142 UpmAsynchronousTaskManager:thread-1 INFO admin 775x4494x1 1ag9vem 127.0.0.1 /rest/plugins/1.0/ [atlassian.plugin.manager.DefaultPluginManager] Updating plugin 'com.example.MyPlugin' from version '2.0-SNAPSHOT-BUILD002' to version '2.0-SNAPSHOT-BUILD002'
[INFO] [talledLocalContainer] 2015-09-03 12:55:51,144 UpmAsynchronousTaskManager:thread-1 INFO admin 775x4494x1 1ag9vem 127.0.0.1 /rest/plugins/1.0/ [atlassian.plugin.manager.DefaultPluginManager] Disabling com.example.MyPlugin
[INFO] [talledLocalContainer] 2015-09-03 12:55:51,191 UpmAsynchronousTaskManager:thread-1 INFO admin 775x4494x1 1ag9vem 127.0.0.1 /rest/plugins/1.0/ [atlassian.plugin.loaders.ScanningPluginLoader] Removed plugin com.example.MyPlugin
[INFO] [talledLocalContainer] 2015-09-03 12:55:51,217 UpmAsynchronousTaskManager:thread-1 INFO admin 775x4494x1 1ag9vem 127.0.0.1 /rest/plugins/1.0/ [atlassian.plugin.manager.PluginEnabler] Resolving 1 plugins
[INFO] [talledLocalContainer] 2015-09-03 12:55:51,217 UpmAsynchronousTaskManager:thread-1 INFO admin 775x4494x1 1ag9vem 127.0.0.1 /rest/plugins/1.0/ [atlassian.plugin.manager.PluginEnabler] Enabling 1 plugins: [com.example.MyPlugin]
[INFO] [talledLocalContainer] 2015-09-03 12:55:51,239 UpmAsynchronousTaskManager:thread-1 INFO admin 775x4494x1 1ag9vem 127.0.0.1 /rest/plugins/1.0/ [atlassian.plugin.manager.PluginEnabler] Plugin 'com.example.MyPlugin' immediately ENABLED

It also seems that the correct jar is placed in jira\home\plugins\installed-plugins

Is it possible that the ClassLoader simply doesn't reload the class?

 

I just tried to upload the updated jar via the web interface. Same behavior. The changes are only effective after restarting JIRA.

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Midori
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.
September 2, 2015

That should work. In other words> there should be nothing else done for the changes to be picked up.

Check your JIRA log! Make sure that there isn't any exception logged when uploading plugin. Sometime CLI thinks that it was successful, but JIRA may throw a ClassNotFoundException or such.

Angelo Hannes September 3, 2015

I added the log I see in the JIRA console

0 votes
Deniz Oğuz
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.
September 1, 2015

Do you have more than one server open? If so, you may be deploying to wrong server without knowing. Please check running java processes using the task manager or using "ps -ef|grep java".

Angelo Hannes September 1, 2015

No I do not have more than one server open. I definitely deploy to the correct server.

TAGS
AUG Leaders

Atlassian Community Events