From 6d4941c8dbebd260d8ab3c6aa9cce34d3366cdf2 Mon Sep 17 00:00:00 2001 From: wenyutang-ms Date: Thu, 7 Aug 2025 11:02:23 +0800 Subject: [PATCH 1/3] ci: jdk compile support jdk 24 --- scripts/buildJdtlsExt.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/buildJdtlsExt.js b/scripts/buildJdtlsExt.js index c6623dbf..401def35 100644 --- a/scripts/buildJdtlsExt.js +++ b/scripts/buildJdtlsExt.js @@ -7,7 +7,19 @@ const path = require('path'); const server_dir = path.resolve('jdtls.ext'); -cp.execSync(mvnw()+ ' clean package', {cwd:server_dir, stdio:[0,1,2]} ); +// Set JVM options to increase XML entity size limits +const jvmOptions = [ + '-Djdk.xml.maxGeneralEntitySizeLimit=0', + '-Djdk.xml.totalEntitySizeLimit=0', + '-Djdk.xml.maxElementDepth=0' +].join(' '); + +// Set MAVEN_OPTS environment variable with JVM options +const env = { ...process.env }; +env.MAVEN_OPTS = (env.MAVEN_OPTS || '') + ' ' + jvmOptions; + +const mvnCommand = `${mvnw()} clean package`; +cp.execSync(mvnCommand, {cwd:server_dir, stdio:[0,1,2], env: env} ); copy(path.join(server_dir, 'com.microsoft.jdtls.ext.core/target'), path.resolve('server'), (file) => { return /^com.microsoft.jdtls.ext.core.*.jar$/.test(file); }); From 14a1b22ba16e2d14b032c498541892402e7880ec Mon Sep 17 00:00:00 2001 From: wenyt <75360946+wenytang-ms@users.noreply.github.com> Date: Thu, 7 Aug 2025 11:12:11 +0800 Subject: [PATCH 2/3] Update scripts/buildJdtlsExt.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- scripts/buildJdtlsExt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/buildJdtlsExt.js b/scripts/buildJdtlsExt.js index 401def35..82406856 100644 --- a/scripts/buildJdtlsExt.js +++ b/scripts/buildJdtlsExt.js @@ -16,7 +16,7 @@ const jvmOptions = [ // Set MAVEN_OPTS environment variable with JVM options const env = { ...process.env }; -env.MAVEN_OPTS = (env.MAVEN_OPTS || '') + ' ' + jvmOptions; +env.MAVEN_OPTS = env.MAVEN_OPTS ? env.MAVEN_OPTS + ' ' + jvmOptions : jvmOptions; const mvnCommand = `${mvnw()} clean package`; cp.execSync(mvnCommand, {cwd:server_dir, stdio:[0,1,2], env: env} ); From d1bf2b0727c3f469a65cffd4b6214d238ee70ef6 Mon Sep 17 00:00:00 2001 From: wenyutang-ms Date: Thu, 7 Aug 2025 11:19:25 +0800 Subject: [PATCH 3/3] ci: update --- scripts/buildJdtlsExt.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/buildJdtlsExt.js b/scripts/buildJdtlsExt.js index 82406856..0785d8c4 100644 --- a/scripts/buildJdtlsExt.js +++ b/scripts/buildJdtlsExt.js @@ -8,10 +8,10 @@ const path = require('path'); const server_dir = path.resolve('jdtls.ext'); // Set JVM options to increase XML entity size limits +// JDK 24 contains changes to JAXP limits, see: https://bugs.openjdk.org/browse/JDK-8343022 const jvmOptions = [ '-Djdk.xml.maxGeneralEntitySizeLimit=0', - '-Djdk.xml.totalEntitySizeLimit=0', - '-Djdk.xml.maxElementDepth=0' + '-Djdk.xml.totalEntitySizeLimit=0' ].join(' '); // Set MAVEN_OPTS environment variable with JVM options