Upgrading to Liferay DXP 7.2 involves migrating your installation and code (your custom apps) to the new version. You’ll learn how to upgrade your code in this section.
These tutorials assume you’re using the Liferay Upgrade Planner. To follow along with this section, install the planner and step through the upgrade instructions. You can also use the planner to upgrade your data; this is a separate process that must be done independently from the code upgrade process.
For convenience, this tutorial section also references documentation and outlined steps to aid those opting to upgrade their code manually.
Here are the code upgrade steps:
-
Upgrade Your Development Environment
Legacy project environments should be upgraded to the latest version of Liferay Workspace to ensure you leverage all available features.
-
A Liferay Workspace is a generated environment that is built to hold and manage your Liferay projects. Create/import a workspace to get started.
-
If you don’t have an existing 7.x Liferay Workspace, you must create one. Skip to the next step if you have an existing workspace.
-
Import Existing Liferay Workspace
Import an existing Liferay Workspace. If you don’t have one, revisit the previous step.
-
-
Configure Liferay Workspace Settings
Set the Liferay DXP version in workspace’s configuration you intend to upgrade to.
-
Configure Workspace Product Key
Configure your workspace by setting a product key.
-
Download the Liferay DXP bundle you’re upgrading to.
-
Migrate .cfg Files to .config Files
Convert
.cfg
files to.config
files.
-
-
-
Copy your Plugins SDK projects into workspace and convert them to Gradle/Maven projects.
-
Import Existing Plugins SDK Projects
Import your existing Plugins SDK projects.
-
Migrate Existing Plugins to Workspace
Migrate your existing plugins to workspace. This involves moving the plugin to workspace and converting it to the workspace’s build environment.
-
-
Optimize your workspace’s build environment for the most efficient code upgrade experience.
-
Update your repository URL to Liferay’s frequently updated CDN repository.
-
Update Workspace Plugin Version
Update your Workspace plugin version to leverage the latest features of Liferay Workspace.
-
Remove the project’s dependency versions since it’s leveraging target platform.
-
-
Fix common upgrade problems dealing with your project’s dependencies and breaking changes.
-
Auto-correct straightforward upgrade problems.
-
Find upgrade problems. These are problems that cannot be auto-corrected; you can update them manually according to the breaking changes documentation.
-
Mark upgrade problems as resolved after addressing them.
-
After fixing your upgrade problems, remove the problem markers.
-
-
Upgrade Service Builder Services
Upgrade your Liferay Service Builder services.
-
Remove legacy files that are no longer leveraged by Service Builder.
-
Migrate from Spring DI to OSGi Declarative Services
Leverage OSGi Declarative Services in your Service Builder project.
-
Rebuild your project’s services to persist your updates.
-
-
Upgrade your customization plugins so they’re deployable to Liferay DXP 7.2.
-
Upgrade your themes so they’re deployable to Liferay DXP 7.2.
-
Upgrade your layout templates so they’re deployable to Liferay DXP 7.2.
-
-
Upgrade JNDI Data Source Usage
Use Liferay DXP’s class loader to access the app server’s JNDI API.
-
Upgrade Service Builder Service Invocation
For Service Builder logic remaining in a WAR, you must implement a service tracker to call services. For logic divided into OSGi modules, you can leverage Declarative Services.
-
Adapt your app to account for Service Builder-specific changes.
-
Migrate Off of Velocity Templates
Velocity template usage is deprecated for Liferay DXP 7.2. You should convert your template to FreeMarker.
-
-
Upgrade your portlets so they’re deployable to Liferay DXP 7.2.
-
Upgrade web plugins previously stored in the
webs
folder of your legacy Plugins SDK. -
Attempt to leverage an extension point instead of upgrading your Ext plugin. If an Ext plugin is necessary, you must review all changes between the previous Liferay Portal instance you were using and Liferay DXP 7.2, and then manually modify your Ext plugin to merge your changes with Liferay DXP’s.
Once you’ve finished the code upgrade steps, your custom apps will be compatible with Liferay DXP 7.2!