如何在IntelliJ IDEA中自动禁用Maven自动导入?

mom*_*omo 23 intellij-idea maven intellij-13

我相信这个设置可能会导致IntelliJ IDEA行为缓慢.我曾经得到一个弹出窗口,最后点击"自动执行此操作",现在它已启用,但我想再次将其关闭.如何禁用Maven'自动导入'?

Dar*_*Kay 38

取消选中Project Settings | Maven | Importing | Import Maven projects automatically.

对于IDEA 14+,它在Settings | Build, Execution, Deployment | Build Tools | Maven | Importing | Import Maven projects automatically.

  • 这在 2020.1 版本中发生了巨大变化。请参阅https://blog.jetbrains.com/idea/2020/01/intellij-idea-2020-1-eap/?_ga=2.166486142.1328458743.1589984167-1329951468.1589984167#maven_and_gradle_importing_updates和https://intellij-support.jetbrains .com/ hc/en-us/community/posts/360007973600-maven-auto-import (13认同)
  • 我在 IntelliJ 2020.1 (Linux) 中没有看到此选项。请问这个答案有更新吗? (3认同)

And*_*fat 7

转到Intellij的设置并导航到Build, Execution, Deployment -> Maven -> Importing ->取消选中Import Maven projects automatically.

另外,请检查以下链接:在IntelliJ中执行"启用自动导入"以"需要导入Maven项目"


Shu*_*nik 6

虽然上面的答案是正确的。我观察到上述选项在 IntelliJ 2020.2版本上不可用。所以,你需要去设置->构建工具->检查“在构建脚本中更改后重新加载项目” ->检查“任何更改” 在此处输入图片说明


Mil*_*ica 5

对我来说(Ubuntu 12 上的 IntelliJ IDEA 14.1.1)这个设置在 Settings > Build, Execution, Deployment > Build Tools > Maven > Importing > [X] Import Maven projects automatically.

如果它再次移动,或者您想快速找到它,也可以通过双击 Shift 然后键入 进行常规搜索来找到 Maven 设置maven,这就是我这次找到它的方式——我认为设置位置在自其他答案发布以来,IDEA 必须已被移动。