Skip to content

Commit 0565240

Browse files
wenytang-msCopilot
andauthored
ci: jdk compile support jdk 24 (#886)
* ci: jdk compile support jdk 24 * Update scripts/buildJdtlsExt.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * ci: update --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 1c9e83b commit 0565240

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

scripts/buildJdtlsExt.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,19 @@ const path = require('path');
77

88
const server_dir = path.resolve('jdtls.ext');
99

10-
cp.execSync(mvnw()+ ' clean package', {cwd:server_dir, stdio:[0,1,2]} );
10+
// Set JVM options to increase XML entity size limits
11+
// JDK 24 contains changes to JAXP limits, see: https://bugs.openjdk.org/browse/JDK-8343022
12+
const jvmOptions = [
13+
'-Djdk.xml.maxGeneralEntitySizeLimit=0',
14+
'-Djdk.xml.totalEntitySizeLimit=0'
15+
].join(' ');
16+
17+
// Set MAVEN_OPTS environment variable with JVM options
18+
const env = { ...process.env };
19+
env.MAVEN_OPTS = env.MAVEN_OPTS ? env.MAVEN_OPTS + ' ' + jvmOptions : jvmOptions;
20+
21+
const mvnCommand = `${mvnw()} clean package`;
22+
cp.execSync(mvnCommand, {cwd:server_dir, stdio:[0,1,2], env: env} );
1123
copy(path.join(server_dir, 'com.microsoft.jdtls.ext.core/target'), path.resolve('server'), (file) => {
1224
return /^com.microsoft.jdtls.ext.core.*.jar$/.test(file);
1325
});

0 commit comments

Comments
 (0)