Making changes to 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 redeploy it while the JIRA application is still running. Following is how we do it:
Keep the JIRA application running in the window where we executed
atlas-run
.Open a new command window and go to the root plugin folder where your
pom.xml
file resides.Run
atlas-cli
.Wait for the Waiting for commands message to appear.
Run the
pi
.pi
stands for plugin install and this will compile your changes, package the plugin JAR, and install it into theinstalled-plugins
folder.Note
As of JIRA 4.4, all the modules are reloadable and hence can be redeployed using this technique.
There's more…
It is also possible to run the plugin in debug mode and point your IDE's remote debugger to it.
Debugging in Eclipse
Following are the steps to debug your plugin in Eclipse:
Use
atlas-debug
instead ofatlas-run
.Once the virtual JIRA is up and running with your plugin deployed in it, go to Run | Debug Configurations in Eclipse.
Create a new remote Java application.
Give your application a name, keep the defaults, and give the port number as
5005
. This is the default debug port on which the virtual JIRA runs. That's it! Happy debugging!
See also
The Setting up the development environment recipe
The Creating a skeleton plugin recipe
The Using FastDev for plugin development recipe