Hi Hervé,
I think this should have been fixed in the
org.apache.maven.model.validation.DefaultModelValidator.
That's the location where all these kinds of validations are done.
A ProfileActivator has only one task: Determines whether the specified
profile is active in the given activator context.
regards,
Robert
Op Sun, 23 Mar 2014 19:58:28 +0100 schreef <hbout...@apache.org>:
Repository: maven
Updated Branches:
refs/heads/master 3c7744a9a -> 64c419506
[MNG-5608] added a warning on ${project.basedir} use for profile
activation
Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/64c41950
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/64c41950
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/64c41950
Branch: refs/heads/master
Commit: 64c41950671b6b5472532cd2e34f28fff17c5fee
Parents: 3c7744a
Author: Hervé Boutemy <hbout...@apache.org>
Authored: Sun Mar 23 19:58:26 2014 +0100
Committer: Hervé Boutemy <hbout...@apache.org>
Committed: Sun Mar 23 19:58:26 2014 +0100
----------------------------------------------------------------------
.../maven/model/profile/activation/FileProfileActivator.java | 8
++++++++
1 file changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven/blob/64c41950/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/FileProfileActivator.java
----------------------------------------------------------------------
diff --git
a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/FileProfileActivator.java
b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/FileProfileActivator.java
index 039c37b..ae20762 100644
---
a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/FileProfileActivator.java
+++
b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/FileProfileActivator.java
@@ -116,6 +116,14 @@ public class FileProfileActivator
return null;
}
} );
+
+ if ( path.contains( "${project.basedir}" ) )
+ {
+ problems.add( new ModelProblemCollectorRequest(
Severity.WARNING, Version.BASE )
+ .setMessage( "Failed to interpolate file
location " + path + " for profile " + profile.getId() + ":
${project.basedir} expression not supported during profile activation,
use ${basedir} instead" )
+ .setLocation( file.getLocation( missing ?
"missing" : "exists" ) ) );
+ }
+
}
else if ( path.contains( "${basedir}" ) )
{
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org