Wednesday 30 September 2009

jabberd14 for testing with jira

I'm working on getting a previously developed Jira IM library JIMI (which leveraged the work done in Yet Another IM Plugin) integrated with JEMH. The merge was always on the cards but until JEMH got bright enough to enable comment processing, the usability wasn't there. Now is the time.

With IM support, and an ability to modify issues, it becomes a whole new ballgame, so the old JIMI code is getting the dust blown off.

Current IM features include:
  • Jira configuration for Jabber
  • Additional authentication check, including captcha support
  • access to system info, eg memory usage
  • dynamic execution of arbitrary uploaded beanshell scripts. hmmmm.
Im thinking of future-features such as:
  • watch a project
  • watch a component
  • watch an issue
  • watch a user
  • filters enabling matching of subject/comment text (aking to xyz was mentioned...)
  • of course, modifying issues, eg reassign, change priority, resolve, start progress etc etc.
all doable, in time, question is, what can I get working in the next week :)

Monday 28 September 2009

Jira, SSL and Gmail, what a faff!

I had cause today to verify correct operation of Jira with Gmail with JEMH. I had enough fun to want to write it down for future reference.

1. So Gmail needs SSL for POP and SMTP
The problem is that in order for Jira (Java actually) to setup even a single SSL connection, it needs to be able to trust the source.

Following the Connecting to SSL services page I recalled the nitty gritty of extracting the Gmail security cert, loading into the JRE cacerts file I remembered. Really usefully I was happy to the the old SSLPoke.class file I wrote to do testing ages ago still available, ironically able to use it to test my setup today! With a JRE now able to talk SSL to gmail, time to setup Jira.

2. Setup Jira
a) POP
Adding a popserver entry, with simple details, host as pop.gmail.com and valid username/password. The SSL bit comes in when setting up the handler
When adding a POP handler, ensure the gmail popserver is selected, the handler has a Uses SSL option, which needs setting true, and the port should be 995.

b) SMTP
Followed Configuring JIRA to send SMTP mail , so modified the config/server.xml file, all seemed fine, but this is where I hit a few snags, the most irritating was "java:comp/env....." not found. Turned out this was due to a space at the front of the " java:", gah, my kingdom for a trim().

I found JRA-12180 , so moved the two jars (mail / activation ) from atlassian-jira/WEB-INF/lib into common/lib. Q: Why isnt this already done as part of the standalone dist? huh.

And yet, it still didn't work. Hmm. So found an Atlassian knowledge base article
that indicated the "mail.smptp.socketFactoryClass" entry in the server.xml file that the earlier page instructed to be added.

Alls well that ends well. Gmail now working as SMTP/POP server over SSL,.