[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
This commit is contained in:
Tamas Cservenak 2022-12-26 20:01:32 +01:00 committed by GitHub
parent cd64c54a88
commit a23ff0f9a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -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() + ')');
}