-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IntelliJ complains about duplicate module-info.java #11
Comments
Which IDEA module contains the error? |
Every (maven) module with two |
I see. That's why I invented and promoted the Caveat: IDEA, Maven Surefire and most other tools don't support |
It's actually a shame that there is no proper solution yet. Java 9 is over 2 years old already. I think I have also a small hack for this. If the test-packages also exist in the main path, one can
This also works with surefire and the newest versions of junit. |
Exactly. I'd go even further and state: that's an absolute no-go! Don't mess with the main descriptor just for the purpose of testing. The main descriptor is meant to be re-used, potentially published to Maven Central and shall only contain the minimal required API to work properly. |
So for now (even two years since java 9), it looks like one should not mess up with Intellij, maven and jigsaw. It seems the best to avoid javas module system until there is a common solution that is supported by intellij, maven surefire, and jigsaw. Am I right? |
It depends and only time will tell. Jigsaw + Foundation Tools (javac, jar, javadoc, ...) are fine. Of course, there are still bugs within those tools regarding the module system support. Most "vintage" build tools took and take Java packages as their building blocks -- due to the fact there weren't Java modules around when those tools were created. Some tools (and underlying project models) may adopt, some won't. |
Soon, it'll work with IntelliJ's IDEA: https://youtrack.jetbrains.com/issue/IDEA-253066#focus=Comments-27-5173827.0-0 |
I've tried the newest version of IntelliJ EAP (2020.1) and still, IntelliJ complains about the two module-info.java via:
Maven compiles just fine though. And I was not able to find any other problems besides these red underlines that indicate errors in IntelliJ.
Any ideas about that?
The text was updated successfully, but these errors were encountered: