Jenkins + Liferay plugin deployment

Posted on 09/10/2013 by Charalampos Chrysikopoulos

In the past I wrote an article about how to use jenkins to deploy your plugins in a remote liferay portal server.

But this solution had a problem. You could never be sure that the plugin was successfully deployed in the portal, because the job just copied the war file in the deploy directory. The rest of the deployment procedure was unknown to the jenkins job.

Searching in the internet didn't help much, I couldn't find a better solution. So I decided to create a jenkins plugin, that would communicate with liferay in some way, and get the information of the state of a portlet after the deployment.

But the liferay portal as it is, doesn't provide this information. Luckily, there is a Remote IDE Connector in the liferay Marketplace (for CE and for EE). The description is:

This app provides remote development and deployment support from Liferay IDE. With this app, you can build Liferay projects in Liferay IDE or Liferay Developer Studio, and deploy the projects to a remote host that has this app installed. Liferay IDE is an extension for the Eclipse platform that supports development of app projects for the Liferay Portal platform. It is available as a set of Eclipse apps installable from an update-site. The latest version supports developing 5 Liferay app types: portlets, hooks, layout templates, themes, and EXT-style plug-ins. Liferay IDE requires the Eclipse Java EE developer package using either Galileo or Helios versions. For details on using Liferay IDE or Developer Studio, visit the "Liferay IDE" chapter of the Liferay User Guide, located at This app installs as a Liferay service.

So, installing this app in you liferay portal creates a new web application that lives together with the portal, which is able to accept war files through http and deploy them in the portal. It is something like the manager in tomcat, but as it is a custom web application it works on any web server. Additionally, you can retrieve information about the state of plugins using REST calls.

This app was the missing chain.

So, now, it is possible to have the precious information, if a portlet was successfully deployed or not. In the near future I will make a new post with a prototype jenkins plugin that does exactly the above stuff.

Future note: this is the next post.

This entry was posted in Liferay and tagged jenkins, Liferay by Charalampos Chrysikopoulos

Add new comment