This error means that Maven is not able to access the necessary lock files on a local directory or file because it is locked by another process. (Simply other process is using maven resources)
You can solve by:
1. Kill any stuck Maven processes
Open Task Manager → look for processes like mvn.exe → End Task.
2.Delete .m2/repository/.locks folder manually
Go to C:\Users\<your-user>\.m2\repository\.locks → delete all files inside .locks folder.
This solution will help Link