You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2019/02/22 12:34:44 UTC

[maven] branch MNG-6599 created (now b9a5a21)

This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a change to branch MNG-6599
in repository https://gitbox.apache.org/repos/asf/maven.git.


      at b9a5a21  [MNG-6599] use version from parent if necessary, like groupId

This branch includes the following new commits:

     new b9a5a21  [MNG-6599] use version from parent if necessary, like groupId

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[maven] 01/01: [MNG-6599] use version from parent if necessary, like groupId

Posted by hb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to branch MNG-6599
in repository https://gitbox.apache.org/repos/asf/maven.git

commit b9a5a21f043563e96e27b579c559685b88073872
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Fri Feb 22 13:33:43 2019 +0100

    [MNG-6599] use version from parent if necessary, like groupId
---
 .../main/java/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 1b694c4..150d60d 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]";