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


##########
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:
   > Fwiw, the expectation in Maven 3 is that `Resource.getTargetPath()` will 
be resolved against either `project.build.outputDirectory` or 
`project.build.testOutputDirectory`.
   
   Yes I agree, but the replacement of `baseDir::resolve` by `Path::of` does 
not fix that. The correction is rather to fix the `baseDir` argument given in 
*calls* to the `DefaultSourceRoot` constructor. Actually, the [first commit of 
this pull 
request](https://github.com/apache/maven/pull/11394/commits/eb23cfcee98d3a4d9136ccc69f115d3d51f70607)
 seems correct to me, but it seems to have been reverted in subsequent commits.



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