Intellij maven imports have broken classpath

后端 未结 7 2237
情话喂你
情话喂你 2021-02-14 01:50

I\'m using Intellij 13, I\'ve been using Maven quite happily for awhile now to manage the JAR dependencies.

But the last few I\'ve imported are causing a broken classpat

相关标签:
7条回答
  • 2021-02-14 02:00

    I've had this issue in IntelliJ IDEA 2017 Ultimate.

    After changing dependency versions, the IDE was unable to fix the path on its own. I went to my ~/.m2 directory and deleted all of the dependencies for the problem jar and then executed the "ReImport All Maven Projects" action. When it was complete, the dependency issue was resolved.

    0 讨论(0)
  • 2021-02-14 02:02

    I solved the probelm by deleting it in module dependencies, and then importing it again.

    0 讨论(0)
  • 2021-02-14 02:07

    I had this problem with the Community version of IntelliJ Community edition. I was able to solve the problem using this process:

    1. Click "Help" menu
    2. Click "Find Action" and type "Maven Settings."
    3. Click "Maven Settings."
    4. Click the arrow next to "Maven" on the left hand side, to see the submenu
    5. Click "Importing"
    6. Check "Import Maven Projects automatically" and click "OK."

    This should pull in all of the Maven dependencies from the pom.xml file, without you needing to manually add the libraries.

    I hope this helps.

    0 讨论(0)
  • 2021-02-14 02:07

    It's not really an answer, but I moved some stuff around the POM's and it seems to be working. I've got a bad internet connection, and I found that it kept stalling trying to download some of the jar files, and Intellij didn't seem to time out when it did stall, I ended up having to restart it each time it stalled to get the JAR's to download.

    But it's working okay now by just editing the pom files, which is more convenient for me than libraries.

    0 讨论(0)
  • 2021-02-14 02:07

    There can be different root causes of this issue. For me problem was that I had a maven settings file with a different name. Problem resolved after I went to intellij maven settings and updated the maven settings file path and then after maven refreshed my projects.

    0 讨论(0)
  • 2021-02-14 02:09

    I have encountered a problem like this.

    I resolved it as follows:

    Project Structure >> Modules >> your module has problem >> Dependencies
    

    then double click the jar that have problem, go to "Configure Project Library",

    and then click "+", i.e. I add dependency jar manually, otherwise, the dependency jar is red (i.e failed status) or have none.

    0 讨论(0)
提交回复
热议问题