From e51e38a10c6f2b707dffaf46eb76d5cec83289ea Mon Sep 17 00:00:00 2001 From: qxo Date: Sun, 17 Mar 2024 08:07:22 +0000 Subject: [PATCH] fix: the `Maven Project Builder' duplicate issue uncheck it then do `maven -> Update Project...` we'll see the duplicate --- .../core/internal/project/ProjectConfigurationManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/ProjectConfigurationManager.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/ProjectConfigurationManager.java index 02b37b0398..5319c6a06a 100644 --- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/ProjectConfigurationManager.java +++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/ProjectConfigurationManager.java @@ -653,7 +653,10 @@ public boolean removeMavenBuilder(IProject project, IProjectDescription descript } private boolean isMavenBuilderCommand(ICommand command) { - return IMavenConstants.BUILDER_ID.equals(command.getBuilderName()); + final String name = command.getBuilderName(); + return IMavenConstants.BUILDER_ID.equals(name) + || "org.eclipse.ui.externaltools.ExternalToolBuilder".equals(name) + && command.getArguments().toString().contains("LaunchConfigHandle=/.externalToolBuilders/org.eclipse.m2e.core.maven2Builder"); } // project creation