To regenerate the target platform’s capabilities (distro JAR) based on the current workspace’s Liferay DXP instance, follow the steps below:
-
Start the Liferay DXP instance stored in your workspace. Make sure the platform you want to depend on is installed.
-
Download the BND Remote Agent JAR file and copy it into the
osgi/modules
folder. -
From the root folder of your workspace, run the following command:
bnd remote distro -o custom_distro.jar release.portal.distro 7.2.0
Liferay DXP users must replace the
release.portal.distro
artifact name withrelease.dxp.distro
and use the7.2.10
version syntax.This connects to the newly deployed BND agent running in Liferay DXP and generates a new distro JAR named
custom_distro.jar
. All other capabilities inherit their functionality based on your Liferay DXP instance, so verify the workspace bundle is the version you plan to release in production. -
Navigate to your workspace’s root
build.gradle
file and add the following dependency:dependencies { targetPlatformDistro files('custom_distro.jar') }
Now your workspace is pointing to a custom distro JAR file instead of the
default one provided. Run the resolve
task to validate your modules against
the new set of capabilities.