gnodet commented on issue #322:
URL: 
https://github.com/apache/maven-resources-plugin/issues/322#issuecomment-5834415583

   The root cause of this issue has been fixed in maven-filtering via PR 
apache/maven-filtering#401 (MSHARED-1004).
   
   Two bugs were at play:
   
   1. **File symlink copied verbatim** — an older NIO-based rewrite used 
`Files.copy(from, to, NOFOLLOW_LINKS)`, which copied symlinks-to-files verbatim 
into the target directory, leaving a broken relative link. That commit has 
since been reverted; the current code uses `Files.copy(from, outputStream)` 
which follows source symlinks naturally, so this part is already fixed.
   
   2. **Second build fails** — if a stale symlink exists at the destination 
(left by an older build), `CachingOutputStream` follows the dangling link and 
throws `NoSuchFileException`. The fix deletes any symlink at the destination 
before writing, ensuring the output is always a regular file.
   
   Once maven-filtering 4.0.0-beta-2 is released, the maven-resources-plugin 
will be bumped to pick it up and this issue can be closed.


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