void () { String file1 = createFile("d/1.txt"); createFile("d/2.txt"); JpsArtifact included = addArtifact("i", root().parentDirCopy(file1)); JpsArtifact a = addArtifact(root().artifact(included)); buildAllModulesAndArtifacts(); assertOutput(included, fs().file("1.txt").file("2.txt")); assertOutput(a, fs().file("1.txt").file("2.txt")); delete(file1); delete(included.getOutputPath());//to trigger rebuild only for 'i' //doBuild(CompileScopeTestBuilder.rebuild().artifact(included)).assertSuccessful(); doBuild(CompileScopeTestBuilder.make().artifact(included)).assertSuccessful(); assertOutput(included, fs().file("2.txt")); assertOutput(a, fs().file("1.txt").file("2.txt")); buildAllModulesAndArtifacts(); assertOutput(a, fs().file("2.txt")); }