Liferay 6.0 EE SP2 is out!
Liferay just released their second service pack for 6.0 enterprise customers. Apart from lost of small bug fixes, they included one welcome enhancement to the hooks system: overriding struts actions in a hook
Before SP2 we tried to move our custom code into hooks, which have the following structure:
- custom-jsps // Override for default Liferay JSP's
- portlets // New portlets
- java // New java code
Changed or added struts actions had to go in liferay-ext. Most of the time you’d want a struts action to call your java code inside your hook. However because the hook and liferay-ext live in different WAR-files you run into class loader problems.
Before SP2 we solved this by putting the shared java code in liferay-service-ext, which gets deployed into the tomcat lib directory and is therefore shared by all class loaders.
This will mean our code gets spread into 3 places:
- liferay-ext: the struts actions
- liferay-service-ext: shared java code
- my-hook: all other code
Liferay 6.0 EE SP2 allows us to move the struts actions into the hook, freeing both liferay-ext and liferay-service-ext of unnecessary code and both cleaning and simplifying our build structure a lot.
The community edition of Liferay will have to wait until Liferay 6.1 is out later this year.