void () { String root = PathUtil.getParentPath(createFile("d/1.txt")); JpsArtifact a = addArtifact(root().dirCopy(root)); a.setOutputPath(root); buildArtifacts(a); assertOutput(a, fs().file("1.txt")); String file2 = createFile("d/2.txt"); buildArtifacts(a); assertOutput(a, fs().file("1.txt").file("2.txt")); a.getRootElement().addChild(JpsPackagingElementFactory.getInstance().createFileCopy(createFile("d2/3.txt"), null)); buildArtifacts(a); assertOutput(a, fs().file("1.txt").file("2.txt").file("3.txt")); buildAllAndAssertUpToDate(); assertOutput(a, fs().file("1.txt").file("2.txt").file("3.txt")); delete(file2); buildAllAndAssertUpToDate(); assertOutput(a, fs().file("1.txt").file("3.txt")); }