build.xml - contains targets to invoke in the SDK.
build-common.xml - contains common targets and properties referenced throughout the SDK.
build-common-plugin.xml - contains common targets and properties referenced by each plugin.
build-common-plugins.xml - contains common targets and properties referenced by each plugin type.
New plugins are placed in their own subdirectory of the appropriate plugin type. For instance, a new portlet called “greeting-portlet” would reside in liferay-plugins-[version]/portlets/greeting-portlet.
There’s an Ant build file (build.xml) in each of the plugins directories. Here are some Ant targets you’ll commonly use in developing your plugins:
build-service - builds the service layer for a plugin, using Liferay Service Builder.
clean - cleans the residual files created by the invocations of the compilation, archiving, and deployment targets.
compile - compiles the plugin source code.
deploy - builds and deploys the plugin to your application server.
format-source - formats the source code per Liferay’s source code guidelines, informing you of violations that must be addressed. See the Development Sytle community wiki page for details.
format-javadoc - formats the Javadoc per Liferay’s Javadoc guidelines. See the Javadoc Guidelines community wiki page for details.
Next, let’s consider some best practices for developing plugins using the SDK.