Repository: maven Updated Branches: refs/heads/master 06a7d6dd8 -> fb27b7925
make warning for ${project.basedir} and ${project.*} different: first should be replaced with ${basedir}, latter is simply not supported Project: http://git-wip-us.apache.org/repos/asf/maven/repo Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/fb27b792 Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/fb27b792 Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/fb27b792 Branch: refs/heads/master Commit: fb27b7925022d0acff5805073b7db90a3d9e8c5a Parents: 06a7d6d Author: Hervé Boutemy <hbout...@apache.org> Authored: Sun Mar 30 10:27:44 2014 +0200 Committer: Hervé Boutemy <hbout...@apache.org> Committed: Sun Mar 30 10:27:44 2014 +0200 ---------------------------------------------------------------------- .../model/validation/DefaultModelValidator.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/maven/blob/fb27b792/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 c5560f9..66f059b 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 @@ -219,7 +219,7 @@ public class DefaultModelValidator return; } - if ( hasProjectExpression( path ) ) + if ( path.contains( "${project.basedir}" ) ) { addViolation( problems, Severity.WARNING, @@ -233,6 +233,20 @@ public class DefaultModelValidator + ": ${project.basedir} expression not supported during profile activation, use ${basedir} instead", file.getLocation( missing ? "missing" : "exists" ) ); } + else if ( hasProjectExpression( path ) ) + { + addViolation( problems, + Severity.WARNING, + Version.V30, + prefix + ( missing ? ".file.missing" : ".file.exists" ), + null, + "Failed to interpolate file location " + + path + + " for profile " + + sourceHint + + ": ${project.*} expressions are not supported during profile activation", + file.getLocation( missing ? "missing" : "exists" ) ); + } } }