Issue
- Deploying an EXT extension results in the extension being lost after the environment restarts.
Environment
- Quarterly Releases 2023.Q3.3+.
- PaaS
Resolution
- The use of EXT modules is discouraged. Please explore alternative extensions before proceeding, if possible.
- Starting from 2023.q3.3+, the marketplace/override is no longer used so you will need to create a custom deployment script to deploy it.
- Create the directory
liferay/configs/common/custom-portal/and place the compiled<ext-module>.jar(renamed without the version) into this directory. - Create the
deployExtOverride.shscript in theliferay/configs/common/scripts/pre-startup/directory and deploy it.
- Create the directory
- In the future, ext modules are expected to be deployable without the need for a custom script (LPD-19756)
deployExtOverride.sh
#!/usr/bin/env bash
# (1) Remove old ext module placement
rm -f /opt/liferay/osgi/marketplace/override/<ext-module>.jar
# (2) Replace the module
mv /opt/liferay/osgi/portal/<ext-module>.jar /opt/liferay/osgi/portal/<ext-module>.jar.old
mv /opt/liferay/custom-portal/<ext-module>.jar /opt/liferay/osgi/portal/<ext-module>.jar
# (3) Clean
rm -Rf /opt/liferay/custom-portal/