From a23ff0f9a2ab88864b9744172b9b7b6232a82b23 Mon Sep 17 00:00:00 2001 From: Tamas Cservenak Date: Mon, 26 Dec 2022 20:01:32 +0100 Subject: [PATCH] [MNG-7618][MNG-7624] Backport to Maven 3.9.x (#937) These changes are making IT suite to fail with maven-3.9.x. OTOH, the change is nearly trivial, while value is high, so let's backport them. --- https://issues.apache.org/jira/browse/MNG-7618 https://issues.apache.org/jira/browse/MNG-7624 --- .../org/apache/maven/cli/event/ExecutionEventLogger.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java b/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java index 9ac862d04e..487abe8a74 100644 --- a/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java +++ b/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java @@ -380,7 +380,11 @@ public class ExecutionEventLogger extends AbstractExecutionListener { } private void append(MessageBuilder buffer, MojoExecution me) { - buffer.mojo(me.getArtifactId() + ':' + me.getVersion() + ':' + me.getGoal()); + String prefix = me.getMojoDescriptor().getPluginDescriptor().getGoalPrefix(); + if (StringUtils.isEmpty(prefix)) { + prefix = me.getGroupId() + ":" + me.getArtifactId(); + } + buffer.mojo(prefix + ':' + me.getVersion() + ':' + me.getGoal()); if (me.getExecutionId() != null) { buffer.a(' ').strong('(' + me.getExecutionId() + ')'); }