ok, I'll have a look to try to move code Regards,
Hervé Le lundi 24 mars 2014 19:14:02 Robert Scholte a écrit : > In fact, a ModelValidator validates both the rawModel and effectiveModel[1] > > regards, > Robert > > [1] > https://git-wip-us.apache.org/repos/asf?p=maven.git;a=blob;f=maven-model-bui > lder/src/main/java/org/apache/maven/model/validation/ModelValidator.java;h=3 > 4bd97a5dc3d0a2d5f694d069ab80328d4adee1c;hb=HEAD1 > > Op Mon, 24 Mar 2014 00:20:06 +0100 schreef Hervé BOUTEMY > > <herve.bout...@free.fr>: > > I don't think so: DefaultModelValidator is the *effective model* > > validator > > It contains validations that happen when everything is done: it's too > > late for > > profile activation controls > > > > Regards, > > > > Hervé > > > > Le dimanche 23 mars 2014 20:29:42 Robert Scholte a écrit : > >> 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-bu > >> i > >> > >> lder/src/main/java/org/apache/maven/model/profile/activation/FileProfileA > >> c > >> > >> > tivator.java > >> > ---------------------------------------------------------------------- > >> > diff --git > >> > >> a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activa > >> t > >> > >> > ion/FileProfileActivator.java > >> > >> b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activa > >> > >> > tion/FileProfileActivator.java index 039c37b..ae20762 100644 > >> > --- > >> > >> a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activa > >> t > >> > >> > ion/FileProfileActivator.java +++ > >> > >> b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activa > >> t > >> > >> > ion/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 > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > > For additional commands, e-mail: dev-h...@maven.apache.org > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org