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.
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.xml
resides.Run
atlas-cli
.Wait for the message -
Waiting for commands...
.Run
pi
.pi
stands for plugin install and this will compile your changes, package the plugin JAR, and install it into theinstalled-plugins
folder.
As of JIRA 4.4, all the modules are reloadable and hence can be redeployed using this technique.
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-debug
instead 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-port
argument toatlas-debug
.Happy debugging!