Kay
Kay

Reputation: 933

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?

Upvotes: 1

Views: 6603

Answers (4)

Amarbold
Amarbold

Reputation: 54

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

Upvotes: 4

Tin Torres
Tin Torres

Reputation: 231

Steps below to forcefully kill it via command prompt

  1. jps -m
  2. taskkill /PID /F

Upvotes: 5

Ronnie
Ronnie

Reputation: 61

There must a java process that's running in the background which runs the surefire jar. Try killing all the java tasks from task manager and then try deleting the surefire jar or try doing maven clean now.

Upvotes: 0

Matthieu Lambert
Matthieu Lambert

Reputation: 81

You may have a java program running with a surfire jar. To see it, launch a jps command (this is a soft provide with the JDK) you will have the process, and then you can kill it.

Upvotes: 0

Related Questions