From 4e38415b67f7e774b873728d2042e96e800fb532 Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Thu, 15 Dec 2022 21:18:29 +0100 Subject: [PATCH] [MNG-7624] Use groupId:artifactId instead of empty goal (#911) --- .../java/org/apache/maven/cli/event/ExecutionEventLogger.java | 3 +++ 1 file changed, 3 insertions(+) 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 4893d09076..ecaabf4748 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 @@ -420,6 +420,9 @@ public class ExecutionEventLogger extends AbstractExecutionListener { private void append(MessageBuilder buffer, MojoExecution me) { 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() + ')');