Why are some maven projects in IntelliJ grayed out?

Solution 1:

Seems images are better way to answer this question.

  1. Projects are greyed out when you ignore them in your IntelliJ workspace.

Ignored Projects

  1. To add those projects or modules back in your workspace, right click on them and click on unignore projects as shown in below screenshot.

Ignored Projects back in Workspace

  1. Alternatively, you can also go to File - Settings -> Build, execution and deployment -> Build Tools -> Maven -> Ignored Files, now select whichever projects/modules you may wish to retain in your IntelliJ workspace.

enter image description here

Feel free to ping in comments if more clarification required. Happy coding.

Solution 2:

Right click on the pom -> maven -> unignore. Then right click on pom -> maven -> reload project.

Seems some kind of bug when you open a child subdirectory then open the parent in IntelliJ.

Solution 3:

This is known issue and interlinked to 3 more IDEA issue. You can find more details here.

Indicate that pom.xml is ignored when editing it

Lot of us might spend more time and then end up deleting module & re-creating it. But @Pratik Ambani solutions works great!!, option 3 worked in my case.