maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From khmarba...@apache.org
Subject [18/33] maven git commit: [MNG-6074] Maven should print a warning if no model version has been set in a POM file.
Date Sat, 24 Sep 2016 15:19:40 GMT
[MNG-6074] Maven should print a warning if no model version has been set in a POM file.


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/45a04204
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/45a04204
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/45a04204

Branch: refs/heads/MNG-6056-feature-toggle
Commit: 45a04204f720c9ed9c70c825fdb7834adb83852c
Parents: 2e255c8
Author: Christian Schulte <schulte@apache.org>
Authored: Sat Jul 30 21:02:03 2016 +0200
Committer: Christian Schulte <schulte@apache.org>
Committed: Sat Jul 30 21:02:03 2016 +0200

----------------------------------------------------------------------
 .../org/apache/maven/model/validation/DefaultModelValidator.java    | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/45a04204/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
index 1d3a0f6..efe8895 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
@@ -101,6 +101,7 @@ public class DefaultModelValidator
         {
             Severity errOn30 = getSeverity( request, ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_0
);
 
+            validateStringNotEmpty( "modelVersion", problems, Severity.WARNING, Version.V20,
m.getModelVersion(), m );
             validateEnum( "modelVersion", problems, Severity.ERROR, Version.V20, m.getModelVersion(),
null, m,
                           "4.0.0" );
 


Mime
View raw message