Thanks for the patch but I want to understand this a bit more.
Currently releases are effectivly done from a clean checkout - which is
${workspace_loc}/target/checkout
if you want to make sure its clean you just need to add the clean goal before
release:prepare release:perfrom options in the release goals.
If your using a local m2 repository which is recommended I think cleaning the m2
repo should be pushed up to the maven core to clean - and the m2release plugin
just triggers that to clean itself.
If your not using a local m2 repo then you have other issues
Other than that what was the race condition and under what circumstances did it
manifest itself?
Created an attachment (id=755)
Patch that adds clear workspace, fixes race a condition and decreases copy-paste code. Sorry about the white space changes.