Targeting Quarterly Releases

I have to start with an apology. I'm publishing this blog early because parts are ready to go now but some parts are not yet ready. I felt it was too important to hold off waiting for the final parts to be ready before publishing...

This will be a living blog post, it will get updates on it as soon as I hear something different, but in the mean time the content that is here is worth sharing sooner rather than later...

So Liferay has been doing quarterly releases of DXP for some time now. 2023 Q3 was the first quarterly release, followed by 2023 Q4, and recently we released 2024 Q1.

However, there hasn't been a way to target those releases in a Liferay workspace. You had to target U92 instead of 2023.Q3, U102 instead of 2023.Q4, and U112 instead of 2024.Q1.

We have finally finished the tooling updates to support targeting the Q releases.

To target them in your own workspaces will involve the following...

Update Blade

There is a new update to Blade that will allow it to list the quarterly releases and allow you to pick a release when initializing a new workspace.

To update blade, from the command line issue the blade update command and it will take care of the rest.

You'll be updated to Blade version 6.0:

$ blade version
blade version 6.0.0.202404102137

With this version of Blade in place, you'll now see the quarterly releases and can use them as targets:

$ blade init testing
Error: The command init is missing required parameters.
The following option is required: [-v | --liferay-version] The Liferay product to 
  target. Typing "more" will show all product versions.
1: dxp-2024.q1.4
2: dxp-2023.q4.8
3: portal-7.4-ga112
4: dxp-2023.q3.9
5: dxp-7.3-u35
6: dxp-7.2.8
7: portal-7.3-ga8
8: portal-7.2-ga2
>

Update IDE Plugins

Whether using Intellij, Eclipse, Liferay IDE, or Liferay Developer Studio, you'll need to update the Liferay plugins to make them aware of the new Blade and new quarterly releases.

I'm not going to go into instructions here, refer to your tool of choice to update the plugins.

Actually these updates are not yet ready and, if I have my way, might never be ready. See https://liferay.dev/blogs/-/blogs/ides-to-be-or-not-to-be why the updates might not happen.

I don't know when/if they will get updated, but I didn't want to hold the blog post waiting to see.

Update Liferay Workspace Plugin Version

In your Gradle workspaces, you need to update the version of the Liferay Workspace plugin.

Open the settings.gradle file and set the version of the com.liferay.gradle.plugins.workspace line item to 10.0.2 (or newer, if available).

To find the latest available version, check here: https://repository-cdn.liferay.com/nexus/content/repositories/liferay-public-releases/com/liferay/com.liferay.gradle.plugins.workspace/. Note that the list is sorted alphabetically, not numerically, so be careful looking for the 10.x versions.

Note that if you have an older Gradle 6 (or earlier) workspace, you will need to update it to use Gradle 7 instead. You can find instructions for upgrading to Gradle 7 here: https://liferay.dev/blogs/-/blogs/gradle-7-is-here

Developers sometimes report missing artifacts from mvnrepository.com. We try to keep mvnrepository.com up to date, but have faced issues in the past that left mvnrepository.com out of sync. The official position is that developers should use and rely upon repository-cdn.liferay.com for all Liferay artifacts and we do not guarantee mvnrepository.com will be maintained in a timely fashion or up to date.

Update Workspace Product

The final requirement is to modify the gradle.properties file so you can target a quarterly release.

In the file, you're going to be setting a line like:

liferay.workspace.product=dxp-2024.q1.1

The other quarterly releases from 2023 Q3 and 2023 Q4 are also available. If a specific version you need is not available, open a support ticket to request it.

To find the available workspace product values, check here: https://releases.liferay.com/releases.json

What to do before IDE Updates

As I stated at the top of the blog, I've posted this early...

At this point in time the IDEs/plugins have not yet been updated.

However, you can still target the quarterly releases... Here's the steps:

  1. Make sure blade has been updated to version 6.0 or later.
  2. Use blade to create your new workspace, or for existing workspaces, edit the settings.gradle file, change the workspace plugin to 10.0.2 (or newer).
  3. Edit the gradle.properties file and set the liferay.workspace.product key as outlined in the previous section.

This will either create a new workspace (ready to import into your IDE) or update your existing workspace that you already have in the IDE.

Rely on the Blade command line for creating new modules, building, etc. Then use the refresh option in the IDE to update the IDE to be aware of the changes you've made.

When facing errors reported in the IDE that don't make sense, try doing the build using the gradle wrapper in the workspace; if it builds from gradlew, it means your code is fine and it's just the IDE not dealing with the quarterlies well yet.

This is a short-term workaround until the IDEs/plugins have been updated. When that happens, these instructions will no longer be necessary.