Configuring the Patching Tool

Configuring the Patching Tool


The Patching Tool can be adapted to any DXP installation. The tool’s auto-discovery option is the easiest way to configure the Patching Tool. If you installed DXP on an application server or if you need to proxy Patching Tool requests, you can configure the Patching Tool manually.


Automatic Configuration Using auto-discovery

The Patching Tool’s auto-discovery command scans for DXP files and writes their paths to a properties file that it uses for patching.

Follow these steps to configure the Patching Tool automatically:

  1. Open a command line to your patching-tool folder:

    cd patching-tool
  2. Run the auto-discovery command.

    If Liferay Home is the Patching Tool’s parent folder, run this command:

    ./ auto-discovery

    If Liferay Home is in a different location, specify the Liferay Home path to the command:

    ./ auto-discovery [path to Liferay Home]

The tool writes the configuration to the file

If you specify the wrong path to Liferay Home or if Liferay Home is not in the parent folder, the Patching Tool reports an error:

The .liferay-home has not been detected in the given directory tree.

liferay.home=**[please enter manually]**

The configuration hasn't been saved. Please save this to the file.

Resolve the issue in one of these ways:

  • If the Liferay Home is in the Patching Tool’s tree, create a .liferay-home file in the Liferay Home folder and re-run the auto-discovery command.
  • Specify the Liferay Home path in the liferay.home property in your properties file (e.g.,

Testing the Configuration

When the Patching Tool is configured, running the info command reports all product information and patch information like this:

/patching-tool>./ info
Loading product and patch information...
Product information:
  * build number: 7310
  * service pack version:
    - available SP version: 1
    - installable SP version: 1
  * patching-tool version: 3.0.5
  * time: 2020-09-01 14:02Z
  * host: 91WRQ72 (8 cores)

If the information isn’t correct, edit the configuration manually.

Manual Configuration

Edit the Patching Tool properties file. The auto-discovery command creates a file by default or creates the file (e.g., Patching Profile) you specify to it.

General Properties

Property Description
global.lib.path Specifies the location for storing .jar files on the global classpath. Hint: portal-kernel.jar is on the global classpath.

In DXP 7.2, global.lib.path is only used if patching.mode is binary.
liferay.home Specifies the Liferay Home folder, which is typically the parent folder to DXP’s osgi and tools folders.
module.framework.core.path Path to DXP’s osgi/core folder.
module.framework.marketplace.path Path to DXP’s osgi/marketplace folder.
module.framework.modules.path Path to DXP’s osgi/modules folder.
module.framework.portal.path Path to DXP’s osgi/portal folder.
module.framework.static.path Path to DXP’s osgi/static folder.
patches.folder Specifies where to store patches. The default location is ./patches.
patching.mode (DXP 2.0 only) Patches contain updated binary and source files. The mode determines which file type to apply.

* binary (the default): For updating your DXP installation.
* source: For updating source trees that extend DXP.
source.path (DXP 2.0 only) Specifies the DXP source tree location. source.path is only used when patching-mode is source.
war.path Specifies the path to your DXP web application (the path to its exploded folder structure or to its .war file).

Proxy Settings

Service Pack detection is available behind a proxy server. To configure your proxy, use one of the following setting groups and replace all of the values, including [PROXY_IP_ADDRESS]:

### Proxy settings




Using Patching Profiles

You can create profiles for multiple runtimes by running auto-discovery or creating profiles manually. To auto-discover a DXP runtime, run the Patching Tool with parameters like this:

./ [name of profile] auto-discovery [path/to/Liferay Home]

This runs the same discovery process and writes the profile information to a file called [name of profile].properties. Alternatively, you can create and edit profile property files in your patching-tool folder.

Once you’ve created a profile, you can use it in your Patching Tool commands. For example, this command installs a patch using a profile file called

./ test-server install

Additional Information