desruisseaux commented on code in PR #11394:
URL: https://github.com/apache/maven/pull/11394#discussion_r2500583160


##########
impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultSourceRoot.java:
##########
@@ -169,7 +169,7 @@ public DefaultSourceRoot(final Path baseDir, ProjectScope 
scope, Resource resour
                 resource.getIncludes(),
                 resource.getExcludes(),
                 Boolean.parseBoolean(resource.getFiltering()),
-                
nonBlank(resource.getTargetPath()).map(baseDir::resolve).orElse(null),
+                nonBlank(resource.getTargetPath()).map(Path::of).orElse(null),

Review Comment:
   > It makes the path truly relative, and later resolved against the correct 
directory.
   
   Ah, I see. The responsibility of resolving the path is shifted to the 
`SourceRoot` user instead of the `SourceRoot` constructor. But why not 
resolving at construction time? It would probably be less code to check for 
correctness.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to