From f1eda3c2ba2c520cbd21fd95ddd0d23ad48758ad Mon Sep 17 00:00:00 2001 From: Gregor Latuske Date: Wed, 24 Jan 2024 08:10:38 +0100 Subject: [PATCH] Workaround for #3057 --- .../tycho/p2maven/repository/DefaultRepositoryIdManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/repository/DefaultRepositoryIdManager.java b/p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/repository/DefaultRepositoryIdManager.java index 88d23cb918..859d18884b 100644 --- a/p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/repository/DefaultRepositoryIdManager.java +++ b/p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/repository/DefaultRepositoryIdManager.java @@ -37,8 +37,9 @@ public class DefaultRepositoryIdManager implements IRepositoryIdManager { private MavenRepositorySettings settings; @Requirement private Logger logger; - - private Map knownMavenRepositoryIds = new ConcurrentHashMap<>(); + // For some reason maven creates different instances of the component even if + // there should only be one... + private static final Map knownMavenRepositoryIds = new ConcurrentHashMap<>(); @Override public void addMapping(String mavenRepositoryId, URI location) {