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

   > I'm very confused by this PR, what I see:
   > 
   > 1. we had 2 dir properties and they are deprecated in favor of 2 dir 
properties, can't we fix the previous ones?
   
   My option was to not break anything, it was easier to define a new set of 
properties and deprecate the old ones rather than trying to find all spots 
where things could be impacted.
   
   > 2. the root dir is defined by the `.mvn` presence which is still not 
mainstream so will likely always fail instead of the top dir of linked project 
by the parent/child relationship defined by pom (which always works)
   
   Well, the current definition is closer to 
`maven.multiModuleProjectDirectory` which has been used for years, even if not 
really public.  The idea to rely on parent/child relationship just does not 
work imho : first, it would have to be computed after all projects are parsed, 
which conflicts with the fact that one of the use case it during project 
interpolation, or even very early during the command line interpolation.  
Although, there's absolutely no guarantee that it will point to the root level 
of the project, as I can point to lots of projects where this would not work. 
And the main use case imho it to locate files on the file system, so the 
parent/child relationship is completely unrelated and would not solve the 
issue.  It also have to never change for any build of the project, which would 
not be the case for any computation based on parent/child relationship.
    
   > So overall think the impl should be fixed (2) and we should probably 
collapse most of the properties we have, in particular for v4 where it will 
just be a clean up and avoid the redefinition of new props. The big pro of root 
dir is the ability to define absolutely a file config (style.xml is what i have 
in mind but there are multiple cases) so should absolutely be reliable for all 
projects, even without .mvn IMHO.
   
   It is at least very precisely defined and deterministic: you start from the 
`topdir` and go up until you find a `.mvn` tree.  If there's none, the property 
is not defined.  And it is fully compatible with all existing projects, that's 
the benefit of having new properties.


-- 
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