Making changes and redeploying a plugin
Now that we have deployed the test plugin, it is time to add some proper logic, redeploy the plugin, and test it. Making the changes and redeploying a plugin is pretty easy. In this recipe, we will quickly look at how to do this.
How to do it...
You can make changes to the plugin and re-deploy it while the JIRA application is still running. Here is how we do it:
- Keep the JIRA application running in the window where we ran 
atlas-run. - Open a new command window and go to the root plugin folder where your 
pom.xmlresides. - Run 
atlas-cli. - Wait for the message - 
Waiting for commands.... - Run 
pi.pistands for plugin install and this will compile your changes, package the plugin JAR, and install it into theinstalled-pluginsfolder. 
As of JIRA 4.4, all the modules are reloadable and hence can be redeployed using this technique.
Debugging in Eclipse
It is also possible to run the plugin in debug mode and point to your IDE's remote debugger to it.
Following are the steps to do it in Eclipse:
- Use 
atlas-debuginstead ofatlas-run. - Once the virtual JIRA is up and running with tour plugin deployed in it, go to Run | Debug Configurations in Eclipse.
 - Create a new Remote Java Application.
 - Give a name, keep the defaults, and give the port number as 
5005. This is the default debug port on which the virtual JIRA runs. In case you would like to use a different port, it is possible to change the debug port by passing--jvm-debug-portargument toatlas-debug. - Happy debugging!
 
See also
- Setting up the development environment
 - Creating a skeleton plugin