I managed to write pom.xml which build WAR and deploy them automatically in my Liferay.

The problem is for the Ext plugin. It is fully integrated in liferay-plugins-sdk, and I did not manage to externalize it to make it a maven project.

I got lot's of errors compilations like:

1[INFO] An Ant BuildException has occured: The following error occurred while executing this line:2/home/frleq/Dev/projets/VilleDeNiort/WORKSPACE/liferay-plugins-sdk/ext/build-common-ext.xml:123: The following error occurred while executing this line:3/home/frleq/Dev/projets/VilleDeNiort/WORKSPACE/liferay-plugins-sdk/ext/build-common-ext.xml:169: The following error occurred while executing this line:4/home/frleq/Dev/projets/VilleDeNiort/WORKSPACE/liferay-plugins-sdk/build-common.xml:90: srcdir "/home/frleq/Dev/projets/VilleDeNiort/WORKSPACE/liferay-mod-root/ext/docroot/WEB-INF/ext-service/src" does not exist!

Is there any way to do it simply, or do I need to keep it inside liferay-plugins-sdk?

It isn't simple use plugin EXT as a Maven project but have you tried to create the /home/frleq/Dev/projets/VilleDeNiort/WORKSPACE/liferay-mod-root/ext/docroot/WEB-INF/ext-service/src directory? I'm not sure but I think that I had the same problem using the plugin-sdk. BUT this won't be the only problem that you gonna find. The war built by the plugin-sdk for a EXT plugin is not a real war file. It doesn't contains a web.xml file neither classes and lib directories. I'm working on an extension for Maven to be able to build the Plugin EXT natively.

I had a different approach. I tried to override the javac.src variable used in Ant build-common-ext.xml. For some reason, it worked for other variables, not for this one. I did not try to create this folder because my src files aren't in it. They are in:

see http://sampsa.sohlman.com/fi/home/-/blogs/building-custom-liferay-with-maven for maven overlay method

This method seems to customize the whole portal, just like the old ANT system did in Liferay 5.2. As it does not use the plugin system (ext is now like a plugin), I don't think this method is recommanded...