mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[jps] IDEA-376790 Do not fall back to IDE runtime JDK for non‑local builds
Stop using the local IDE runtime JDK as a fallback when the project builds remotely (Docker/SSH/WSL). This avoids launching the build with a JDK that cannot run on the target machine and prevents hard‑to‑diagnose failures. When no compatible remote JDK is found, we now fail fast. Existing local and WSL‑specific behavior remains unchanged. (cherry picked from commit 3e27c308520d3522572fdfc2ee57e4d6c4e2ab63) IJ-CR-179667 GitOrigin-RevId: a3958d861960083811dee737e11a7450009a5863
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6afeb32486
commit
6e297dc81d
@@ -1188,7 +1188,12 @@ public final class BuildManager implements Disposable {
|
||||
.min(Map.Entry.comparingByValue())
|
||||
.map(p -> Pair.create(p.getKey(), JavaSdkVersion.fromJavaVersion(p.getValue())))
|
||||
.filter(p -> p.second != null)
|
||||
.orElseGet(BuildManager::getIDERuntimeSdk);
|
||||
.orElseGet(() -> {
|
||||
if (canUseEel() && !EelPathUtils.isProjectLocal(project)) {
|
||||
throw new IllegalStateException(JavaCompilerBundle.message("build.manager.launch.build.process.failed.to.find.compatible.jdk"));
|
||||
}
|
||||
return getIDERuntimeSdk();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user