Bug when switching to JDK 11.0.20 and Invalid CEN header

Issue

We have discovered a bug in one of the tools that we use to publish artifacts leaving us with artifacts in our Nexus repositories/Maven Central with this bug. When users switch to JDK 11.0.20, it actually checks for this and when it detects the error, it actually does not download the affected artifacts. However, the skipping of the download is not properly passed to Gradle and thus Gradle will cache an empty jar leaving us with ClassNotFound issues in Liferay Workspace.

Environment

  • DXP 7.0
  • DXP 7.1
  • DXP 7.2
  • DXP 7.3
  • DXP 7.4

Resolution

  • We have fixed by updating the bugged tool (to name: "biz.aQute.bnd", version: "5.3.0") and republished the offending artifact in Liferay Workspace and you can apply the fix (name: "com.liferay.portal.tools.bundle.support", version: "3.7.4") directly in settings.gradle like this:
buildscript {
dependencies {
classpath group: "org.yaml", name: "snakeyaml", version: "1.32"

classpath group: "biz.aQute.bnd", name: "biz.aQute.bnd", version: "5.3.0"

classpath group: "com.liferay", name: "com.liferay.portal.tools.bundle.support", version: "3.7.4"


classpath(group: "com.liferay", name: "com.liferay.gradle.plugins.workspace", version: "7.0.1") {

exclude group: "biz.aQute.bnd", module: "biz.aQute.bnd"
exclude group: "com.liferay", module: "com.liferay.portal.tools.bundle.support"
}
classpath group: "net.saliman", name: "gradle-properties-plugin", version: "1.4.6"
}

repositories {
mavenLocal()

maven {
url "https://repository-cdn.liferay.com/nexus/content/groups/public"
}
}
}

apply plugin: "com.liferay.workspace"

** Note Workspace v7.0.1 is the last version that will work with Gradle 6.

If you’re ready to move onto Gradle 7, then you can just update your Workspace to the latest (As of 8/25, that would be v8.0.6)

buildscript {
dependencies {
classpath group: "org.yaml", name: "snakeyaml", version: "1.32"

classpath group: "com.liferay", name: "com.liferay.gradle.plugins.workspace", version: "8.0.6"

}

repositories {
mavenLocal()

maven {
url "https://repository-cdn.liferay.com/nexus/content/groups/public"
}
}
}

apply plugin: "com.liferay.workspace"

 

For BLADE CLI

BLADE CLI users will notice an error like this:

Error: Could not find or load main class com.liferay.blade.cli.BladeCLI
Caused by: java.lang.ClassNotFoundException: com.liferay.blade.cli.BladeCLI

This has been fixed as of BLADE CLI v 5.0.0

Please run blade update to get the latest version.

 

Additional Information

 

Was this article helpful?
0 out of 0 found this helpful