IDEA-71000: Building plugin zip should not include dependencies with scope 'provided' into the zip file

This commit is contained in:
nik
2011-06-15 15:07:31 +04:00
parent 765d5e4f01
commit d40521434f
+14 -7
View File
@@ -59,14 +59,17 @@ public class PluginBuildUtil {
return sandboxHome + File.separator + "plugins" + File.separator + module.getName();
}
public static void getDependencies(Module module, Set<Module> modules) {
for (Module dependency : ModuleRootManager.getInstance(module).getDependencies()) {
if (dependency.getModuleType() == StdModuleTypes.JAVA) {
if (modules.add(dependency)) {
getDependencies(dependency, modules);
public static void getDependencies(Module module, final Set<Module> modules) {
productionRuntimeDependencies(module).forEachModule(new Processor<Module>() {
@Override
public boolean process(Module dep) {
if (dep.getModuleType() == StdModuleTypes.JAVA && !modules.contains(dep)) {
modules.add(dep);
getDependencies(dep, modules);
}
return true;
}
}
});
}
public static Module[] getWrongSetDependencies(final Module module) {
@@ -85,7 +88,7 @@ public class PluginBuildUtil {
}
public static void getLibraries(Module module, final Set<Library> libs) {
ModuleRootManager.getInstance(module).orderEntries().productionOnly().runtimeOnly().forEachLibrary(new Processor<Library>() {
productionRuntimeDependencies(module).forEachLibrary(new Processor<Library>() {
@Override
public boolean process(Library library) {
libs.add(library);
@@ -93,4 +96,8 @@ public class PluginBuildUtil {
}
});
}
private static OrderEnumerator productionRuntimeDependencies(Module module) {
return OrderEnumerator.orderEntries(module).productionOnly().runtimeOnly();
}
}