Thursday 20 June 2013

Liferay Maven : Service Builder Version 1

Introduction:-
I have been trying to build-service using maven one of the method was here. since, I myself found some issues with it I tried to do it afresh.

Issues were actually because of the fact that the maven-sdk there may be doesn't have the liferay service-builder archetype.

(I haven't deleted the post, may be I can improve and do something with that too)
Begining with the new approach.


Prerequisites:-
>> Download maven-support.zip from here.
>> In your command prompt/Terminal window, type mvn archetype:generate

Steps:-
1. Create a new portlet as shown here and at step 3 select liferay service builder archetype



























2. You'll see structure as following




3. Now open command prompt/Terminal window

4. Change the path directory to your ${workspace}/servicedemo

5. Do mvn clean liferay:build-service

6. Then mvn clean install liferay:deploy

Thats all, Your portlet is ready with the DAO layer and the service implementation

Note: Please check your pom.xml for all three folders in eclipse for ${liferay-version}, ${auto.deploy.dir} etc and change it according to your paths and specification values.

No comments:

Post a Comment