Jenkins Liferay DXP Build Integration

Jenkins Liferay DXP Build Integration tutorial will explain build process or Liferay DXP modules using Gradle. As you all know Liferay DXP contains  OSGI modules and Liferay 7 PluginSDK. In this tutorial, we will see the build process for Liferay 7 OSGI modules using Gradle.


  • Apache tomcat
  • Jenkins 2.5.1
  • Gradle Plugin

Liferay 7 Modules Jenkins Integration:

  1. Jenkins Installation: Click on the below tutorial for Jenkins installation

    Jenkins setup and Installation

    Jenkins setup and  Installation What is Jenkins? Jenkins is open source server to automate build, test, and deployment of applications. Installations: Apache tomcat Jenkins 2.5.1 Jenkins Setup:READ MORE

  2. Jenkins Configuration Setup:  In this step, we will configure java, ant and maven with jenkins. Click on the below tutorial for Jenkins Configuration

    Jenkins Configuration Setup

    Jenkins Configuration Setup Jenkins setup tutorial will guide on installing Jenkins locally. In this tutorial we will manage Jenkins configuration.READ MORE

  3. Login to Jenkins and you will get the below home pageJenkins Home
  4. Click on “Create New Job” or “New Item”  from left menuLiferay DXP Jenkins Job
  5. In the General Tab, Give the Project Name and Description and click on “Advanced”
    Liferay 7 Build Job Configuration
  6. In this tutorial,we are not going get the code from SVN / GIT. We will use local liferay workspace folder that contains modules.
    • Check “use custom workspace”
    • Directory : Give the liferay-workspace path
    • Display Name: Give the display name
      Liferay workspace jenkins integration
  7. Leave the Source Code Management as we are not pulling code from SVN. Click on Build Triggers and you can configure how you want to trigger the build in this step. We will trigger the job manually from dashboard, so uncheck all options.
    jenkins build triggers
  8. Click on Build Tab and click on “Add Build Step” and the below options will available. Select “Invoke Gradle Script”
    Jenkins gradle build config
  9. Liferay workspace has already  gradle tasks and gradle wrapper to execute them. so select “User Gradle Wrapper” .
  10. In  “Wrapper Location”, provide liferay workspace location path as it  contains “gradlew”  at root directory. Leave remaining configuration as empty
  11. In the task, we can provide multiple tasks. Give Clean and deploy tasks as shown below and click on save.
    jenkins gradle build step
  12. Liferay gradle build job has completed and you will get the jobs in home page like below. Click on Stat button in “Liferay DXP Workspace”
    jenkins home
  13. You can that a thread start executing job and we can track status in “Build Executor Status”. Click on the link and click again “Console output”jenkins job status
  14. You can see logs in Console Output
    Gradle tasks


Now you can find the generated jar files in  liferay-workspace/bundles/osgi/modules directory. you can use “copy artifacts” in post build action to move these jars to local and SSH plugin to copy these to remove server for deployment. We will see these tutorials in next . Hope this helps!!1

1 Comment

  1. Anji

    Hi Team ,

    WOW …
    Its really helpful information .
    We are trying to configure Jenkins and you blog saved lot of time.


Leave a Comment

Your email address will not be published. Required fields are marked *