void () { final String file = createFile("a/a.txt"); final JpsArtifact a1 = addArtifact("a1", root().parentDirCopy(file)); final JpsArtifact a2 = addArtifact("a2", root().parentDirCopy(file)); buildAll(); assertOutput(a1, fs().file("a.txt")); assertOutput(a2, fs().file("a.txt")); delete(file); buildArtifacts(a1); assertDeleted("out/artifacts/a1/a.txt"); assertEmptyOutput(a1); assertOutput(a2, fs().file("a.txt")); buildArtifacts(a2); assertDeleted("out/artifacts/a2/a.txt"); assertEmptyOutput(a1); assertEmptyOutput(a2); }