Skip to content

Commit 6d4941c

Browse files
committed
ci: jdk compile support jdk 24
1 parent 1c9e83b commit 6d4941c

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+
const jvmOptions = [
12+
'-Djdk.xml.maxGeneralEntitySizeLimit=0',
13+
'-Djdk.xml.totalEntitySizeLimit=0',
14+
'-Djdk.xml.maxElementDepth=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 || '') + ' ' + 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)