IntelliJ pom.xml crossed out → Can’t build project/module
--
This is just a quick “hack” which kept me quite busy for some time and it was super frustrating as I thought that my code might has issues or that my IntelliJ installation is just broken.
Ignored Files:
Please let me know why you would want to have ignored pom files in IntelliJ project structure, I can actually not think of any case where I would like to have them. But what happened.
As I’m working with around 20 modules in a single IntelliJ project which have dependencies with each other IntelliJ is just awesome to linka module to another module and debug it in the main application.
But to do this it needs a module within the same IntelliJ project so that it can link it together.
Everything worked fine up until some point where just some of my pom files looked like this
They got crossed out.
I can’t build the project anymore, I can’t to a “Maven rebuild”. Nothing.
I tried to overcome this by adding the module again. I deleted the full module and downloaded it again. I added the single sub modules and not only the parent module of the libraries I’m using. I removed the internal IntelliJ Settings file *.iml files.
Nothing worked.
So the only workaround was to create an entire new project. There everything was working. But migrating 15 different “Build plans” and 12 different “Run Configurations” is just a pain in the ass.
God bless, there is a fix for it!
If you go to “Settings” → “Build,Execution,Deployment” →”Build Tools” → “Maven” → “Ignored Files” there you can see a bunch of Ignored Files
Honestly I don’t have any clue how they got there but this is actually the solution to the problem. Just uncheck all the Files and “Tadaaa”
Now all modules are available again.