I'm using Maven 3.0.3 on WinXP and running my Maven build commands through Cygwin. Occassionally, I'll be able to run a maven clean ...
mvn clean install
And I'll get errors like ...
[INFO] Deleting C:\Documents and Settings\E18538\workspace\iteration1\target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.891s
[INFO] Finished at: Mon Jan 23 11:07:58 CST 2012
[INFO] Final Memory: 4M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean (default-clean) on project myco-productplus-web: Failed to clean project:Failed to delete C:\Documents and Settings\E18538\workspace\iteration1\target -> [Help 1]
Other than Cygwin, I'll close all other applications, but there is still a process holding something in "target". How do I figure out what that process is and then kill it? Note that when I restart my system, I can again run "mvn clean" commands.
Edit: The process that is holding onto the directory in question is "TGitCache.exe", spawned by TortoiseGit, installed on my system. I have marked the "target" directory as one to ignore, so I'm wondering if there's a way to cause this process to ignore target.
Thanks, - Dave
Run mvn -X clean
to see the actual error stacktrace to figure out what's wrong. As to check what is locking the directory see unlocker.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With