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