Wednesday, January 26, 2011

java: Jira Plug-in for Confluence


This is a plug-in for Confluence wiki to pull Jira defects to generate product release notes. We are using Jira to track defects, features and documentation on products.
This plug-in uses Jira's Issue Navigator xml link to pull defects pertaining to a particular release. Once the defects are retrieved, the xml is parsed through a home grown XSLT template to group issues, transform links and format output. The resulting html is processed through ScrollWiki plug-in to convert to a pdf file that can be included in the product release.
We are using a generic user credentials to fetch records from Jira. This user has read permission on all projects and the password is stored in a secured password keeper.


The hard part was setting up the environment. Even though the documentation is clear on how to setup the project, it took a good amount of time to setup the project and dependencies for the confluence version that we are running.

If you are using NetBeans to develop the plug-in, you need to manually edit the build file to include the plug-in xml file to jar. I started with IntelliJIDEA template to develop and build plug-ins and later switched to NetBeans.

download code

-paul

Thursday, January 20, 2011

aspnet: Add Plug-in Capability to a web application

Adding plug-in capability to a web application is not something you will need for every applications. If you want to hook up to a web application for specific events (eg a defect is created in the defect tracking system) and you don't have or want to mess with the original application, plug-ins are a great way to handle these situations. In order to support plug-in, you need to define your plug-in interfaces, base classes, abstract classes and event model.

Once you have these setup in your main application, you can write the plug-ins based on the interfaces and base classes. Your main application will invoke events and based on what events you are subscribed to, your plug-in class will be called. An object with current state will be passed to your class as the event args.


During the application start-up, check for any plug-in files in the configuration file and cache an instance of all plug-ins in an application variable. On all defined events, loop through this array and call the appropriate method to invoke the plug-in method.


download code

-paul