I ran into an unusual problem using IntelliJ with a project, where when I clone the project from my GitHub repository, it would not run though it would build just fine. Then I discovered that when I ran the command mvn clean compile it would then run just fine. After opening an incident with JetBrains, the support person cloned the project to his machine and was getting errors of not being able to find a specific module that is in the module-info file.
So I then created a clean environment in a virtual machine and was getting the same error that he got. But IntelliJ fixed that error by creating a new entry in the module-info file where it referenced that library using a shorter name.
Specifically, in my normal working environment (on my Mac), the module is included using this line:
requires org.kohsuke.github.api;
but the fix in the virtual machine was to delete that line and use this one instead:
requires github.api;
But when I make that same change on my Mac, IntelliJ says that it cannot find module github.api.
I'm at a loss as to how to fix this. I'm thinking that I need to possibly delete something and let IntelliJ / Maven re-build any references to that module so it can "start from scratch" - essentially - but I don't know exactly how to do that or even if my thinking is in the right direction.
So I'm seeking any wisdom or advice from here and will appreciate any advice that you can render.
Thank you,
Mike Sims