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


##########
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:
   > So the behavior would be different between mvn3 and mvn4 api
   
   If the difference would be that mvn3 would be relative to `target` while 
mvn4 would be relative to `baseDir`, I think that this difference was a bug 
partially fixed in #11322, but we forgot the case of resources in that fix.
   
   I will prepare an alternative pull request tomorrow for illustrating the fix 
that I propose. The actual pull request at the end may be, possibly, a mix of 
the two.



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