maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject [2/2] maven git commit: marked new constants public and used it in validator
Date Sun, 12 Mar 2017 18:31:38 GMT
marked new constants public and used it in validator

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

Branch: refs/heads/MNG-6057
Commit: 3c00dd10e3f443540bb79bc30ef4fc8ce1ac076d
Parents: 959ca0c
Author: Hervé Boutemy <hboutemy@apache.org>
Authored: Sun Mar 12 19:31:35 2017 +0100
Committer: Hervé Boutemy <hboutemy@apache.org>
Committed: Sun Mar 12 19:31:35 2017 +0100

----------------------------------------------------------------------
 .../apache/maven/model/validation/DefaultModelValidator.java  | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/3c00dd10/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 59b0532..e790f21 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
@@ -53,6 +53,7 @@ import org.apache.maven.model.building.ModelProblem.Severity;
 import org.apache.maven.model.building.ModelProblem.Version;
 import org.apache.maven.model.building.ModelProblemCollector;
 import org.apache.maven.model.building.ModelProblemCollectorRequest;
+import org.apache.maven.model.interpolation.AbstractStringBasedModelInterpolator;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.util.StringUtils;
 
@@ -806,8 +807,10 @@ public class DefaultModelValidator
         // revision
         // sha1
         //
-        if ( string.trim().contains( "${changelist}" ) || string.trim().contains( "${revision}"
)
-            || string.trim().contains( "${sha1}" ) )
+        string = string.trim();
+        if ( string.contains( "${" + AbstractStringBasedModelInterpolator.CHANGELIST_PROPERTY
+ "}" )
+            || string.contains( "${" + AbstractStringBasedModelInterpolator.REVISION_PROPERTY
+ "}" )
+            || string.contains( "${" + AbstractStringBasedModelInterpolator.SHA1_PROPERTY
+ "}" ) )
         {
             return true;
         }


Mime
View raw message