gnodet commented on PR #840:
URL: https://github.com/apache/maven/pull/840#issuecomment-1287888704

   > I think I ran into a chicken-egg type of problem.
   > 
   > * I would like to have the project.topdir available as a variable that can 
be used in the pom.xml to pin point things. This implies it must be available 
before that point.
   > * Also I would like to base loading a project specific settings.xml opon 
this variable ([MNG-5659](https://issues.apache.org/jira/browse/MNG-5659))
   > * Yet the only viable way to determine it is after the pom.xml has been 
parsed and at least the parents are available.
   > 
   > I would like to have some suggestions on how to handle this is.
   
   This would have to be computed inside the `DefaultModelBuilder`.  The models 
are built in two phases.  After the first phase is done, all models have been 
read and the needed information should be available.  So the best place may be 
(without much thoughts) in the `DefaultModelBuilder`, just before the model 
interpolation.  The parents (and all models from the reactor) should be 
available on the model building request.  The relevant code is 
[here](https://github.com/apache/maven/blob/24329561fc9092ba7a10aa9c7a378b392e0d9301/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java#L883-L886).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to