I am using IntelliJ 2022 version and I have imported the root level pom.xml file as a project. But IntelliJ is not detecting it as a maven module. Also there are sub-modules with its own pom.xml file which is also not detected. So all the jump to definition for methods weren't working. Everything becomes extra complex when IDE is not working properly. The fix in this case is to unlink the main maven module which is the root of the project and then relink it. Unlinking removes the module and directory structure from IntelliJ but does not delete any thing from the filesystem. Then go to each sub-module pom.xml and link it as maven project if not linked. This will show the module in square brackets. Wait for the indexing to complete and all the jump to definition and other IDE functionalities will work as expected. This will also show the green play icon for unit tests as well.

Maven unlink