Maven Liferay Portlet v5.xx Kick Start

The following article will try to speed up your development. I had just prepare the empty maven project structure. Download the project from here and run the maven command.

Preparation

  1. Extract the zip file into your workspace.
  2. Open the command dos, point to your workspace and run mvn clean eclipse:eclipse
  3. Web project’s pom file will act as parent pom’s. Additional library should added to parent pom.
  4. Sub-project should refer to the parent pom file with version parameter.
  5. If the library already exist in liferay, dependency should add scope as provided
  6. Add the libaray reference to liferay-plugin-package.

Example

Your portal dependency file :

  1. portal-dependency-jars=\commons-beanutils.jar,\ commons-collections.jar,\ commons-configuration.jar,\commons-digester.jar,\ commons-lang.jar,\ commons-validator.jar,\

Your sub-project pom file should be

  1.         commons-lang
  2.         commons-lang
  3.         ${commons-lang-version}
  4.         provided

Sample File

Download the project here

You can leave a response, or trackback from your own site.

Leave a Reply

Security Code: