Skip to content

Commit bf16b31

Browse files
authored
fix: fix build failure for xml size limit (#1815)
1 parent 4b3d1b3 commit bf16b31

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/buildJdtlsExt.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ const bundleList = [
2828
'org.apiguardian.api',
2929
'org.jacoco.core'
3030
];
31-
cp.execSync(`${mvnw()} clean verify`, { cwd: serverDir, stdio: [0, 1, 2] });
31+
// Set MAVEN_OPTS to disable XML entity size limits for JDK XML parser
32+
const env = { ...process.env };
33+
env.MAVEN_OPTS = (env.MAVEN_OPTS || '') + ' -Djdk.xml.maxGeneralEntitySizeLimit=0 -Djdk.xml.totalEntitySizeLimit=0 -DentityExpansionLimit=0';
34+
cp.execSync(`${mvnw()} clean verify`, { cwd: serverDir, stdio: [0, 1, 2], env });
3235
copy(path.join(serverDir, 'com.microsoft.java.test.plugin/target'), path.resolve('server'), (file) => path.extname(file) === '.jar');
3336
copy(path.join(serverDir, 'com.microsoft.java.test.runner/target'), path.resolve('server'), (file) => file.endsWith('jar-with-dependencies.jar'));
3437
copy(path.join(serverDir, 'com.microsoft.java.test.plugin.site/target/repository/plugins'), path.resolve('server'), (file) => {

0 commit comments

Comments
 (0)