When I use the command + shift + o command I get this popup:
The problem
I have done what @maba recommended myself but it comes back whenever mvn clean deletes a directory that IntelliJ is tracking as an ignored directory, IntelliJ seems unable to remember that it was ignoring that directory. Perhaps it sticks a configuration file in the target directory it's trying to ignore? In any case, this answer worked for me even after I ran a mvn clean.
Intellij IDEA. Always show maven's `target` directory