From e2406d740bd6731ff21635705983a0738b6d44bb Mon Sep 17 00:00:00 2001 From: nik Date: Mon, 3 Dec 2012 19:23:01 +0400 Subject: [PATCH] external build: add jps plugins to classpath when IDEA is started by a plugin run configuration --- .../compiler/server/impl/CompileServerClasspathManager.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/java/compiler/impl/src/com/intellij/compiler/server/impl/CompileServerClasspathManager.java b/java/compiler/impl/src/com/intellij/compiler/server/impl/CompileServerClasspathManager.java index fb9d17c4cafe..f95d151d6b43 100644 --- a/java/compiler/impl/src/com/intellij/compiler/server/impl/CompileServerClasspathManager.java +++ b/java/compiler/impl/src/com/intellij/compiler/server/impl/CompileServerClasspathManager.java @@ -73,9 +73,14 @@ public class CompileServerClasspathManager { else if (baseFile.isDirectory()) { for (String relativePath : StringUtil.split(serverPlugin.getClasspath(), ";")) { final File jarFile = new File(new File(baseFile, "lib"), relativePath); + File classesDir = new File(baseFile, "classes"); if (jarFile.exists()) { classpath.add(jarFile.getPath()); } + else if (classesDir.isDirectory()) { + //'plugin run configuration': all module output are copied to 'classes' folder + classpath.add(classesDir.getPath()); + } else { //development mode: add directory out/classes/production/ to classpath, assuming that jar-name is equal to module name final String moduleName = FileUtil.getNameWithoutExtension(PathUtil.getFileName(relativePath));