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

   The original regression reported here — an exception thrown when a file 
already exists during a non-clean build — was caused by a change introduced 
during the `3.3.0-SNAPSHOT` development cycle 
([MSHARED-966](https://issues.apache.org/jira/browse/MSHARED-966), commit 
`7e0adf5` in `maven-filtering`). That change used `Files.copy()` without 
`StandardCopyOption.REPLACE_EXISTING` when `overwrite=false`, throwing 
`FileAlreadyExistsException` on existing destinations.
   
   The change was **reverted before `maven-filtering-3.3.0` shipped** (commit 
`a6c95ef`), so the exception behavior was never present in any released version 
of the plugin.
   
   The current `master` branch (4.0.0-beta-2-SNAPSHOT) uses 
`CachingOutputStream`/`CachingWriter` in `FilteringUtils.copyFile()`, which 
does not throw on existing files.
   
   A related issue — `overwrite=false` being silently ignored since 3.4.0 
(because `CachingOutputStream` always writes if content differs, ignoring the 
old timestamp-based skip) — is tracked in #453 and will be fixed by PR #397, 
which ports the `ChangeDetection` strategy to the 4.x (Path-based) API. Once 
merged, all strategies (TIMESTAMP, CONTENT, TIMESTAMP_AND_CONTENT, ALWAYS, 
NEVER) will be configurable on both branches.
   
   Closing as **not reproducible** (the exception was reverted before the first 
release that would have contained it). The overwrite semantics improvement is 
tracked separately in #453 / PR #397.


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