How to intercept plugin upgrade?

Pankaj Jangid
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 16, 2011

I want to run some code before upgrade. Is there a way to intercept plugin upgrade, run custom code and then resume upgrade.

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
Dheeraj Kumar Aggarwal October 17, 2011

JIRA converts components into spring beans internally.

Create a Component Plugin module that implements InitializingBean and DisposableBean. When the plugin will be installed/enabled/upgraded then afterPropertiesSet method will be invoked and when plugin will be disabled/uninstalled then the destroy method will be invoked.

So, If you are upgrading a new plugin then afterPropertiesSet method will be invoked on new plugin and destroy will be invoked on old plugin.

Pankaj Jangid
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 17, 2011

Thanks a lot @Dheeraj

TAGS
AUG Leaders

Atlassian Community Events