Upgrading Plugins to Liferay DXP 7.0

Upgrading to Liferay DXP 7.0 involves migrating your installation and code (your custom apps) to the new version. You’ll learn how to upgrade your code in this section.

The first upgrade process step is to adapt your existing plugin’s code to Liferay DXP 7.0’s APIs. The great news is that Liferay’s Upgrade Planner makes this easier than ever. It identifies Liferay API changes affecting your code, explains the API changes, and offers resolution steps. And the tool offers auto-correction where it can.

You might be tempted to optimize your existing plugins right away to benefit from the new things Liferay DXP offers, but you shouldn’t. It’s much better to upgrade your plugins according to these tutorials. In this way, you’ll get your plugins running in Liferay as fast as possible, and at the same time you’ll have prepared the plugins for the optimizations you can implement later.

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.

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:

  1. Upgrade Your Development Environment

    Legacy project environments should be upgraded to the latest version of Liferay Workspace to ensure you leverage all available features.

    1. Set Up Liferay Workspace

      A Liferay Workspace is a generated environment that is built to hold and manage your Liferay projects. Create/import a workspace to get started.

      1. Create New Liferay Workspace

        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.

      2. Import Existing Liferay Workspace

        Import an existing Liferay Workspace. If you don’t have one, revisit the previous step.

    2. Configure Liferay Workspace Settings

      Set the Liferay DXP version in workspace’s configuration you intend to upgrade to.

      1. Configure Bundle URL

        Configure your bundle URL that the Liferay DXP bundle is downloaded from.

      2. Configure Target Platform Version

        Configure your Target Platform version, which provides the specific artifacts associated with a Liferay DXP release.

      3. Initialize Server Bundle

        Download the Liferay DXP bundle you’re upgrading to.

  2. Migrate Plugins SDK Projects

    Copy your Plugins SDK projects into workspace and convert them to Gradle/Maven projects.

    1. Import Existing Plugins SDK Projects

      Import your existing Plugins SDK projects.

    2. 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.

  3. Upgrade Build Dependencies

    Optimize your workspace’s build environment for the most efficient code upgrade experience.

    1. Update Repository URL

      Update your repository URL to Liferay’s frequently updated CDN repository.

    2. Update Workspace Plugin Version

      Update your Workspace plugin version to leverage the latest features of Liferay Workspace.

    3. Remove Dependency Versions

      Remove the project’s dependency versions since it’s leveraging target platform.

  4. Fix Upgrade Problems

    Fix common upgrade problems dealing with your project’s dependencies and breaking changes.

    1. Auto-Correct Upgrade Problems

      Auto-correct straightforward upgrade problems.

    2. Find Upgrade Problems

      Find upgrade problems. These are problems that cannot be auto-corrected; you can update them manually according to the breaking changes documentation.

    3. Resolve Upgrade Problems

      Mark upgrade problems as resolved after addressing them.

    4. Remove Problem Markers

      After fixing your upgrade problems, remove the problem markers.

    5. Resolving a Plugin’s Dependencies

    6. Resolving Breaking Changes

  5. Upgrade Customization Plugins

    Upgrade your customization plugins so they’re deployable to Liferay DXP 7.0.

    1. Upgrade Customization Modules

    2. Upgrade Core JSP Hooks

    3. Upgrade Portlet JSP Hooks

    4. Upgrade Service Wrapper Hooks

    5. Upgrade Core Language Key Hooks

    6. Upgrade Portlet Language Key Hooks

    7. Upgrade Model Listener Hooks

    8. Upgrade Event Action Hooks

    9. Upgrade Servlet Filter Hooks

    10. Upgrade Portal Properties Hooks

    11. Upgrade Struts Action Hooks

  6. Upgrade Themes

    Upgrade your themes so they’re deployable to Liferay DXP 7.0.

    1. Upgrading Your Theme from Liferay Portal 6.1 to 7.0

    2. Upgrading Your Theme from Liferay Portal 6.2 to 7.0

  7. Upgrade Layout Templates

    Upgrade your layout templates so they’re deployable to Liferay DXP 7.0.

  8. Upgrade Frameworks & Features

    1. Upgrade JNDI Data Source Usage

      Use Liferay DXP’s class loader to access the app server’s JNDI API.

    2. 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.

    3. Upgrade Service Builder

      Adapt your app to account for Service Builder-specific changes.

    4. Migrate Off of Velocity Templates

      Velocity template usage is deprecated for Liferay DXP 7.0. You should convert your template to FreeMarker.

  9. Upgrade Portlets

    Upgrade your portlets so they’re deployable to Liferay DXP 7.0.

    1. Upgrade Generic Portlets

    2. Upgrade Liferay MVC Portlets

    3. Upgrade JSF Portlets

    4. Upgrade Servlet-based Portlets

    5. Upgrading Spring MVC Portlets

    6. Upgrade Struts Portlets

  10. Upgrade Web Plugins

    Upgrade web plugins previously stored in the webs folder of your legacy Plugins SDK.

  11. Upgrade Ext Plugins

    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.0, 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.0!

« Planning Plugin Upgrades and OptimizationsUpgrading Your Development Environment »
¿Fue útil este artículo?
Usuarios a los que les pareció útil: 0 de 0