Patching Liferay Source Code

      No Comments on Patching Liferay Source Code

In Liferay development, it’s very useful to have Source Code available to you for the purpose of troubleshooting and debugging. This is especially useful when you get an error in the log on the server with a stack trace and a line number. With the source code, you can always look at the code and investigate in detail the root cause of the error. You can always download the Source Code of your portal from and setup with your IDE(this is useful for local debugging with breakpoints)

However, this becomes challenging when you have Liferay EE subscription and you have applied patches to your portal. It is possible that your source code is out-of-date/out-of-sync with your deployed portal code. Luckily, Liferay patching tool provides you a way to patch your source code.

To begin, go to your patching-tool directory

Step 1:
cd ${LIFERAY_HOME}/patching-tool
Step 2:

Create a new profile to be used for patching the source code. To achieve this create under patching-tool directory


In the above example, we have set a patching mode and location of the source code which has to be patched. For more details refer to the documentation or run ./ help

Step 3

Run the patching tool with the custom profile created in above step. Since the name of our file was our profile name is patch-source

./ patch-source install

Leave a Reply

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