void () { final String aFile = createFile("aaa.txt", "a"); final String bFile = createFile("bbb.txt", "b"); final JpsArtifact a = addArtifact( root() .archive("x.jar").fileCopy(aFile).end() .archive("x.jar") .fileCopy(bFile)); buildAll(); assertOutput(a, fs() .archive("x.jar") .file("aaa.txt", "a") ); buildAllAndAssertUpToDate(); change(aFile, "a2"); buildAll(); assertDeletedAndCopied("out/artifacts/a/x.jar", "aaa.txt"); assertOutput(a, fs().archive("x.jar").file("aaa.txt", "a2")); buildAllAndAssertUpToDate(); change(bFile, "b2"); buildAllAndAssertUpToDate(); delete(bFile); buildAllAndAssertUpToDate(); }