From 37676a26170be85879273a4c5a019019733ad508 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Boutemy?= Date: Fri, 22 Feb 2019 13:33:43 +0100 Subject: [PATCH] [MNG-6599] use version from parent if necessary, like groupId --- .../org/apache/maven/model/building/ModelProblemUtils.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemUtils.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemUtils.java index 1b694c459b..150d60dcf4 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemUtils.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemUtils.java @@ -90,6 +90,10 @@ public class ModelProblemUtils String artifactId = model.getArtifactId(); String version = model.getVersion(); + if ( version == null && model.getParent() != null ) + { + version = model.getParent().getVersion(); + } if ( version == null ) { version = "[unknown-version]";