void () { final String cFile = createFile("c.txt", "c"); final String eFile = createFile("e.txt", "e"); final JpsArtifact a = addArtifact( root() .archive("a.jar").archive("b.jar").fileCopy(cFile).end().end() .archive("a.jar").archive("d.jar").fileCopy(eFile)); buildAll(); assertOutput(a, fs().archive("a.jar").archive("b.jar").file("c.txt", "c")); buildAllAndAssertUpToDate(); change(eFile, "e2"); buildAllAndAssertUpToDate(); change(cFile, "c2"); buildAll(); assertDeletedAndCopied("out/artifacts/a/a.jar", "c.txt"); assertOutput(a, fs().archive("a.jar").archive("b.jar").file("c.txt", "c2")); buildAllAndAssertUpToDate(); delete(eFile); buildAllAndAssertUpToDate(); }