Nine times out of ten when I run mvn clean on my projects I experience a build error. I have to execute mvn clean multiple times until the build error goes away. Does anyone else experience this? Is there any way to fix this within Maven? If not, how do you get around it? I wrote a bat file that deletes the target folders and that works well, but it's not practical when you are working on multiple projects. I am using Maven 2.2.1.
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to delete directory: C:Documents and SettingsuserMy Documentssoftware-developm
entacapplication-domainarget. Reason: Unable to delete directory C:Documen
ts and SettingsuserMy Documentssoftware-developmentacapplication-domai
nargetclassescoma
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6 seconds
[INFO] Finished at: Fri Oct 23 15:22:48 EDT 2009
[INFO] Final Memory: 11M/254M
[INFO] ------------------------------------------------------------------------
question from:
https://stackoverflow.com/questions/1615352/why-doesnt-mavens-mvn-clean-ever-work-the-first-time 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…