Friday, February 26, 2010

Configuring the JIRA Portlet in Liferay

This is how I configured the world of Liferay portlet-JIRA in Liferay. You can follow the below steps in order to configure that portlets. I'm using atlassian-jira-standard-3.7.4-standalone as my JIRA Installation and liferay-portal-tomcat-6.0-5.2.3 as my Liferay instance.

Installing JIRA:
See my post "Installing JIRA" to install the atlassian-jira-standard-3.7.4-standalone.

Installing MySQL and Connecting JIRA:

In order to configure the JIRA portlet in Liferay, you need to set the JIRA database in to a valid database. You can use any database such as MySQL, Oracle, DB2, Firebird, MaxDB,HSQL etc. Here are the steps to configure the MySQL database for the JIRA. You can find a complete instructions from http://www.atlassian.com/software/jira/docs/v3.7.4/databases/mysql.html

  • I'm using MySQL server 5.0 as my MySQL installation.
  • Create a database for JIRA to store issues (e.g. jiradb). I created it using MySQL Command Line Client.
create database jiradb;
  • Download the MySQL Connector/J JDBC driver from http://mysql.cs.pu.edu.tw/Downloads/Connector-J/mysql-connector-java-5.1.12.zip
  • Add the MySQL JDBC driver jar (mysql-connector-java-3.x.x-bin.jar) to the atlassian-jira-standard-3.7.4-standalone/common/lib/ directory.
  • Edit conf/server.xml and customise the username, password, driverClassName and url parameters for the Datasource.You have to edit followings. Also delete the minEvictableIdleTimeMillis and timeBetweenEvictionRunsMillis parameters.
username="root"
password=""
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/jiradb?autoReconnect=true&useUnicode=true&characterEncoding=UTF8"
  • Edit atlassian-jira/WEB-INF/classes/entityengine.xml. You have to edit following parameters.
change the field-type-name attribute to mysql
delete this, if it exists: schema-name="PUBLIC"
  • Then you can start the JIRA using bin/startup.bat
Configuring Liferay:

Since World of Liferay-JIRA portlet is not an out of the box portlet, you have to configure it before using it. You can find a forum on doing this at http://www.liferay.com/community/forums/-/message_boards/message/4574654
Following is the list of steps that I have followd to configure that portlet.

  • liferay-portal-5.2.3\tomcat-6.0.18\webapps\wol-portlet\jira\view_jira_project.jspf uses hard coded urls to issues.liferay.com. I modified them to my JIRA installation URL. So now it looks like
String jiraURL = "http://localhost:8090/secure/Dashboard.jspa?reset=true&pid=" + projectId;

  • I updated wol-portlet\WEB-INF\jdbc.properties with appropriate values to access the JIRA database. So now it looks like:
jira.driverClassName=com.mysql.jdbc.Driver
jira.url=jdbc:mysql://localhost/jiradb?autoReconnect=true&useUnicode=true&characterEncoding=UTF8
jira.username=root
jira.password=

  • I Updated wol-portlet\WEB-INF\classes\portlet.properties to turn on jira synchronization.Now it looks like:
include-and-override=portlet-ext.properties
jira.synchronization.interval=5
  • After that Strat the liferay using bin/startup.bat

Adding the JIRA portlet to Liferay and customize:

Following are the steps that I followed in order to add the JIRA portlet.

  • Login to the Liferay with your user name and password. (May be default user name= test@liferay.com password=test)
  • Go to My Places -> My Community -> Private Pages and click add application.
  • Select and add JIRA and Summery portlets under the World of Liferay category.
  • Then you should see the "Set JIRA login" link in the JIRA portlet and set the login name here.
  • If you get any porblem with setting it from there, go to summery portlet "edit" link and set it.
  • After return to the previous page you should displayed the JIRA portlet.


No comments:

Post a Comment