Auto mechanics, enthusiasts, and prospective owners ask about cars, “What’s under the hood?” Here are common reasons for asking that question:
- Concern about an issue
- Curiosity about the car’s capability and inner-workings
- Desire to improve or customize the car
You might have similar reasons for asking “What’s under DXP’s hood?” And since you get access to DXP Digital Enterprise (DXP)’s source code, you can attach a debugger and see it in action! Setting up the code locally is your ticket to exploring DXP, investigating issues, and making improvements and customizations.
Download DXP, the DXP source code, and patches
Patch the DXP source code
Step 1: Download DXP, the DXP source code, and patches
Download a DXP bundle (or DXP JARs) and the DXP source code for the version you’re using from the customer portal.
Download fix packs and their source code from here. Fix pack ZIP files that end in
-src.zipcontain a fix pack and source code.
Next install and configure DXP. DXP’s patching tool lets you install fix packs and fix pack source code. If you have a patched DXP installation already and want to use it, skip to the section below on patching the DXP source code.
Step 2: Prepare DXP
Preparing DXP locally involves installing, configuring, and patching DXP.
Install and Configure DXP
Here’s how to install and configure DXP:
Install and Deploy DXP locally.
Configure DXP to use your database.
It’s time apply the DXP patches you want.
Here’s how to patch DXP:
Copy all the patch ZIP files you want to
-src.zipfix pack files are best to use because they contain both the fix pack binaries and source code.
Open a command line to
Run the command
patching-tool.sh auto-discoveryto generate the default patching profile called
default.properties. Make sure the profile’s properties refer to your DXP installation. See the patching tool documentation for more details.
Here’s an example profile:
patching.mode=binary war.path=../tomcat-9.0.6/webapps/ROOT/ global.lib.path=../tomcat-9.0.6/lib/ext/ liferay.home=../
To list all the patch files available in
[LIFERAY_HOME]/patching-tool/patches, execute the following command:
Execute this command to install the patches:
The patching tool documentation describes additional steps that might apply to your situation, such as creating database indexes.
It’s time to prepare the DXP source code and patch source code.
Step 3: Patch the DXP Source Code
Unzip the DXP source code to where you want to work with it.
Next you’ll create a patching tool profile for your DXP source code.
Create a Patching Tool Profile for the Source Code
Here’s how to create a profile that refers to your source code.
Execute the following command to create a profile. Replace
[profile]with a name for your profile.
patching-tool.sh auto-discovery [profile]
In the profile properties file generated in the previous step, set the
sourceand set the
source.pathproperty to your source code path:
patching.mode=source source.path=[DXP source code path]
It’s time to apply the DXP patches you downloaded earlier.
Patch the Source Code
DXP’s patching tool is safe and easy to use. Beyond installing patches, it has these functions:
- List a patch’s code changes
- List the issues (LPS/LPE tickets) a patch fixes
- Revert a patch
See the following patching tool documentation for more details:
The patching tool installs all patches and patch source code from the ZIP files
it finds in
[LIFERAY_HOME]/patching-tool/patches. All your patches must be in
patches folder for the patching tool to apply them.
Copy all the patch source ZIP files to
[LIFERAY_HOME]/patching-tool/patchesif you haven’t already copied them there.
infocommand to make sure it lists your patches. If a patch isn’t listed, copy its ZIP file into the
[profile]with your DXP source code profile name:
patching-tool.sh [profile] info
Apply the patches by executing the
installcommand on your profile:
patching-tool.sh [profile] install
Your DXP installation and source code is patched and ready to debug!
Attach your favorite debugger to your DXP instance and start the server. See your debugger’s documentation for configuration details.
Congratulations! You’re free to explore DXP inside and out!