Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
Jelmer Kuperus
Why doesn't the sdk call build-service on hooks
July 15, 2010 1:56 AM

Jelmer Kuperus

Rank: Liferay Legend

Posts: 1192

Join Date: March 10, 2010

Recent Posts

When you exectute the build-service ant target in the root of the sdk
It only builds services for portlet and webs modules

Here's an excerpt from the build.xml file that shows this behaviour

<target name="build-service">
<ant dir="portlets" target="build-service" inheritAll="false" />
<ant dir="webs" target="build-service" inheritAll="false" />

Can someone explain why this is ?

Is this an oversight on the part of liferay or is it a bad practice to define a service in for instance a hook ?

What we did is, define a model listener in hook, that writes some events to the databasse via a service generated by service builder. That seems like a reasonable use case to me