Liferay Portal is an enterprise portal which includes a suite of applications. Among other stuff, it provides a collaboration suite called Liferay Social Office.

Summarizing, Liferay Social Office provides a collaborative Liferay site for a company with several functionalities: calendar, documents, forums, blog, wiki, etc.

A new version of Liferay Social Office 2.0.0 will be available soon (the release date was planned for past 29th of June). But if you don’t want to wait, this post will explain how to launch Social Office from Liferay source code.


First of all you need to have installed a JDK and Ant in your system. You can use the next line to install it in a Debian based distro:

~# apt-get install openjdk-6-jdk ant

Let’s create a new folder called liferay where you’re going to download the sources, compile them and so on:

~$ mkdir liferay
~/liferay$ cd liferay

Download the latest sources (it didn’t work for me using Liferay 6.1.0 GA1) from GitHub repository, uncompress and rename them (alternatively you can clone the Git repository, but it’ll be much slower):

~/liferay$ wget -O
~/liferay$ unzip
~/liferay$ mv liferay-liferay-portal-36e8468 liferay-portal
~/liferay$ wget -O
~/liferay$ unzip
~/liferay$ mv liferay-liferay-plugins-cfb1925 liferay-plugins

Then you’ll need to create a folder called bundles:

~/liferay$ mkdir bundles

And as root you’ll have to copy one .jar file to Ant libraries folder:

~/liferay# cp liferay-portal/lib/development/ecj.jar /usr/share/ant/lib/

You’re just pending to configure ANT_OPTS, download Tomcat (automatically with Ant) and compile Liferay. Use the following commands:

~/liferay$ cd liferay-portal
~/liferay/liferay-portal$ export ANT_OPTS="-Xmx1024m -XX:MaxPermSize=512m"
~/liferay/liferay-portal$ ant -buildfile build-dist.xml unzip-tomcat
~/liferay/liferay-portal$ ant all

Then you’re ready to launch Liferay:

~/liferay/liferay-portal$ cd ../bundles/tomcat-7.0.27/bin/
~/liferay/bundles/tomcat-7.0.27/bin$ ./

Maybe it takes some time (around 1 minute) but you should be able to access Liferay at http://localhost:8080/.

Then you enter the administrator user data, accept the privacy policy and configure the default password for the new adminstrator. Finally, you’ll get the next screenshot:

Liferay home page

Liferay home page

Social Office

Now, you’re going to compile and deploy the portlets, theme and hook required for Liferay Social Office:

  • Portlets: contacts-portlet, events-display-portlet, microblogs-portlet, private-messaging-portlet, so-portlet, tasks-portlet, wysiwyg-portlet
  • Themes: so-theme
  • Hooks: so-hook

For each of them you have to go to the proper folder inside liferay-plugins and run “ant all” (note that this step is done without stopping Tomcat). An example for contacts-portlet:

~/liferay/liferay-plugins$ cd portlets/contacts-portlet/
~/liferay/liferay-plugins/portlets/contacts-portlet$ ant all

As a side note, in order to get the list of dependencies you can compile and deploy first the so-hook (using the previous commands). Then, you could read the next line in the log file (~/liferay/bundles/tomcat-7.0.23/logs/catalina.out):

18:19:58,351 INFO  [HotDeployEvent:109] Plugin so-hook requires contacts-portlet, events-display-portlet, microblogs-portlet, private-messaging-portlet, so-portlet, so-theme, tasks-portlet, wysiwyg-portlet

Then you can go to Control Panel (http://localhost:8080/group/control_panel/) navigate to Portal > Sites and add a new site using the option “Add Default Social Office Site“.

Finally, you can browse your Liferay Social Office site in a URL similar to the next one (it will vary depending on the name you enter for the new site, in the example I used “My Social Office“): http://localhost:8080//web/my-social-office/home.
Liferay Social Office home page


On 12/12/18 19:32, gordon daniels wrote:

thanks for publishing this. I have a couple of questions.

  1. Any problems using openjdk with liferay?
  2. Does libreplan work with liferay?

thanks again

On 12/12/19 11:44, Manuel Rego Casasnovas wrote:

  1. I didn’t detect any problem using OpenJDK.
  2. LibrePlan is not currently integrated with Liferay, but this is a possible option that could be developed at some point in the future.

On 14/02/06 19:19, Jonathan Lee wrote:

I want to add something about creating a Social Office Site. There are two ways to create a Social Office Site.

One is from the sites porlter in the dashboard. If you create a site through the sites portlet, all the site configuration will be configured for you.

Second is from control panel > sites. If you create the site based on the Social Office template. there is still one more thing to do. You need to change the application adaptor to so-hook in order to the Site to function correctly as a Social Office.

The screenshot you posted in the end looks like the site is not running with so-hook adaptor.

I hope this help