Total Pageviews

Friday, April 01, 2011

Integrating Eclipse, Subversion, and JIRA Studio on a Mac

Another one for my fellow fully integrated development environment junkies. Continuing on with the mantra, "My tools should work for me, not the other way around," this post will discuss how to integrate Subversion and JIRA Studio into Eclipse 3.6 Helios in order to facilitate development and streamline workflow. This was done on a Mac running OS X version 10.6.7.

Some background, JIRA Studio is the hosted version of the JIRA issue tracking and project management suite. Of all the issue tracking tools I've used (Bugzilla, Trac, Redmine, and others), JIRA handily surpasses them all. The Studio instance also integrates many of Atlassian's other products into one integrated suite that is beyond sweet (no pun intended).

Alright, let's get on to it!

Installing/Updating Eclipse

Download the latest eclipse installation per your requirements.  I installed the OS X 64-Bit Java EE version which can be found here:
Save the file and move to wherever you want to extract it (/Applications/eclipse/ is not a bad idea).
  • gunzip <eclipse-version.tar.gz>
  • tar -xvf <eclipse-version.tar>
These commands will extract the contents into a folder likely named eclipse. I suggest renaming that folder to be representative of the installation.
  • mv eclipse eclipse-jee-helios-64
Launch Eclipse and select a workspace.

If you were using an older version of Eclipse, most of your workspace configurations are contained within the workspace and will be carried over. You will, however, need to re-download any plugins. Most plugins would need to be updated anyway due to the new version of Eclipse. Do this by going to "Help" on the main Eclipse menu bar and selecting "Eclipse Marketplace" or "Install New Software". With the latter, you will need to add update sites manually.

Installing JavaHL 
(Required for Subclipse)

In order for Subclipse to work, it requires JavaHL (Java bindings to Subversion) to be installed. Visit for more background. I've come across two ways to realize this step:
  1. Via MacPorts
  2. Via CollabNet
The former avoids the off putting user registration/verification step required by the latter. But if the target system does not already have MacPorts installed, then a rather involved process will follow if using option 1.  Otherwise, if MacPorts is already installed, option 1 is likely the better alternative with regards to keeping the target system updated and current.

Via Option 1:
However, the JavaHL Subclipse Wiki Entry does indicate that using MacPorts may result in a loading error from Subclipse if the target system is utilizing the native 64-bit JVM provided on Snow Leopard. The wiki claims this is due to MacPorts compiling the JavaHL packages as 32-bit binaries.  Option 2 includes binaries for both 32-bit and 64-bit architectures and thus circumvents this issue.

Via Option 2:

Note that after installation, we will augment the path such that this new Subversion installation is the one first found by any callers.  In other words, the native Subversion binaries of OS X will still remain, just frog jumped.
  1. Go to
  2. If don't already have an account, you will have to create one (it's free).
  3. Download the Universal Subversion binaries for your version of OS X.
  4. Double-click on the .dmg file.
  5. Double-click on the package that appears and follow instructions to complete installation (not different from typical installation procedures of .dmg distributions).
  6. Issue the following command in a terminal window to frog jump these binaries in front of the native OS X Subversion installation:
    • export PATH=/opt/subversion/bin:$PATH
Both of the following items can be installed via the Eclipse Marketplace.  However, you have less control over the version you want to install.  So, the following the descriptions utilize the non-marketplace method.  This involves adding a plugin's "update site" to your Eclipse installation.

Installing Subclipse

It is TREMENDOUSLY important that you install the version of Subclipse matching your version of Subversion.  In addition, if you plan on utilizing multiple Subversion tools to interact with your local copy of the repository, all should be using the same version.

The Subclipse update sites can be found on the Tigris site.  I've listed a couple here for your convenience:
  •   Subversion 1.6.x
  •   Subversion 1.5.x

Add the update site to Eclipse:
  1. Click on "Help" on the main Eclipse menu bar
  2. Select "Install New Software"
  3. Click on the "Add" button on the top right of the dialogue window
  4. Enter an optional name like "Subclipse 1.6.x" and enter the 1.6.x update site (listed above) in the "location" text field
  5. Click "Ok"
  6. Now select the update site from the menu and click on next.
You will see several items appear with check boxes to select software.

You can select everything, or just the items you need.  Make sure that anything labeled "required" is checked.  Items having a dimmed connector icon are already installed and need not be checked.
  1. Click next and keep on following the instructions and accepting the license agreements
  2. After installation completes, opt to restart Eclipse
Check that Subclipse operates with JavaHL: 
  1. Go to "Eclipse > Preferences..."
  2. Expand "Team"
  3. Click on "SVN"
If there is no error from clicking on "SVN", then aside from your personal preferences the installation and configuration should be complete.

Installing the Atlassian Eclipse Connector

The following are the connector's update sites:
Use the link below if you want the connector that still includes Crucible and Fisheye support (works for both Eclipse 3.5 and 3.6):
Follow the same procedure as outlined in "Installing Subclipse" to get the Atlassian Eclipse Connector plugin installed. Again, opt to restart Eclipse after installation.

Connect Atlassian Eclipse Connector to JIRA
  1. Launch Eclipse
  2. If you have the default workbench layout in Eclipse, then a "Task" panel should appear in the upper left
  3. Clicking on the new task icon on this panel will bring up the following menu:
  4. Click on add repository; the following dialogue should appear:
  5. Select JIRA
  6. Augment options if desired
  7. Verify the configuration
Once the repository is all set, you'll need to add queries to get your tasks to appear in the task window. Using the same steps we walked through to reach the "Add Repository" selection, we can reach the "New Query" selection. The rest should be self-explanatory.

Hope this helps!