void () { JpsModule m1 = addModule("m1", PathUtil.getParentPath(createFile("src/A.java", "class A{ }"))); JpsModule m2 = addModule("m2", PathUtil.getParentPath(createFile("src/B.java", "class B{ }"))); JpsJavaModuleExtension m1Ext = JpsJavaExtensionService.getInstance().getOrCreateModuleExtension(m1); JpsJavaModuleExtension m2Ext = JpsJavaExtensionService.getInstance().getOrCreateModuleExtension(m2); m2Ext.setOutputUrl(m1Ext.getOutputUrl()); m2Ext.setTestOutputUrl(m1Ext.getOutputUrl()); rebuildAllModules(); File b = new File(createFile(getModuleOutputRelativePath(m1) + "/a.txt", "qwerty")); buildAllModules(); assertExists(b); assertExists(new File(getOrCreateProjectDir(), getModuleOutputRelativePath(m1) + "/A.class")); assertExists(new File(getOrCreateProjectDir(), getModuleOutputRelativePath(m1) + "/B.class")); doBuild(CompileScopeTestBuilder.recompile().module(m1)).assertSuccessful(); assertExists(b); assertExists(new File(getOrCreateProjectDir(), getModuleOutputRelativePath(m1) + "/A.class")); assertExists(new File(getOrCreateProjectDir(), getModuleOutputRelativePath(m1) + "/B.class")); }