Using Assembla’s Trac with Eclipse Mylyn XML-RPC access

I recently found out about Assembla, an awesome service for managing software development projects. It provides free SVN hosting (like other sites such as SourceForge and Google Code) but also provides tools like Trac, a Wiki, Scrum reporting, public or private access and up to 500 MB of disk space. (Additional features/space are available for a cost) For many, setting up services like Trac can be notoriously difficult, so with free services like this, it’s hard to find any nits to pick.

I won’t go into too much detail about the features since I wanted to talk about integrating the Eclipse plugin Mylyn with a Trac setup on Assembla. There can be some issues getting things to work so I’ve outlined what I did to get everything running nicely.

Assembla has come out with what appears to be their own Mylyn connector for Eclipse, which simplifies a lot of the configuration required. It’s available at their site along with a great tutorial on how to use it.

Background: Mylyn

Mylyn is an excellent task-management plugin for the ultimate IDE, Eclipse. I have been trying it out for a variety of things, since I was trying to find something better than just text files for managing various tasks lists. However, Mylyn does much more than just task management as it helps to streamline your work environment with “context”. I haven’t started using these advanced features though, but what really caught my eye was the integration Mylyn offers with various issue-tracking services such as Bugzilla and the aforementioned Trac. This is accomplished by various “connectors”, with each connector being specific to one of the issue-tracking systems.

The Problem: XML-RPC Integration

Integration of Mylyn with Trac allows you to view, create and edit tickets in a Trac repository from within Eclipse. To accomplish this, there are two levels of integration, the first being simple web-based access. This is the more primitive of the two and has been around for longer. Basically, items are still edited from a web browser; the only difference is the web browser is spawned within Eclipse. This isn’t really ideal and doesn’t offer a real integration.

The second uses an XML-RPC interface to send/receive data and thus offers proper integration with the Eclipse environment. However, when trying to connect to my Trac setup on Assembla with this choice, I ran into a lot of intermittent 404 (not found) errors. Basically, synchronization was very flaky and by no means usable.

The Fix

I did some searching and found this page on the Assembla site where other users had experienced the same problem. Scrolling through the comments brought me to this nice fellow’s explanation of the problem, where a screencast was provided showing how it had been fixed.

Basically, these are the steps I did to get Mylyn XML-RPC integration with Trac working.

  1. Enable the XML-RPC plugin

    Go to your Trac site, then click on Admin. On the left sidebar go to General > Plugins. There should be a section called TracXMLRPC; click to expand it. You might as well enable RPC access for all of the options provided, though I’m not sure if this is necessary. Here’s a screenshot.

    Enable the XML-RPC plugin

  2. Enable XML-RPC permissions

    After that, you need to enable permissions for XML-RPC access. Go to General > Permissions on the sidebar. In the “Grant Permissions” area, add a permission for “XML_RPC” for “@editors“. Using “@managers” for the subject might also work/be needed if you’ve setup access for those users. This is the basically what it should be:

    Enable XML-RPC permissions

  3. Ensure there is at least one ticket in the system

    For some reason, I had weird errors when trying to synchronize/connect to a Trac repository with no tickets. This was corroborated by the fellow who originally found the solution to this problem. It’s a minor issue though, just click “New Ticket” and create a placeholder.

  4. Add Trac to Mylyn

    This step’s simply enough; though some suggestions recommended using http://<domain_name_to_assembla_trac>/<space_url_name>/login/xmlrpc as the URL, I simply used http://<domain_name_to_assembla_trac>/<space_url_name> and it worked fine. Remember to use XML-RPC as your access type or you won’t get proper integration.

    Setting up Mylyn to work with Trac

After that, you should be able to properly connect to your Trac repository using the XML-RPC option of Mylyn. Then, you can finally enjoy proper Trac integration in Eclipse!

8 Comments »

  1. Thx a lot saved me a lot of stupid work!

  2. something else, do you know how to get this eclipse plugin working?
    http://trac-hacks.org/wiki/EclipseTracPlugin
    don’t know how to upload the trac part of this plugin. The eclipse part works properly.

  3. Hi Koen,

    I’m sorry, but I have no idea how to configure the Trac-side of things… Trac is notoriously hard to setup, which is why I decided to use Assembla instead.

  4. Hi Peter. This is how I got trac to work in a windows environment.

    http://sites.google.com/a/something2believe.com/renfeng/articles/how-to-setup-trac

    I hope it can help you if you are new to trac just like me ๐Ÿ™‚

  5. Thank you for this topic!

    I work with Eclise and Mylyn, and now I work with Assembla site from Mylyn!

    Good days my programmer friend!

  6. Thanks, let’s see if this helps…

  7. Great article, it all went straight through!

  8. Hi @all

    The Update-Link is broken!
    Well at least with Eclipse-Gallileo ๐Ÿ™
    How can i use the Tickets from assembla with Eclipse?

    Thanx a lot
    Reinhard

Comments are now closed for this entry.