I am trying to find a way to copy a resource file to a new name in the target directory in a Maven build. Pretty much everything I have found while searching suggests workarounds involving multiple sub-directories in `/src/main/resources` and selecting among them via profiles. However, in my case, this does not solve the problem, namely that the file I want has a "magic" name.

Basically what I want to do is have a `/src/main/resources/default.DS_Store` file get copied to `${project.build.directory}/.DS_Store`. Since the `.DS_Store` file has special meaning in Mac OSX, it is not desirable to have a file with that name in the source tree, and in version control. However, I do want the data in the file to be in the source tree and version control, and have it renamed to the "magic" name during the build.

I'm starting to think that ant is the only way to do this automatically. Is there any easier way?