void () { final String xFile = createFile("x.txt", "1"); final String jarFile = createFile("lib/junit.jar", "123"); JpsArtifact a = addArtifact(root() .archive("junit.jar").fileCopy(xFile).end().parentDirCopy(jarFile)); buildAll(); assertOutput(a, fs().archive("junit.jar").file("x.txt", "1")); buildAllAndAssertUpToDate(); change(xFile, "2"); buildAll(); assertDeletedAndCopied("out/artifacts/a/junit.jar", "x.txt"); assertOutput(a, fs().archive("junit.jar").file("x.txt", "2")); buildAllAndAssertUpToDate(); change(jarFile, "321"); buildAllAndAssertUpToDate(); delete(jarFile); buildAllAndAssertUpToDate(); }