Question

I'm using MyEclipse 8.0 to develop a Spring Batch project. Recently, I added MySQL to the database explorer perspective and now when I try to do "mvn clean" on my project, it fails because it can't delete the mysql-connector-java-5.1.6.jar from the target lib folder. I've tried manually deleting this jar, but I get that popup that says it's being used by another person or program. So far, the only way I've found to continue is to close MyEclipse every time I need to run another test. This problem doesn't occur with any other database I'm using (DB2).

Was it helpful?

Solution

Well, good or bad, the fact is that the file is locked by another process and the delete fails. When configuring the database explorer, try to use the MySQL jar from your local repository instead of the one in the target directory. This should solve your problem.

OTHER TIPS

Sometimes windows explorer doesn't release file locks on things in the target directory. Try using Process Explorer to see what has a lock on the file. You can then use it to release the lock if it's something that doesn't matter. After that, you mvn clean will run fine.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top