Using Spring Tool Suite for Liferay Development

“Using Spring Tool Suite (STS) for Liferay Development” is the first blog in a series that researches the usability of STS in the Liferay Development process. One might ask: Why not to use the Liferay Development Studio? For one thing, I dislike Ant. All my recent projects have used Maven. There is not a good reason to revert to ancient history and use Ant. Even so, Maven is treated like a red-headed stepchild by Liferay. The Liferay Maven plugin helps with initial project configuration, start of development, and deployment.


The installation of STS is fairly straightforward. Just download the latest version from http://www.springsource.org/spring-tool-suite-download. As of this blog, the latest version is STS 3.2.0. For the purposes of this blog series, the Spring Source development environment was installed in /home/isosdev/springsource.


For the Liferay installation I choose Tomcat and the Liferay Glassfish bundle. The Glassfish bundle was chosen primarily because all of the documentation refers to the Liferay Tomcat bundle. Additionally, the Liferay IDE is only available for the Tomcat version.

Download the following artifacts from http://www.liferay.com/downloads/liferay-portal/available-releases

  • Liferay Portal 6.1 Community Edition 6.1 CE GA2 Bundled with Tomcat
  • Liferay Portal 6.1 Community Edition 6.1 CE GA2 Bundled with Glassfish
  • Liferay Portal 6.1 Community Edition 6.1 CE GA2 Plugin SDK [Optional]

I extracted the downloaded files to /home/isosdev/liferay. Once the files are downloaded, we can start to set up the servers in STS.

Startup STS in the default Spring perspective. We will be using this perspective for that exercise. First, in the lower left corner create a new server.

Create a Tomcat Server Instance

Create a new Tomcat 7 Server and point to the Liferay Tomcat folder:


Next we have to configure the server. Open the Server Configuration and change the following option:

  • Change the “Server Location” to “Use Tomcat Installation”
  • Increase the timeouts for start and stop to 400 and 240, respectively.
  • Click “Open Launch Configuration” and add the following settings to the VM Arguments
    -Duser.timezone=GMT -Xmx1024m -XX:MaxPermSize=256m

Start the server after these changes and let Liferay complete its installation.

Create a Glassfish Server Instance

If you want to use the Glassfish instance for Liferay development, you need to install the Eclipse Glassfish plugin. The easiest way to do that is using the Eclipse Marketplace. Make sure you select the correct plugin version.


After the installation has completed, create a new server similar to the Tomcat server. Point the Application Server Directory to the proper Liferay Glassfish folder and press ‘Finish’.


The Glassfish server does not require any special configuration settings. Just start the server to complete the Liferay installation.

How to continue

Now we have a clean configuration of Spring Tool Suite and we can test or Liferay portlets and hooks in the Tomcat and Glassfish environment. In next part of the series I will take a closer look at the Maven 3 configurations for Liferay Development.

Share with your peeps...Share on LinkedInShare on Google+Tweet about this on TwitterShare on FacebookEmail this to someone

Thomas Behlau combines powerful analytical skills with strategic decision making processes to provide client solutions as a Senior Consultant at Isos Technology.

As a seasoned software engineering consultant, Thomas Behlau is normally cast in the role of tech lead and architect in his consulting engagement. Thomas possesses a daunting list of skills as a software engineer. He has extensive experience in delivering enterprise and mobile applications. Thomas has been involved in and managed all phases of software development projects, from initial design through development, deployment and production support.

Beyond standard software engineering roles, Thomas Behlau has also produced and taught courses to enterprise clients. These have ranged from introductory OO courses to Java programming for RPG programmers to enterprise application server administration and best practices. Thomas brings this strong skill at mentoring to clients, leaving them with a solid understanding of the solutions provided.

Thomas Behlau applies the same thorough analysis and long term strategy to consulting problems as one would apply to an intense game of chess. His wide-ranging technical knowledge and strong mentoring skills make him a valuable asset to all Isos Technology's clients.

Tagged with: , , , — Posted in Liferay