First of all announcement for Vaadin developers:

As from issue LPS-57525 we are not shipping Vaadin with Liferay core anymore. But no worries, Vaadin can be deployed to Liferay 7 as a set of OSGi components.
Preface:
So as everyone who follows Liferay product development knows that Liferay 7 is a big step towards of modularity and this modularity is achieved with OSGi framework.
Vaadin on the other hand has been supporting OSGi for quite a while and you can find blogs and articles around that.
Why modularity? When you think modular way you - you think light. Your solution is not a heavy war bundle containing all the necessary dependencies (jars), but web of light weight interconnected bundles and using API's and services from each other.
So for Liferay 7 it would be natural to develop Vaadin 7 applications with OSGi modularity in mind. So I decided to create proof of concept and try it out.
Proof of consept
Platform
As platform I did use Liferay 7 milestone 6 and Vaadin 7.5.1 and build tool I used maven so you can easily to build the PoC and deploy it.
Actual development
When you start developing Vaadin application, first step is to configure Vaadin portlet, which job is to initialize the UI object. This is normally done at portlet.xml, but I decided to take the OSGi component approach, where you do this by creating portlet component and at property configuration to tell where is the Vaadin's UI class is located.
@Component(
immediate = true,
property = {
"com.liferay.portlet.display-category=category.vaadin",
"com.liferay.portlet.instanceable=true",
"javax.portlet.display-name=Vaadin OSGi PoC Portlet",
"javax.portlet.init-param.UI=com.liferay.vaadin.poc.ui.PortletUI",
"javax.portlet.security-role-ref=power-user,user"
},
service = Portlet.class
)
/**
* @author Sampsa Sohlman
*/
public class VaadinPortlet extends com.vaadin.server.VaadinPortlet {
}
Then we need our UI class, but there is nothing really special. Just plain old Vaadin UI class, nothing OSGi specific.
@Theme("valo")
@SuppressWarnings("serial")
/**
* @author Sampsa Sohlman
*/
public class PortletUI extends UI {
@Override
protected void init(VaadinRequest request) {
// Full implementation here : click the link
}
}
As we are creating an OSGi module we need to add the necessary entries to MANIFEST.MF, which we can do with maven-bundle-plugin.
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.5.4</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Private-Package>com.vaadin.portlet,com.liferay.vaadin.ui</Private-Package>
<Import-Package>
javax.portlet;version="[2.0,3)",
javax.servlet;version="[2.5,4)",
com.vaadin.ui;version="[7.4.6,8)",
com.vaadin.server;version="[7.4.6,8)",
com.vaadin.annotations;version="[7.4.6,8)",
com.vaadin.data.util;version="[7.4.6,8)",
com.vaadin.data;version="[7.4.6,8)</Import-Package>
<_dsannotations>*</_dsannotations>s
</instructions>
</configuration>
</plugin>
Trouble
Everything up to this point went as I planned, but then I ran into trouble. Even though all the required Vaadin jars did deploy nicely to Liferay's OSGi container, the vaadin-server.jar was missing the required MANIFEST import entries to work properly with Liferay's portlets. Luckily, the problem was solved by adding missing manifiest import entries. So the fix was easy and I did repackage vaadin-server.jar with new manifest entries with maven shade plugin.
Second problem was how to serve required widgetset and theme resources. This I did accomplish by adding OSGI servlet, which is serving content from classpath, which I feel kind of hack, but was sufficient for the PoC.

Finally my PoC application was working at Liferay 7's OSGi container.
Resources
You can find example project from github. It should be deployable to Liferay 7 m6 (and self compiled master).
https://github.com/sammso/liferay-vaadin7-osgi
Future
Of course, I started discussion with Vaadin guys and that did result ticket https://dev.vaadin.com/ticket/18561 so future Vaadin versions of Vaadin will include correct manifest entries and we will figure out also how fix serving resources at Liferay 7.


