Here you’ll learn how to run Service Builder. If want to use Service Builder in
your application but haven’t yet
service.xml file that defines an object-relational map for you application,
make sure to do so before proceeding.
Open a command line and navigate to your application folder (the folder that
To build your services using Gradle, enter the following command:
blade gw buildService
gw command works in any project that has a Gradle Wrapper available to
it. Projects generated using Liferay project templates have a Gradle Wrapper.
If you’re using Maven, build the services by running the following command:
mvn service-builder:build command only works if you’re
com.liferay.portal.tools.service.builder plugin version 1.0.145+.
Maven projects using an earlier version of the Service Builder plugin should
update their POM accordingly. More information is available on
using Maven to run Service Builder.
On successfully building the services, Service Builder prints the message
BUILD SUCCESSFUL. Many generated files appear in your project. They represent a model
layer, service layer, and persistence layer for your entities. Don’t worry about
the number of generated files—they’re explained in the next article, where you
can review the code Service Builder generates for your entities.