I wouldn’t say that I am really happy with the patching and all, the way it’s done today. We are relying on an external executable. As you might have noticed, I don’t like executing Things outside the VM and like to have Things inside the Java world and hereby under full control. I wouldn’t bet my life on using the git.exe on Windows to do the patching to work identically on Linux and Mac for example.
The only 100% safe option in my opinion would be to create a tool to do the patching. This tool might simply be a wrapper around some open-source patch tool with a suitable license and provide a Maven goal to do the patching. For Ant a matching wrapper should make sure the patches are applied equally in Ant and Maven.