3

My pom.xml that has been stable for over 24 months is now not working within Intellij - and I can not figure out why it stopped doing so. Here is the modules section:

<modules>
    <module>tcpclient</module>
    <module>tfdma</module>
    <module>tf</module>
    <module>tfspark</module>
    <module>registry</module>
    <module>p2prdd</module>
</modules>

But now the already-existing Run Configurations are no longer working due to not finding classes. I can not even see the modules to try to fix the problem :note that only the Parent module is shown

enter image description here

Note that my next step will be to blow away all the Intellij artifacts such *.iml and .idea/* . But there is a cost to that: e.g. losing my (intricate) run configurations. This is not a preferred solution.

Any ideas why this would have happened?

WestCoastProjects
  • 53,260
  • 78
  • 277
  • 491
  • Try reimporting, you can backup and restore your run configurations per https://stackoverflow.com/a/3136255/104891. – CrazyCoder Jul 23 '19 at 18:19
  • @CrazyCoder hey thanks for stopping by - always great to get _the_ IJ guy here!. Thx for the `runConfigurations` tip. See my answer also below: the workaround is pretty light-hearted/relatively painless. I'm just _lost_ without IJ (nothing else comes remotely close to its power) so whatever little kinks come up we just do what we can. – WestCoastProjects Jul 23 '19 at 18:40
  • Give this a try. https://www.youtube.com/watch?v=u6jirc1x25U – Dilip Raj Baral Aug 15 '21 at 13:07

2 Answers2

11

Go to pom.xml of each module, right click -> add as maven project. This should solve the issue.

Version:2020.2.2

selman
  • 1,125
  • 1
  • 14
  • 31
1

I walked into a workaround: do Import Module from [Maven] Model under Project Structure:

enter image description here

After pointing to one of the half dozen modules and clicking OK then Intellij re-imported all six for me:

enter image description here

So this is bit weird but then not so bad to resolve..

WestCoastProjects
  • 53,260
  • 78
  • 277
  • 491
  • 1
    [This bug](https://youtrack.jetbrains.com/issue/IDEA-211346) might be the case. It's fixed in https://www.jetbrains.com/idea/nextversion/. The workaround in the ticket looks similar to what you did. – CrazyCoder Jul 23 '19 at 18:41
  • @CrazyCoder Thx for that info! Always great when you have a chance to stop by. – WestCoastProjects Aug 01 '19 at 11:21