2
1
0

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

    CommentAdd your comment...

    1 answer

    1.  
      3
      2
      1

      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.

      CommentAdd your comment...