Latest IntelliJ complains of split package but Maven does not

已回答

Hello All,

I am liking the latest IntelliJ very much. A lot of improvements and bug fixes and we're thinking about buying Ultimate licenses for the project-wide problem view alone (although I would love it if there was an accelerator key to advance to the next error in the project-wide list without leaving the editor view. That's the only thing Eclipse has on IntelliJ now, so it seems a shame to omit this).

Anyway, I've been having a problem with split package detection in IntelliJ for several versions now and I'm starting to wonder if it might be a bug. My open source project KivaKit (https://github.com/Telenav/kivakit/tree/develop) complains of a split package in IntelliJ in kivakit-serialization/jersey-json/src/main/java/module-info.java:

Module 'kivakit.serialization.jersey.json' reads package 'javax.xml.bind' from both 'java.xml.bind' and 'java.xml.bind'

Maven does not complain and there is no problem executing applications in IntelliJ that use this code either. Unfortunately, I do not have a simpler example of this, but it should be easy to reproduce by just checking out the project from github in IntelliJ (and happy to help out if I'm needed).

My question: Is this a user pilot error on my part or is this a bug?

Thanks,

Jon

 

0

Hello,

Please tell what version of IntelliJ IDEA do you use? Is the issue reproduced for you with: https://www.jetbrains.com/idea/nextversion?

The described case looks like the one that was already fixed, please see:

https://youtrack.jetbrains.com/issue/IDEA-235898

Thank you 

0

Hi Olga,

Yes, I'm using the latest IntelliJ (see below), and I was still getting a different result from IntelliJ than from maven.

I played around with various pom.xml files and module-info.java files and got it to stop, but I really have no idea why it stopped and now it's happening in a different project. 

If IntelliJ is detecting a problem, I can't find it with "mvn dependencies:tree".

Is there anything in IntelliJ that could help me to diagnose split packages? This would be a major feature to me.

Thanks,

    Jon

 

IntelliJ IDEA 2021.2 (Ultimate Edition)
Build #IU-212.4746.92, built on July 27, 2021
Licensed to IntelliJ IDEA Evaluator
Expiration date: August 28, 2021
Runtime version: 11.0.11+9-b1504.13 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 11.5
GC: G1 Young Generation, G1 Old Generation
Memory: 8192M
Cores: 16
Non-Bundled Plugins: com.github.patou.gitmoji (1.8.0), io.github.biezhi.plugins.gitmoji (1.0.2), zielu.gittoolbox (212.6.6), com.github.jonathanlocke.intellij.easymapmac (1.0.5), PlantUML integration (5.5.1)
Kotlin: 212-1.5.10-release-IJ4746.92

0

A useful workaround might be the ability to ignore split package errors. Is there a way to do that?

    Jon

 

0

Hello, if possible, can you please create an issue at the YouTrack (https://youtrack.jetbrains.com/) providing a little sample project where the issue is reproduced for you? 

Thank you 

0

请先登录再写评论。