Avoid overwrite of the destination file if the produced contents is the same

maven-remote-resource-plugin is used in Apache pom to add DEPENDENCIES, and the resulting file is overwritten on each build.
It leads to jar being rebuild, etc leading to longer compilation times.