简体   繁体   English

IntelliJ IDEA 在 Maven 工具栏树中两次显示所有 Maven 插件

[英]IntelliJ IDEA showing all maven plugins twice in maven toolbar tree

I have a maven project.我有一个 Maven 项目。 Whenever I try to open it in IDEA, all plugins are shown twice in the tree.每当我尝试在 IDEA 中打开它时,所有插件都会在树中显示两次。 I have tried restart, invalidate caches / restart, checkout project again, clear .m2 folder, checking maven settings file.我试过重新启动,使缓存无效/重新启动,再次签出项目,清除 .m2 文件夹,检查 Maven 设置文件。

在此处输入图片说明

IntelliJ IDEA 2019.3.2 ( Community Edition ) Build #IC-193.6015.39, built on January 21, 2020 IntelliJ IDEA 2019.3.2(社区版)Build #IC-193.6015.39,2020年1月21日构建

Runtime version: 11.0.5+10-b520.30 amd64运行时版本:11.0.5+10-b520.30 amd64

I couldn't find any solution.我找不到任何解决方案。 Thanks for help.感谢帮助。

There are three immediate things that you could try, that could help:您可以尝试以下三件事,这可能会有所帮助:

  1. Reimport the maven project.重新导入 Maven 项目。 IntelliJ tries to parse your pom and build an object model based on the information found in the pom. IntelliJ 尝试解析您的 pom 并根据 pom 中找到的信息构建对象模型。 There is a button that looks like two arrows that form a circle in the maven tab.有一个按钮,看起来像两个箭头,在 maven 选项卡中形成一个圆圈。

  2. Close the project and open up the pom.xml again (its important, not the .idea or something, but a pom.xml).关闭项目并再次打开 pom.xml(它很重要,不是 .idea 什么的,而是 pom.xml)。 It will offer you to delete the current definitions and create new.它将让您删除当前定义并创建新定义。 Do it and it will rebuild everything.这样做,它将重建一切。

  3. File --> Invalidate Caches --> Restart . File --> Invalidate Caches --> Restart It will invalidate intelliJ caches (obviously) and restart the IDE.它将使 IntelliJ 缓存无效(显然)并重新启动 IDE。

  1. Close your project from File menu.从文件菜单关闭您的项目。 File--> close project
  2. Go to your project directory and delete .idea and any file with extension .iml转到您的项目目录并删除.idea和任何扩展名为.iml文件
  3. Right-click on your pom and open it with IntelliJ or reimport your project from IntelliJ.右键单击您的 pom 并使用 IntelliJ 打开它或从 IntelliJ 重新导入您的项目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM