New Release - Liferay IDE 2.0 Milestone 1

We here on the IDE team are pleased to announce the new release of Liferay IDE: Liferay IDE 2.0 Milestone 1.  Since this is an Eclipse release all you need is to use the following update site url in the Help > Install New Software... dialog.

This milestone release is the first in a series of milestones leading up to Liferay IDE 2.0 GA release that is planned for just after Liferay Portal 6.2 GA.  Below are some highlights Liferay IDE 2.0 M1:

Release Highlights


Milestone Releases

The reason that we are releasing 2.0 in a series of milestones is because of all the changes that happened since 1.6.x namely the integration of maven projects which have a totally different layout than ordinary SDK based projects.  So we need your feedback if you run into problems when you upgrade from previous version.  We plan to have at least 2 more milestones of IDE 2.0 until we are all finished with adding the planned features.

Liferay Portal 6.2 Support

Now that the Liferay Portal 6.2 Beta releases are out IDE uses can finally have a way to use them using the Eclipse server adapter support. The new 6.2 runtime/servers have been added right along side 6.0/6.1.

Liferay Maven Project Support - New m2e-liferay Feature

One of the most requested features for Liferay IDE has been maven support.  This release now provides that support through a separate installable feature called m2e-liferay.  
This is an extension of the existing Eclipse built-in maven support (m2e) but specialized to support the liferay-maven-plugin available for Liferay projects.  This topic is quite log and involved so it needs its own page about m2e-liferay.  But below is an image that shows a properly configured Liferay Portlet project that is using the liferay-maven-plugin and is correctly configured in Liferay IDE 2.0M1.  Notice that the Liferay Portlet facets are installed and that you can drag-n-drop these projects onto the Liferay Portal Server adapter.

Ivy support for Plugins SDK projects

In the latest version of the portal 6.1.2, 6.1.30, and upcoming 6.2.0 Ivy support has been added to the Plugins SDK.  So now some of the projects created by SDK will come with their own ivy.xml file for dependency management along with the common infrastructure for Ivy (cache dir) residing in the root of the Plugins SDK.  In order for these projects to work full in Eclipse (all classes compile) we need to enable Ivy dependency management for Eclipse.  This is going to be accomplished by integrating the great work by the IvyDE team, using their plugin for Eclipse (IvyDE) to support Ivy enabled Liferay plugin projects. 


So starting with 2.0M1 of Liferay IDE it will come bundled with IvyDE plugin.  Also if any project that is created in the SDK contains an ivy.xml file (e.g. JSF projects) then the New Liferay Wizard will automatically add a Ivy nature, add an Ivy container configured to use Plugins SDK cache and ivy-settings.xml from the Plugins SDK and will also automatically invoke the resolve for the container (i.e. download the dependencies). 

Theme Improvements

If in the new project wizard you select that you want to create theme project, you can see additional options for specifiying the theme parent and the template langauge you want to use.  By default we have switched to Freemarker mainly because of the next biggest new feature, the Freemarker debugger.

Freemarker Debugger

Included in the 2.0M1 release is a new feature for debugging Freemarker templates executed for Liferay theme plugins.  This feature creates a Freemarker debugger client integrated with Eclipse debug view.  When you launch a Liferay Portal 6.2 Server in "Debug" mode it will automatically enable the embedded Freemarker debugger.  Then you can add breakpoints to any FTL file that is opened with the Liferay Freemarker Editor.  When the Portal evaluates those FTL templates it will pause execution and activate the debug view Eclipse.  

You can then inspect variables, step, resume as you would expect in normal java debugger.  

Also you can suspend the calling Java thread in order to see the stacktrace from Liferay that calls into the Freemarker template engine.  

There are some missing features that you would expect, like watchpoints, native stepping, run-to-line, making changes to stack, etc.  We are working with Freemarker team in order to deliver a advanced debugger for future versions of Freemarker that will have more features equivalent with all modern java debuggers.  

Other highlights

  • Various Layout Template Visual Editor improvements
  • Remote server adapter supports proxy servers
  • Portlet wizard now supports adding portlets to Control Panel


We really need the communities help in providing feedback on this milestone release.  Especially issues involved in migrating from IDE 1.6.x projects, or using Maven and Ivy enabled projects.  Also since the Maven support (m2e-liferay) is in its first version so there are going to be some rough edges to be smoothed out in the upcoming milestone releases.  But the quality will be much better if the community will report issues they have with 2.0M1.  Post issues to Liferay IDE Forums or the JIRA project.


Special Thanks

Before I finished this blog post I wanted to mention a couple of words of thanks.  Firstly, I need to mention my QA team members, Ashley Yuan and Vicky Wang that were in charge of QA for the 2.0M1 release.  They have written lots of UI functional tests and regresion tests the past year as we have been working up to this release.  A massive change in the codebase that this involved would have been impossible with their efforts.  Thanks team!

Also special thanks goes out to a couple of other super-smart engineers, Neil Griffin and Mika Koivisto for all of their help with maven.  Neil for being my maven mentor and Mika for fielding my pull requests and helping me understand the liferay-maven-plugin when both of those guys are super busy and have bigger fish to fry! :)

Thx - i will try it. I just starting a new liferay project and i will use maven.
Right now there is no "New Liferay Maven Project" wizard. That is coming in future milestone. However, you can use the built-in "New Maven Project" and just select the "liferay-*-archetype" and your version. Then once you have resolved all of the required liferay.*** properties, the Liferay IDE project configurator will update your project to be a "Liferay" project. Full details will be provided on m2e-liferay wiki page soon. You can see a preview of that content here:
Very useful post! Do you know if we have already the counterpart for Liferay Development Studio? many thanks!!!
there is a problem with theme-plugin-archetype:
"Plugin execution not covered by lifecycle configuration: com.liferay.maven.plugins:liferay-maven-plugin:${liferay.maven.plugin.version}:build-css (execution: default, phase: generate-sources)"
the liferay-maven-configurator desnt know "build-css", "theme-merge" and "build-thumbnail" - is this a problem? i also asked about it here:
What about publishing/synchronizing css/jsp files? Is there a way to get changes in css and jsp and other such files synchronized with the server?
I have a mavenized theme plugin and redeploying (clean package liferay:deploy) after every change consumes much time. Is there a way to get the same comfort as with plugin-sdk based builds?
when the stable version of the plugin will be released?
Can I configure Liferay 6.2 as a 6.1 version in Eclipse? Any side effects?

when the stable version of the plugin will be released?
Can I configure Liferay 6.2 as a 6.1 version in Eclipse? Any side effects?

We are still working towards 2.0 stable, milestone-2 will be available tomorrow. I believe it stable enough for normal development and would appreciate the feedback. emoticon If you can't upgrade to 2.0m2 tomorrow then there should not be too much issue to configure 6.2 server as 6.1 as they are both built on tomcat7.
Hi Greg,
Thanks for all your hard work here.

Is there a guide to build the IDE? I know there are some older ones, but new.

But it doesn't address the latest one.

Thanks in advance; have a great day. Bijan
Hey Bijan,

Sorry for the out-of-date wiki page. We will try to get it updated soon.

Liferay IDE source uses maven3 for the build. So you can check it out and do:

'mvn clean verify'

Once it finishes you can look in this folder:
build/releng/com.liferay.ide-repository/target/updatesite/ for the newly built Eclipse p2 updatesite that you can then install into your local eclipse using "Help > Install software...".

If you want to hack on the source, it is a bit more involved to get the necessary configuration in Eclipse ( Eclipse SDK plugins, Liferay IDE dependencies ) all installed and then configuration a test workbench. Those details should live in that wiki document which we need to update. emoticon
Hi Greg,

Wow. Thank you for your prompty reply!

I just wanted to get over this bump:

And I just remember the nightly builds!

But in any case, thank you very much.
When I start Liferay using Liferay IDE 2.0 M2, it takes a very long time to startup, if at all. Looking at the debug window, I see that a couple of hundred HTTP threads are created. Its like Java keeps making HTTP request. When I start the same Liferay instance from the command line, it works just fine.
I am running M2 and it's not slow; what are values for below properties?
-XX:MaxPermSize -Xms -Xmx
So after some more digging, I discovered that Liferay does start up pretty fast. But Eclipse (WTP) starts a thread to ping Tomcat so it can notify the IDE that LIferay has been started. The ping is never successful so it looks like Liferay is still starting up. I disabled my firewall and that seemed to fix the problem.
Hi Gregory,
I started using M2 version but in this version (compared to the old 1.6) it's not possible anymore to create a custom portlet during project creation.
I mean... in the old 1.6 version, during the Liferay Plugin Project wizard it was possible to create a new portlet Java class, define name, portlet mode, name, etc...
Now the plugin IDE create silently an "empty" portlet using MVCPortlet Java class.
Is it possible to reintroduce the old feature?

Anytime I make a change to code, it reloads the context. The name of my project/context is hello-portlet. I noticed that Liferay IDE creates a hello-portlet.xml file in the tomcat/conf/Catalina/localhost with the following content. Sometimes the portlet does not even deploy properly with that file in the tomcat/conf/Catalina/localhost dir. When I remove that file, the portlet deploys and code changes hot deploy without a context restart. Whenever I my portlet does not deploy, I look for that file in the conf dir and delete it and restart the server and all works again. Any ideas why this happens?