At a time, the focus of these two softwares were (still are?) entirely different. For example,
Liferay is by heart a portal solution with a very strong & active community behind it and an impressive clientele to prove its credentials. By far it is in today's days, arguably, the most popular open source portal solution, specially in Java technology.
Alfresco is an Enterprise Content Management Software which also has an equally powerful & vigorous community supporting it and an imposing set of patrons using the software. This is again, the most admired ECMS solution available in today's open source market.
Liferay has been wonderful in handling portal problems in the industry and its scalability have been the main driver that helped itself to be adopted in a variety of business verticals. However, as since its primary focus has been a portal solution, the document and content management capabilities of this framework does not make it very much enterprise ready, and not at all extensible, specially if we compare it with proper document and content management systems. However, the collaboration features of Liferay are definitely quite powerful.
On the other hand, Alfresco has been fantastic as an Enterprise Document and Content Management solution. The framework's architecture, functionality and extensibility makes it really the best choice for an enterprise business. Having features like customizable workflow, templated UI, user-defined data-types, powerful rules engine etc makes this one of the best ECMS solution. Conversely, since it is not intended to be a collaboration solution, these features are not very well provided, at least not suitable for business users.
In this scenario, these two technologies seems to be very much complementary to each other - Liferay providing the portal environment while Alfresco sits at the lower level of the stack supplying the content management services.
Alfresco Web Script is a very great framework which makes this solution even more feasible and extensible. Web Scripts can be used as a pltaform of SOA architecture based solution as well as these can be used as standard JSR portlets deployed in Liferay. Both these technologies support Single Sign On with standard LDAP providers.
However, now both these solutions have now come up with new products in order to capture the market with focus and to provide a ready-made solution to the business. Quite excitingly, both these prodcuts seems to be targeting the same market segment - Collaborative Document Management System.
Liferay has launched Liferay Social Office http://www.liferay.com/web/guest/products/social_office, offers features such as Wikis, Blogs, Document Libraries, Calendar, Sites, Message Boards, Activities etc - http://www.liferay.com/web/guest/products/social_office/features.
On the other hand, Alfresco has also launched Alfresco Share http://www.alfresco.com/products/collaboration, offering almost similar features like Document Library, Sites, Wikis, Blogs, Activities, SharePoint protocol support etc.
Although the behavior and presentation of these two systems are different, features and functionalities offered by these are very much similar.
Now the big question is, where these two systems are leading into? As the document management, record management features are not main focus of Liferay, similarly the collaboration features are not the most important offerings of Alfresco.
It will be quite interesting to see in next few months or years how these systems grow and place themselves as complementary or competitive solutions.