Alfresco 3.3 with implementation of CMIS provides interoperability of its enterprise content management system with Liferay 6. In previous blogs Integrating Alfresco through CMIS in Liferay and the book: Liferay Portal 6 Enterprise Intranets, we have discussed how to integrate Alfresco 3.2 through CMIS 1.0 in Liferay 6. In this article, we are going to introduce how to integrate Alfresco 3.3 through CMIS 1.0 in Liferay 6.
This article will use Alfresco 3.3 E and Liferay portal 6.0.2 to show how to integrate Alfresco through CMIS in Liferay. Of course, you can do the same for Alfresco 3.3 or above community (or enterprise) version.
Integration
You should be able to integrate Alfresco through CMIS in following steps
- Install Liferay portal 6.0.2 (revision 54489) or above at $LIFERAY_HOME; Liferay-Tomcat bundle is expressed as $TOMCAT_AS_DIR; and $PORTAL_ROOT_HOME = $TOMCAT_AS_DIR/webapps/ROOT;
- Locate Alfresco 3.3 WAR ${alfresco.war} and Share WAR ${shared.war} at $ALFRESCO_INSTALLATION/ tomcat/webapps
- Drop ${alfresco.war} and ${shared.war} to $TOMCAT_AS_DIR/webapps;
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;Optionally, create database lportal in MySQL
drop database if exists lportal;
create database lportal character set utf8;
grant all on lportal.* to 'lportal'@'localhost' identified by 'lportal' with grant option;
grant all on lportal.* to 'lportal'@'localhost.localdomain' identified by 'lportal' with grant option;Create a file named portal-ext.properties at $PORTAL_ROOT_HOME/WEB-INF/classes and add following lines in portal-ext.properties.
dl.hook.impl=com.liferay.documentlibrary.util.CMISHook
cmis.credentials.username=admin
cmis.credentials.password=admin
cmis.repository.url=http://localhost:8080/alfresco/service/api/cmis
cmis.repository.version=1.0
cmis.system.root.dir=Liferay HomeOptionally, add database connection in portal-ext.properties.
## MySQL
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost:3306/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=lportal
jdbc.default.password=lportal
Of course, you can use different database systems.
Start the portal
By the way, you can download Alfresco 3.3 E WAR and Share WAR directly from
/palm_tree/book/0387/chapter12/cmis/1.0/
Of course, you can get the latest WAR of Alfresco Community version or Enterprise (Trial) version from Alfresco website
Results
In Control panel of Liferay portal, select default community “liferay.com”;
going to Content->Document Library, create a folder "Liferay Home" and upload a document under this folder as shown in following screenshot.

Logging in Alfresco as "admin/admin", you would see the folder "Liferay Home" and the document as shown in following screenshot. That is, Alfresco becomes direct repository of Liferay Document Library via CMIS. All real content is stored in Alfresco, while all metadata is stored in Liferay database.

In brief, Liferay supports CMIS 1.0 100%. Isn’t it? You can integrate other ECM or related systems easily via CMIS in Liferay portal, like Dennis Hamilton, EMC, FatWire, IBM, Microsoft, Open Text, Oracle and SAP, etc.

