void () { setupInitialProject(); final Map<String, JpsModule> modules = setupModules(); assertEquals(1, modules.size()); final JpsModule module = modules.values().iterator().next(); final ModuleBuildTarget target = new ModuleBuildTarget(module, JavaModuleBuildTargetType.PRODUCTION); final File outputDir = target.getOutputDir(); final File libDir = new File(getAbsolutePath("lib")); for (File jarFile : libDir.listFiles((dir, name) -> name.endsWith(".jar"))) { JpsLibrary lib = addLibrary(jarFile.getName(), jarFile); JpsModuleRootModificationUtil.addDependency(module, lib, JpsJavaDependencyScope.COMPILE, false); } final File moduleInfoPath = new File(getAbsolutePath("moduleA/src/module-info.java")); final ModulePathSplitter splitter = new ModulePathSplitter(); final Collection<File> dependencies = ProjectPaths.getCompilationModulePath(new ModuleChunk(Collections.singleton(target)), false); final Pair<ModulePath, Collection<File>> split = splitter.splitPath(moduleInfoPath, Collections.singleton(outputDir), dependencies); final ModulePath modulePath = split.first; final Collection<File> classpath = split.second; final Collection<? extends File> modPath = modulePath.getPath(); assertEquals(4, modPath.size()); assertTrue(modPath.contains(outputDir)); assertTrue(modPath.contains(new File(libDir, "module_lib_1.jar"))); assertTrue(modPath.contains(new File(libDir, "module_lib_2.jar"))); assertTrue(modPath.contains(new File(libDir, "module_lib_util.jar"))); assertEquals(1, classpath.size()); assertTrue(classpath.contains(new File(libDir, "module_lib_3.jar"))); }