Every once in a while, a good project would suddenly fail to start and get stuck in build, where a package could not be found, but it was clearly there, even though maven compiled and packaged would pass, but IDEA would not start.

There are several possible problems, so let’s go through them in this order and see if we can solve them (assuming your code really works and maven builds and packages can pass).

1. The maven reimport again

Right-click Project directory == “Maven==” Reimport

2. Maven repackage

Clean at the root layer, then install

3. Clear the IDEA cache

Click on the toolbar ==>File== “Invalidate Caches/Restart, pop up Invalidate and Restart, and wait for a while

4. On the IDEA project terminal, run MVN idea:idea

The ultimate solution, several times is to rely on this solution, in the IDEA project Terminal to execute the command MVN IDEA: IDEA