module not found (when it clearly exists)

Answered

I have three open source projects depending on each other.

https://github.com/MarginallyClever/NodeGraphCore/  v 1.0.22 required by 

https://github.com/MarginallyClever/Donatello/ 1.2.2 required by

https://github.com/MarginallyClever/Makelangelo-software v7.62.0

Nodegraphcore declares ‘module com.marginallyclever.nodegraphcore’ and installs locally, no problem.

Donatello requires nodegraphcore and declares `module com.marginallyclever.donatello` and installs locally, no problem.  I can see it in `~\.m2\repository\com\marginallyclever\donatello\1.2.2\donatello-1.2.2.jar`

Makelangelo-software pom includes both and `requires com.marginallyclever.donatello` but IDEA tells me that it doesn't exist.  If I write `requires donatello` it's not mad about the module any more BUT then I get a ton of “module x reads package y from both z and donatello.”

I suspect it's something to do with maven-shade-plugin.  Previously I was using assembly plugin but it was smashing my META-INF/services instead of collating nodegraphcore and donatello services.

Can someone please give me a hint what I'm doing wrong?  I have tried cleaning the IDEA cache, I have clean package installed every level of these dependencies.

0
5 comments

Hello, Dan!

Thank you for reporting this!

I've been able to successfully Import and Install all 3 Projects you've mentioned (skipping a failed test in Makelangelo-software).

Could you please share more details about the issue you're experiencing:

  • Actions that cause the issue to manifest (importing the Project, running a Maven Goal / Lifecycle, executing a Run Configuration, etc.)
  • Exact error message IDEA displays

If possible, share a brief screencast demonstrating listed above.

0

Of course it's after submitting the issue that I solved it… but in that “I don't know why it works” unsatisfying.

First, the solution: I replaced maven-shade-plugin with maven-assembly-plugin and the problem went away.

Second, the details (for future people): I used maven to clean install nodegraphcore and Donatello.  Then I got o Makelangelo-software and try to clean compile.  I get told that “module com.marginallyclever.donatello cannot be found".

What's a good way to record a screencast?  is there a tool built into IDEA?

0

Dan Royer If you can create a git branch where the issue is still present, I'll be happy to look further into this!

In regards to recording a screencast, assuming you are on Windows, Snipping Tool should offer an option to capture a video.

0

Dan Royer  Thank you for sharing the commits!

I've managed to reproduce the issue, however, it appears to persist when I run Maven from OS Command Prompt.

That indicates that the issue occurs on Maven level, so I don't think we will be able to do much about it from IDEA's end.

0

Please sign in to leave a comment.