I had a similar issue when I switched to a new computer.
I copied all the IDEA files (even the related %APPDATA%-folders), but then the Maven build was successfully, but IDEA did not find any classes from the dependencies, when building it.
The solution: I started with a new and clean IDEA profile by removing the folders from the %APPDATA%-folders