Saturday, February 20, 2010

Liferay Plugins SDK configuration

Liferay's Plugins Software Development Kit is the recommended method of Liferay team to create plugins although it is not the only method. Plugins are themes and portlets. You can add functionality to Liferay by creating portlets and themes for it. In order to use it first you have to install some tools and configure SDK.

Install Ant

  • Plugins SDK requires that you have Ant 1.7.0 or higher installed.
  • Download the latest version of Ant from
  • Uncompress to any folder you choose.
  • Next, set an environment variable called ANT_HOME which points to the folder to which you uncompress Ant.
- On Windows by going to Start -> Control Panel, and double-clicking the System icon.
- Go to Advanced, and then click the Environment Variables button. Under System Variables, select New.
- Make the Variable Name ANT_HOME and the Variable Value the path to which you installed Ant (e.g: C:\Ant\apache-ant-1.7.1), and click OK.
  • To set proper memory settings for building projects.
- Select New again. Make the Variable Name ANT_OPTS and the Variable Value "-Xms256M -Xmx512M" and click OK.
  • Go to PATH environment variable. Select it and select Edit. Add %ANT_HOME%\bin to the end or beginning of the PATH and click OK.
  • To test whether you have properly installed Ant Go to command prompt type ant and press enter.
  • If you get a build file not found error, you have correctly installed Ant.

Configure Liferay Plugins SDK

  • Download the Plugins SDK archive from Liferay downloads page.

  • Unzip the file to any place in which to you wish to carry your works.
  • In that unzipped folder there is a file called and open it using text editor or IDE.
  • This file contains the settings for where you have Liferay installed and where your deployment folder is going to be.
  • But we can’t customize this file. Instead, create a new file in the same folder called build.${}.properties, where ${} is your user ID on your machine.
You can find your machine ID by right click My Computer -> properties.
Eg: where Jane is the Machine ID.
  • Most probably you will need to customise following properties and save the file.
- app.server.dir=
- javac.compiler=
  • app.server.dir: This is the folder into which you have installed your application server.
  • java.compiler: Defaults to the standard Java compiler, modern, from your JDK.
  • In my case build.${}.properties looks as below.
  • Now you are ready to use Liferay Plugins SDK.

No comments:

Post a Comment