I ran into this annoying issue on windows: I cancelled a running junit test in maven (it was hanging), but could not rerun maven. It complained that the target folder could not be deleted. A file created by the surefire plugin in maven was locked, apparently some process was still using it. On unix you [...]