make warning for ${project.basedir} and ${project.*} different: first

should be replaced with ${basedir}, latter is simply not supported
This commit is contained in:
Hervé Boutemy 2014-03-30 10:27:44 +02:00
parent 06a7d6dd8b
commit fb27b79250
1 changed files with 15 additions and 1 deletions

View File

@ -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" ) );
}
}
}