mirror of https://github.com/apache/maven.git
make warning for ${project.basedir} and ${project.*} different: first
should be replaced with ${basedir}, latter is simply not supported
This commit is contained in:
parent
06a7d6dd8b
commit
fb27b79250
|
@ -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" ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue