From ab6ec5bd74af20ab429509eb56fc8e3dff4c7fc7 Mon Sep 17 00:00:00 2001 From: huazhongming Date: Wed, 28 Feb 2024 15:46:36 +0800 Subject: [PATCH] [MNG-7976] Investigate MNG-6127 IT instability (#1422) Signed-off-by: crazyhzm --- .../apache/maven/lifecycle/mapping/DefaultLifecycleMapping.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/DefaultLifecycleMapping.java b/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/DefaultLifecycleMapping.java index da7f6b227ada..859430902622 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/DefaultLifecycleMapping.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/DefaultLifecycleMapping.java @@ -59,7 +59,7 @@ public DefaultLifecycleMapping(final List lifecycles) { /** * Plexus: Populates the lifecycle map from the injected list of lifecycle mappings (if not already done). */ - private void initLifecycleMap() { + private synchronized void initLifecycleMap() { if (lifecycleMap == null) { lifecycleMap = new HashMap<>();