Search code examples
eclipsemavenmaven-surefire-pluginsurefireeclipse-mars

Cannot delete surefirebooster


I am using Eclipse workspace (Version: Mars Release (4.5.0) Build id: 20150621-1200) on a Windows 10 system. After i check-out a project and try to build it using Maven clean, it gives a build failure. This is the error I get

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building XYZ:: SU 2.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] Downloading: https://XYZ/maven-resources-plugin/maven-metadata.xml
[INFO] Downloading: https://XYZ/maven-jar-plugin/maven-metadata.xml
[INFO] Downloading: https://XYZ/maven-install-plugin/maven-metadata.xml
[INFO] Downloading: https://XYZ/maven-metadata.xml
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ geodis-su ---
[INFO] Deleting C:\Users\Documents\workspace\XYZ\XYZ-su\target
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.300 s
[INFO] Finished at: 2016-05-17T14:35:56+02:00
[INFO] Final Memory: 18M/284M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project geodis-su: Failed to clean project: Failed to delete C:\Users\Documents\workspace\XYZ\XYZ-su\target\surefire\surefirebooter82744427512387012.jar -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

If I restart my PC, I can delete this file (and the entire project), but when I checkout this project again in my workspace I get the same error. What should I do?


Solution

    1. Check Java processes on your computer using jps -m
    2. Then kill for example taskkill /F /PID 30503