Integrating Alfresco Web Client as a set of portlets with Liferay

 In ten steps, you could be able to set Alfresco (3.1 or above) web client as a set of portlets in Liferay portal (5.2 or above). It is simple for Do-It-Yourselfers.

Download URL:  liferay.cignex.com/palm_tree/0387/sso/liferay/alfresco-portlet

Demo URL:  liferay.cignex.com 

1) Get Alfresco web client application: alfresco.war (from Alfresco Tomcat bundle)

2) Unzip it to $ALFRESCO_HOME (any folder in your local machine, e.g., new folder /Alfresco)

3) Update dir.root in $ALFRESCO_HOME/ WEB-INF/classes/alfresco/repository.propertes.

dir.root=../../alf_data

4) Create a database alfresco in MySQL

drop database if exists alfresco;

create database alfresco character set utf8;

grant all on alfresco.* to 'alfresco'@'localhost' identified by 'alfresco' with grant option;

grant all on alfresco.* to 'alfresco'@'localhost.localdomain' identified by 'alfresco' with grant option; 

5) Remove the file $ALFRESCO_HOME/WEB-INF/lib/portlet-api-lib.jar 

6) Add /WEB-INF/faces-config.xml to the faces config files list at $ALFRESCO_HOME/WEB-INF/web.xml like

<context-param>

      <param-name>javax.faces.CONFIG_FILES</param-name>

      <param-value>/WEB-INF/faces-config.xml,/WEB-INF/faces-config-app.xml,/WEB-INF/faces-config-beans.xml,/WEB-INF/faces-config-navigation.xml,/WEB-INF/faces-config-common.xml,/WEB-INF/faces-config-repo.xml,/WEB-INF/faces-config-wcm.xml,/WEB-INF/faces-config-custom.xml</param-value>

</context-param>

7) Download and add files: faces-config.xml, liferay-display.xml, liferay-portlet.xml, portlet.xml to $ALFRESCO_HOME/WEB-INF

8) Create a  folder license under $ALFRESCO_HOME /WEB-INF/classes/alfresco/extension and add license file to  $ALFRESCO_HOME /WEB-INF/classes/alfresco/extension/ license

9) Package all files as a WAR: alfresco.war; 

10) Deploy it in $LIFERAY_HOME/deploy

Note that you may not be able to add alfresco portlets in Liferay portal pages properly, since some alfresco portlets requires to be signed in first. Simple solution - you can create an account “admin/admin” (default account in alfresco) in Liferay, and assign this account to the role “Administrator”.  Then login as “admin/admin” in Liferay portal, and add alfresco portlets in Liferay portal pages. 

Or, you can use the result WAR directly:  download WAR from http://liferay.cignex.com/palm_tree/0387/sso/liferay/alfresco-portlet/alfresco.war and deploy it in $LIFERAY_HOME/deploy.  That’s it. Note that use JDK 1.6.0_14 or above.

Wiki Article URL: http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Full+Integration+-+Liferay,+Alfresco,+SSO+and+LDAP

 

Write a blog post too!

Write a deep dive into how you use Liferay projects in your technology stack. Or let people know useful tips and tricks for a particular functionality. The Liferay community needs you!

Login or Create an account