diff --git a/java/java-build/maven/ai/openidea/javac/maven/BuildModel.java b/java/java-build/maven/ai/openidea/javac/maven/BuildModel.java index 91861951d..abe3ee604 100644 --- a/java/java-build/maven/ai/openidea/javac/maven/BuildModel.java +++ b/java/java-build/maven/ai/openidea/javac/maven/BuildModel.java @@ -303,7 +303,11 @@ public final class BuildModel extends AbstractMavenLifecycleParticipant { json.append("}}"); } - /** The classpaths of the resolved graph, in Maven's order: compile, runtime, test scopes. */ + /** + * The classpaths of the resolved graph, in Maven's order: compile, runtime, test scopes. A + * {@code system} jar is on the runtime classpath too: it is an explicit file the launched JVM + * must load (IDEA imports the scope as Compile), while {@code provided} is the container's. + */ private static void classpaths(DependencyNode root, List compile, List runtime, List test) { List nodes = new ArrayList<>(); collect(root, nodes, new HashSet<>()); @@ -314,7 +318,7 @@ public final class BuildModel extends AbstractMavenLifecycleParticipant { String scope = node.getDependency().getScope(); String path = file.getAbsolutePath(); if (!"test".equals(scope) && !"runtime".equals(scope)) compile.add(path); - if (!"test".equals(scope) && !"provided".equals(scope) && !"system".equals(scope)) runtime.add(path); + if (!"test".equals(scope) && !"provided".equals(scope)) runtime.add(path); test.add(path); } } diff --git a/java/java-build/openidea-java-build.jar b/java/java-build/openidea-java-build.jar index be916598d..f262620be 100644 Binary files a/java/java-build/openidea-java-build.jar and b/java/java-build/openidea-java-build.jar differ