module not found (when it clearly exists)
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.
Please sign in to leave a comment.
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:
If possible, share a brief screencast demonstrating listed above.
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?
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.
https://github.com/MarginallyClever/NodeGraphCore/commit/40ba6cbfa06a2c090dd67c22a7bb550e5f35a406
https://github.com/MarginallyClever/Donatello/commit/ab2ee90b261b851a9e06d9af9454ee6fbfccd109
https://github.com/MarginallyClever/Makelangelo-software/commit/7f529a4473a2d6d0d4f4262011f2440bfe656fd2
I believe these three together produce the issue.
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.