You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "gnodet (via GitHub)" <gi...@apache.org> on 2026/09/25 07:57:11 UTC
[PR] [MRESOURCES-453] Leverage ChangeDetection from maven-filtering #397 [maven-resources-plugin]
gnodet opened a new pull request, #527:
URL: https://github.com/apache/maven-resources-plugin/pull/527
## Summary
Port of the `ChangeDetection` strategy from [apache/maven-filtering#397](https://github.com/apache/maven-filtering/pull/397) into the plugin.
Instead of a binary `overwrite` boolean, expose the new `changeDetection` enum parameter so users have explicit control over the copy semantics:
| Value | Behaviour |
|---|---|
| `CONTENT` | *(default)* Only overwrite when content differs — i.e. current post-3.4.0 behaviour via `CachingOutputStream` |
| `TIMESTAMP` | Only overwrite when source is newer than destination — i.e. pre-3.4.0 behaviour |
| `TIMESTAMP_AND_CONTENT` | Combine both checks |
| `ALWAYS` | Always overwrite (replaces `<overwrite>true</overwrite>`) |
| `NEVER` | Never overwrite an existing destination file |
## Changes
- `pom.xml`: bump `mavenFilteringVersion` to `4.0.0-beta-2-SNAPSHOT` (requires [apache/maven-filtering#397](https://github.com/apache/maven-filtering/pull/397) to be merged and released first)
- `ResourcesMojo`: add `changeDetection` `@Parameter` (default `CONTENT`); deprecate `overwrite` with backward-compat bridge (`overwrite=true` → `ALWAYS`; `overwrite=false` defers to the declared `changeDetection`)
- New IT `MRESOURCES-453`: verifies `changeDetection=NEVER` leaves an existing destination file untouched even when source content differs
## Fixes
- https://github.com/apache/maven-resources-plugin/issues/453 (destination overwritten even with `overwrite=false` in 3.4.0)
The root cause is in maven-filtering (the `overwrite` parameter was silently dropped when the NIO/`CachingOutputStream` migration landed). This PR is the plugin-side companion to [apache/maven-filtering#397](https://github.com/apache/maven-filtering/pull/397).
## Related
- https://github.com/apache/maven-resources-plugin/issues/354 (TIMESTAMP strategy restores pre-3.4.0 semantics)
- https://github.com/apache/maven-resources-plugin/issues/316 (log-before-decision, separate issue)
- https://github.com/apache/maven-resources-plugin/issues/286 (per-resource overwrite, separate feature)
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MRESOURCES-453] Leverage ChangeDetection from maven-filtering #397 [maven-resources-plugin]
Posted by "gnodet-bot (via GitHub)" <gi...@apache.org>.
gnodet-bot commented on code in PR #527:
URL: https://github.com/apache/maven-resources-plugin/pull/527#discussion_r4103433441
##########
src/main/java/org/apache/maven/plugins/resources/ResourcesMojo.java:
##########
@@ -152,11 +153,34 @@ public class ResourcesMojo implements org.apache.maven.api.plugin.Mojo {
@Parameter
protected String escapeString;
+ /**
+ * Strategy used to decide whether an existing destination file needs to be overwritten.
+ * Accepted values:
+ * <ul>
+ * <li>{@code CONTENT} — (default) only overwrite when the content differs (uses
+ * {@code CachingOutputStream} / {@code CachingWriter}); destination timestamp is
+ * preserved when the content is identical. This is the behaviour since 3.4.0.</li>
+ * <li>{@code TIMESTAMP} — only overwrite when the source is newer than the destination
+ * (timestamp-based, as it was before 3.4.0).</li>
+ * <li>{@code TIMESTAMP_AND_CONTENT} — overwrite only when the source is newer
+ * <em>and</em> the content differs.</li>
+ * <li>{@code ALWAYS} — always overwrite existing files (equivalent to the former
+ * {@code <overwrite>true</overwrite>}).</li>
+ * <li>{@code NEVER} — never overwrite an existing destination file.</li>
+ * </ul>
+ *
+ * @since 3.4.0
Review Comment:
⚠️ **Still unresolved from previous review:** `@since 3.4.0` is incorrect — this parameter is introduced in this PR. The project version is `4.0.0-beta-2-SNAPSHOT`, so this should be `@since 4.0.0-beta-2`.
```suggestion
* @since 4.0.0-beta-2
```
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MRESOURCES-453] Leverage ChangeDetection from maven-filtering #397 [maven-resources-plugin]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #527:
URL: https://github.com/apache/maven-resources-plugin/pull/527#issuecomment-5849942362
CI was failing because the `<repositories>` section declared the Apache Snapshots repo but was missing `<snapshots><enabled>true</enabled></snapshots>`. Without it, Maven defaults to snapshots disabled and can't resolve `maven-filtering:4.0.0-beta-2-SNAPSHOT`.
Fixed in 15d4bbe.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MRESOURCES-453] Leverage ChangeDetection from maven-filtering #397 [maven-resources-plugin]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #527:
URL: https://github.com/apache/maven-resources-plugin/pull/527#issuecomment-5849787232
CI is failing because `ChangeDetection` (from maven-filtering#397) hasn't been deployed to Apache Snapshots yet.
**Root cause:** maven-filtering `master` CI is red — checkstyle fails parsing `FilteringUtilsTest.java:230` (likely a Java syntax unsupported by the checkstyle grammar version). Until that's fixed and a new `4.0.0-beta-2-SNAPSHOT` is deployed, this PR can't compile.
**Action needed:** fix the checkstyle issue in maven-filtering master, then either wait for the CI deploy or manually `mvn deploy` the snapshot.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MRESOURCES-453] Leverage ChangeDetection from maven-filtering #397 [maven-resources-plugin]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #527:
URL: https://github.com/apache/maven-resources-plugin/pull/527#issuecomment-5830615968
CI failure: `ChangeDetection` class not found in `maven-filtering` `4.0.0-beta-2-SNAPSHOT`.
The prerequisite PR [apache/maven-filtering#397](https://github.com/apache/maven-filtering/pull/397) (which introduces the `ChangeDetection` enum) has not been merged yet. The current SNAPSHOT deployed to Apache Snapshots (build `-100`, Sep 24) does not contain this class.
This PR cannot compile until maven-filtering#397 is merged and a new SNAPSHOT is deployed.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MRESOURCES-453] Leverage ChangeDetection from maven-filtering #397 [maven-resources-plugin]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on code in PR #527:
URL: https://github.com/apache/maven-resources-plugin/pull/527#discussion_r4103886921
##########
src/main/java/org/apache/maven/plugins/resources/ResourcesMojo.java:
##########
@@ -152,11 +153,34 @@ public class ResourcesMojo implements org.apache.maven.api.plugin.Mojo {
@Parameter
protected String escapeString;
+ /**
+ * Strategy used to decide whether an existing destination file needs to be overwritten.
+ * Accepted values:
+ * <ul>
+ * <li>{@code CONTENT} — (default) only overwrite when the content differs (uses
+ * {@code CachingOutputStream} / {@code CachingWriter}); destination timestamp is
+ * preserved when the content is identical. This is the behaviour since 3.4.0.</li>
+ * <li>{@code TIMESTAMP} — only overwrite when the source is newer than the destination
+ * (timestamp-based, as it was before 3.4.0).</li>
+ * <li>{@code TIMESTAMP_AND_CONTENT} — overwrite only when the source is newer
+ * <em>and</em> the content differs.</li>
+ * <li>{@code ALWAYS} — always overwrite existing files (equivalent to the former
+ * {@code <overwrite>true</overwrite>}).</li>
+ * <li>{@code NEVER} — never overwrite an existing destination file.</li>
+ * </ul>
+ *
+ * @since 3.4.0
Review Comment:
Fixed in 83ca419.
##########
src/main/java/org/apache/maven/plugins/resources/ResourcesMojo.java:
##########
@@ -152,11 +153,34 @@ public class ResourcesMojo implements org.apache.maven.api.plugin.Mojo {
@Parameter
protected String escapeString;
+ /**
+ * Strategy used to decide whether an existing destination file needs to be overwritten.
+ * Accepted values:
+ * <ul>
+ * <li>{@code CONTENT} — (default) only overwrite when the content differs (uses
+ * {@code CachingOutputStream} / {@code CachingWriter}); destination timestamp is
+ * preserved when the content is identical. This is the behaviour since 3.4.0.</li>
+ * <li>{@code TIMESTAMP} — only overwrite when the source is newer than the destination
+ * (timestamp-based, as it was before 3.4.0).</li>
+ * <li>{@code TIMESTAMP_AND_CONTENT} — overwrite only when the source is newer
+ * <em>and</em> the content differs.</li>
+ * <li>{@code ALWAYS} — always overwrite existing files (equivalent to the former
+ * {@code <overwrite>true</overwrite>}).</li>
+ * <li>{@code NEVER} — never overwrite an existing destination file.</li>
+ * </ul>
+ *
+ * @since 3.4.0
Review Comment:
Fixed in 83ca419.
##########
src/main/java/org/apache/maven/plugins/resources/ResourcesMojo.java:
##########
@@ -152,11 +153,34 @@ public class ResourcesMojo implements org.apache.maven.api.plugin.Mojo {
@Parameter
protected String escapeString;
+ /**
+ * Strategy used to decide whether an existing destination file needs to be overwritten.
+ * Accepted values:
+ * <ul>
+ * <li>{@code CONTENT} — (default) only overwrite when the content differs (uses
+ * {@code CachingOutputStream} / {@code CachingWriter}); destination timestamp is
+ * preserved when the content is identical. This is the behaviour since 3.4.0.</li>
+ * <li>{@code TIMESTAMP} — only overwrite when the source is newer than the destination
+ * (timestamp-based, as it was before 3.4.0).</li>
+ * <li>{@code TIMESTAMP_AND_CONTENT} — overwrite only when the source is newer
+ * <em>and</em> the content differs.</li>
+ * <li>{@code ALWAYS} — always overwrite existing files (equivalent to the former
+ * {@code <overwrite>true</overwrite>}).</li>
+ * <li>{@code NEVER} — never overwrite an existing destination file.</li>
+ * </ul>
+ *
+ * @since 3.4.0
Review Comment:
Fixed in 83ca419.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MRESOURCES-453] Leverage ChangeDetection from maven-filtering #397 [maven-resources-plugin]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #527:
URL: https://github.com/apache/maven-resources-plugin/pull/527#issuecomment-5849974133
⚠️ **CI Failure Analysis**: The compilation error (`ChangeDetection` class not found in `maven-filtering:4.0.0-beta-2-SNAPSHOT`) is caused by a broken CI on [apache/maven-filtering master](https://github.com/apache/maven-filtering/actions).
The Checkstyle plugin fails to parse `FilteringUtilsTest.java:230` (syntax error), which blocks the snapshot deploy. The `ChangeDetection` class from PR apache/maven-filtering#397 was merged but never made it into a deployed SNAPSHOT.
**Action needed**: Fix the Checkstyle/syntax issue on `maven-filtering` master so a new SNAPSHOT gets deployed with the `ChangeDetection` class. This PR will then compile successfully.
_Automated analysis by Hermès_
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MRESOURCES-453] Leverage ChangeDetection from maven-filtering #397 [maven-resources-plugin]
Posted by "gnodet-bot (via GitHub)" <gi...@apache.org>.
gnodet-bot commented on code in PR #527:
URL: https://github.com/apache/maven-resources-plugin/pull/527#discussion_r4102485586
##########
src/main/java/org/apache/maven/plugins/resources/ResourcesMojo.java:
##########
@@ -152,11 +153,34 @@ public class ResourcesMojo implements org.apache.maven.api.plugin.Mojo {
@Parameter
protected String escapeString;
+ /**
+ * Strategy used to decide whether an existing destination file needs to be overwritten.
+ * Accepted values:
+ * <ul>
+ * <li>{@code CONTENT} — (default) only overwrite when the content differs (uses
+ * {@code CachingOutputStream} / {@code CachingWriter}); destination timestamp is
+ * preserved when the content is identical. This is the behaviour since 3.4.0.</li>
+ * <li>{@code TIMESTAMP} — only overwrite when the source is newer than the destination
+ * (timestamp-based, as it was before 3.4.0).</li>
+ * <li>{@code TIMESTAMP_AND_CONTENT} — overwrite only when the source is newer
+ * <em>and</em> the content differs.</li>
+ * <li>{@code ALWAYS} — always overwrite existing files (equivalent to the former
+ * {@code <overwrite>true</overwrite>}).</li>
+ * <li>{@code NEVER} — never overwrite an existing destination file.</li>
+ * </ul>
+ *
+ * @since 3.4.0
Review Comment:
💡 `@since 3.4.0` is wrong — this parameter is introduced in this PR, and the project version is `4.0.0-beta-2-SNAPSHOT`. The `@since` should reflect the actual release version.
```suggestion
* @since 4.0.0-beta-2
```
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MRESOURCES-453] Leverage ChangeDetection from maven-filtering #397 [maven-resources-plugin]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on code in PR #527:
URL: https://github.com/apache/maven-resources-plugin/pull/527#discussion_r4117518063
##########
src/main/java/org/apache/maven/plugins/resources/ResourcesMojo.java:
##########
@@ -152,11 +153,34 @@ public class ResourcesMojo implements org.apache.maven.api.plugin.Mojo {
@Parameter
protected String escapeString;
+ /**
+ * Strategy used to decide whether an existing destination file needs to be overwritten.
+ * Accepted values:
+ * <ul>
+ * <li>{@code CONTENT} — (default) only overwrite when the content differs (uses
+ * {@code CachingOutputStream} / {@code CachingWriter}); destination timestamp is
+ * preserved when the content is identical. This is the behaviour since 3.4.0.</li>
+ * <li>{@code TIMESTAMP} — only overwrite when the source is newer than the destination
+ * (timestamp-based, as it was before 3.4.0).</li>
+ * <li>{@code TIMESTAMP_AND_CONTENT} — overwrite only when the source is newer
+ * <em>and</em> the content differs.</li>
+ * <li>{@code ALWAYS} — always overwrite existing files (equivalent to the former
+ * {@code <overwrite>true</overwrite>}).</li>
+ * <li>{@code NEVER} — never overwrite an existing destination file.</li>
+ * </ul>
+ *
+ * @since 3.4.0
Review Comment:
Fixed in 9a4a008.
##########
src/main/java/org/apache/maven/plugins/resources/ResourcesMojo.java:
##########
@@ -152,11 +153,34 @@ public class ResourcesMojo implements org.apache.maven.api.plugin.Mojo {
@Parameter
protected String escapeString;
+ /**
+ * Strategy used to decide whether an existing destination file needs to be overwritten.
+ * Accepted values:
+ * <ul>
+ * <li>{@code CONTENT} — (default) only overwrite when the content differs (uses
+ * {@code CachingOutputStream} / {@code CachingWriter}); destination timestamp is
+ * preserved when the content is identical. This is the behaviour since 3.4.0.</li>
+ * <li>{@code TIMESTAMP} — only overwrite when the source is newer than the destination
+ * (timestamp-based, as it was before 3.4.0).</li>
+ * <li>{@code TIMESTAMP_AND_CONTENT} — overwrite only when the source is newer
+ * <em>and</em> the content differs.</li>
+ * <li>{@code ALWAYS} — always overwrite existing files (equivalent to the former
+ * {@code <overwrite>true</overwrite>}).</li>
+ * <li>{@code NEVER} — never overwrite an existing destination file.</li>
+ * </ul>
+ *
+ * @since 3.4.0
Review Comment:
Fixed in 9a4a008.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MRESOURCES-453] Leverage ChangeDetection from maven-filtering #397 [maven-resources-plugin]
Posted by "gnodet-bot (via GitHub)" <gi...@apache.org>.
gnodet-bot commented on code in PR #527:
URL: https://github.com/apache/maven-resources-plugin/pull/527#discussion_r4103463774
##########
src/main/java/org/apache/maven/plugins/resources/ResourcesMojo.java:
##########
@@ -152,11 +153,34 @@ public class ResourcesMojo implements org.apache.maven.api.plugin.Mojo {
@Parameter
protected String escapeString;
+ /**
+ * Strategy used to decide whether an existing destination file needs to be overwritten.
+ * Accepted values:
+ * <ul>
+ * <li>{@code CONTENT} — (default) only overwrite when the content differs (uses
+ * {@code CachingOutputStream} / {@code CachingWriter}); destination timestamp is
+ * preserved when the content is identical. This is the behaviour since 3.4.0.</li>
+ * <li>{@code TIMESTAMP} — only overwrite when the source is newer than the destination
+ * (timestamp-based, as it was before 3.4.0).</li>
+ * <li>{@code TIMESTAMP_AND_CONTENT} — overwrite only when the source is newer
+ * <em>and</em> the content differs.</li>
+ * <li>{@code ALWAYS} — always overwrite existing files (equivalent to the former
+ * {@code <overwrite>true</overwrite>}).</li>
+ * <li>{@code NEVER} — never overwrite an existing destination file.</li>
+ * </ul>
+ *
+ * @since 3.4.0
Review Comment:
⚠️ **Still unresolved (3rd review):** `@since 3.4.0` is incorrect — the `changeDetection` parameter is introduced in this PR. The milestone is `4.0.0-beta-2`.
```suggestion
* @since 4.0.0-beta-2
```
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MRESOURCES-453] Leverage ChangeDetection from maven-filtering #397 [maven-resources-plugin]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #527:
URL: https://github.com/apache/maven-resources-plugin/pull/527#issuecomment-5831295379
CI failure on `4.0.0-rc-7`: `ChangeDetection` class not found in `org.apache.maven.shared.filtering`.
This is expected — this PR depends on [apache/maven-filtering#397](https://github.com/apache/maven-filtering/pull/397) being merged and deployed as a SNAPSHOT first. That PR is open with CI green, awaiting review/merge.
Once maven-filtering#397 is merged and the SNAPSHOT is published, CI here will pass.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MRESOURCES-453] Leverage ChangeDetection from maven-filtering #397 [maven-resources-plugin]
Posted by "gnodet-bot (via GitHub)" <gi...@apache.org>.
gnodet-bot commented on code in PR #527:
URL: https://github.com/apache/maven-resources-plugin/pull/527#discussion_r4112746111
##########
src/main/java/org/apache/maven/plugins/resources/ResourcesMojo.java:
##########
@@ -152,11 +153,34 @@ public class ResourcesMojo implements org.apache.maven.api.plugin.Mojo {
@Parameter
protected String escapeString;
+ /**
+ * Strategy used to decide whether an existing destination file needs to be overwritten.
+ * Accepted values:
+ * <ul>
+ * <li>{@code CONTENT} — (default) only overwrite when the content differs (uses
+ * {@code CachingOutputStream} / {@code CachingWriter}); destination timestamp is
+ * preserved when the content is identical. This is the behaviour since 3.4.0.</li>
+ * <li>{@code TIMESTAMP} — only overwrite when the source is newer than the destination
+ * (timestamp-based, as it was before 3.4.0).</li>
+ * <li>{@code TIMESTAMP_AND_CONTENT} — overwrite only when the source is newer
+ * <em>and</em> the content differs.</li>
+ * <li>{@code ALWAYS} — always overwrite existing files (equivalent to the former
+ * {@code <overwrite>true</overwrite>}).</li>
+ * <li>{@code NEVER} — never overwrite an existing destination file.</li>
+ * </ul>
+ *
+ * @since 3.4.0
Review Comment:
⚠️ **Still unresolved (5th review):** `@since 3.4.0` is incorrect — the `changeDetection` parameter is new in this PR. The milestone is `4.0.0-beta-2`. This was fixed in commit `83ca419` but reverted by the subsequent rebase.
```suggestion
* @since 4.0.0-beta-2
```
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MRESOURCES-453] Leverage ChangeDetection from maven-filtering #397 [maven-resources-plugin]
Posted by "gnodet-bot (via GitHub)" <gi...@apache.org>.
gnodet-bot commented on code in PR #527:
URL: https://github.com/apache/maven-resources-plugin/pull/527#discussion_r4112736800
##########
src/main/java/org/apache/maven/plugins/resources/ResourcesMojo.java:
##########
@@ -152,11 +153,34 @@ public class ResourcesMojo implements org.apache.maven.api.plugin.Mojo {
@Parameter
protected String escapeString;
+ /**
+ * Strategy used to decide whether an existing destination file needs to be overwritten.
+ * Accepted values:
+ * <ul>
+ * <li>{@code CONTENT} — (default) only overwrite when the content differs (uses
+ * {@code CachingOutputStream} / {@code CachingWriter}); destination timestamp is
+ * preserved when the content is identical. This is the behaviour since 3.4.0.</li>
+ * <li>{@code TIMESTAMP} — only overwrite when the source is newer than the destination
+ * (timestamp-based, as it was before 3.4.0).</li>
+ * <li>{@code TIMESTAMP_AND_CONTENT} — overwrite only when the source is newer
+ * <em>and</em> the content differs.</li>
+ * <li>{@code ALWAYS} — always overwrite existing files (equivalent to the former
+ * {@code <overwrite>true</overwrite>}).</li>
+ * <li>{@code NEVER} — never overwrite an existing destination file.</li>
+ * </ul>
+ *
+ * @since 3.4.0
Review Comment:
⚠️ **Regression from rebase:** The `@since` tag was fixed to `4.0.0-beta-2` in commit `83ca419`, but the rebase reverted it back to `3.4.0`. This parameter is new in this PR — the version should match the milestone.
```suggestion
* @since 4.0.0-beta-2
```
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MRESOURCES-453] Leverage ChangeDetection from maven-filtering #397 [maven-resources-plugin]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #527:
URL: https://github.com/apache/maven-resources-plugin/pull/527#issuecomment-5849882905
CI failure is caused by the latest `maven-filtering 4.0.0-beta-2-SNAPSHOT` (build 105, deployed at 17:52 UTC) missing the `ChangeDetection` class. Build 104 (deployed at 17:12 UTC, right after [#397](https://github.com/apache/maven-filtering/pull/397) was merged) had the class, but a subsequent deployment overwrote it with a build that doesn't include it.
This is an upstream `maven-filtering` SNAPSHOT deployment issue — the source on `main` is correct (`ChangeDetection.java` is present), but the deployed artifact regressed.
Once a corrected SNAPSHOT is deployed, CI should pass.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MRESOURCES-453] Leverage ChangeDetection from maven-filtering #397 [maven-resources-plugin]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet merged PR #527:
URL: https://github.com/apache/maven-resources-plugin/pull/527
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MRESOURCES-453] Leverage ChangeDetection from maven-filtering #397 [maven-resources-plugin]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #527:
URL: https://github.com/apache/maven-resources-plugin/pull/527#issuecomment-5831371888
⚠️ **CI blocked on upstream dependency**
The compilation fails because `ChangeDetection` class does not exist in the current `maven-filtering` `4.0.0-beta-2-SNAPSHOT`. This class is introduced by [apache/maven-filtering#397](https://github.com/apache/maven-filtering/pull/397), which is still open (CI is green, awaiting merge).
Once maven-filtering#397 is merged and the snapshot is deployed, this PR's CI should pass.
_— Hermès 🤖_
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MRESOURCES-453] Leverage ChangeDetection from maven-filtering #397 [maven-resources-plugin]
Posted by "gnodet-bot (via GitHub)" <gi...@apache.org>.
gnodet-bot commented on code in PR #527:
URL: https://github.com/apache/maven-resources-plugin/pull/527#discussion_r4117509425
##########
src/main/java/org/apache/maven/plugins/resources/ResourcesMojo.java:
##########
@@ -152,11 +153,34 @@ public class ResourcesMojo implements org.apache.maven.api.plugin.Mojo {
@Parameter
protected String escapeString;
+ /**
+ * Strategy used to decide whether an existing destination file needs to be overwritten.
+ * Accepted values:
+ * <ul>
+ * <li>{@code CONTENT} — (default) only overwrite when the content differs (uses
+ * {@code CachingOutputStream} / {@code CachingWriter}); destination timestamp is
+ * preserved when the content is identical. This is the behaviour since 3.4.0.</li>
+ * <li>{@code TIMESTAMP} — only overwrite when the source is newer than the destination
+ * (timestamp-based, as it was before 3.4.0).</li>
+ * <li>{@code TIMESTAMP_AND_CONTENT} — overwrite only when the source is newer
+ * <em>and</em> the content differs.</li>
+ * <li>{@code ALWAYS} — always overwrite existing files (equivalent to the former
+ * {@code <overwrite>true</overwrite>}).</li>
+ * <li>{@code NEVER} — never overwrite an existing destination file.</li>
+ * </ul>
+ *
+ * @since 3.4.0
Review Comment:
⚠️ **Regression from rebase (7th review):** `@since 3.4.0` is incorrect — the `changeDetection` parameter is new in this PR. The milestone is `4.0.0-beta-2`. This was fixed in `cf0b8a8`, lost in the first rebase, fixed again, and lost in this rebase.
```suggestion
* @since 4.0.0-beta-2
```
##########
src/main/java/org/apache/maven/plugins/resources/ResourcesMojo.java:
##########
@@ -152,11 +153,34 @@ public class ResourcesMojo implements org.apache.maven.api.plugin.Mojo {
@Parameter
protected String escapeString;
+ /**
+ * Strategy used to decide whether an existing destination file needs to be overwritten.
+ * Accepted values:
+ * <ul>
+ * <li>{@code CONTENT} — (default) only overwrite when the content differs (uses
+ * {@code CachingOutputStream} / {@code CachingWriter}); destination timestamp is
+ * preserved when the content is identical. This is the behaviour since 3.4.0.</li>
+ * <li>{@code TIMESTAMP} — only overwrite when the source is newer than the destination
+ * (timestamp-based, as it was before 3.4.0).</li>
+ * <li>{@code TIMESTAMP_AND_CONTENT} — overwrite only when the source is newer
+ * <em>and</em> the content differs.</li>
+ * <li>{@code ALWAYS} — always overwrite existing files (equivalent to the former
+ * {@code <overwrite>true</overwrite>}).</li>
+ * <li>{@code NEVER} — never overwrite an existing destination file.</li>
+ * </ul>
+ *
+ * @since 3.4.0
Review Comment:
⚠️ **Regression (7th review):** `@since 3.4.0` is incorrect — this parameter is new in this PR. The rebase squashed all commits but used the original value instead of the fix from `cf0b8a8`. Should be `4.0.0-beta-2`.
```suggestion
* @since 4.0.0-beta-2
```
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MRESOURCES-453] Leverage ChangeDetection from maven-filtering #397 [maven-resources-plugin]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #527:
URL: https://github.com/apache/maven-resources-plugin/pull/527#issuecomment-5876242906
Hi @cstamas, @desruisseaux, @slachiewicz, @slawekjaranowski, @rmanibuceau, @bukama — this PR is targeted for the **4.0.0-beta-2** milestone and hasn't received any reviews yet. Would any of you have time to take a look? 🙏
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MRESOURCES-453] Leverage ChangeDetection from maven-filtering #397 [maven-resources-plugin]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on code in PR #527:
URL: https://github.com/apache/maven-resources-plugin/pull/527#discussion_r4112758266
##########
src/main/java/org/apache/maven/plugins/resources/ResourcesMojo.java:
##########
@@ -152,11 +153,34 @@ public class ResourcesMojo implements org.apache.maven.api.plugin.Mojo {
@Parameter
protected String escapeString;
+ /**
+ * Strategy used to decide whether an existing destination file needs to be overwritten.
+ * Accepted values:
+ * <ul>
+ * <li>{@code CONTENT} — (default) only overwrite when the content differs (uses
+ * {@code CachingOutputStream} / {@code CachingWriter}); destination timestamp is
+ * preserved when the content is identical. This is the behaviour since 3.4.0.</li>
+ * <li>{@code TIMESTAMP} — only overwrite when the source is newer than the destination
+ * (timestamp-based, as it was before 3.4.0).</li>
+ * <li>{@code TIMESTAMP_AND_CONTENT} — overwrite only when the source is newer
+ * <em>and</em> the content differs.</li>
+ * <li>{@code ALWAYS} — always overwrite existing files (equivalent to the former
+ * {@code <overwrite>true</overwrite>}).</li>
+ * <li>{@code NEVER} — never overwrite an existing destination file.</li>
+ * </ul>
+ *
+ * @since 3.4.0
Review Comment:
Fixed in cf0b8a8.
##########
src/main/java/org/apache/maven/plugins/resources/ResourcesMojo.java:
##########
@@ -152,11 +153,34 @@ public class ResourcesMojo implements org.apache.maven.api.plugin.Mojo {
@Parameter
protected String escapeString;
+ /**
+ * Strategy used to decide whether an existing destination file needs to be overwritten.
+ * Accepted values:
+ * <ul>
+ * <li>{@code CONTENT} — (default) only overwrite when the content differs (uses
+ * {@code CachingOutputStream} / {@code CachingWriter}); destination timestamp is
+ * preserved when the content is identical. This is the behaviour since 3.4.0.</li>
+ * <li>{@code TIMESTAMP} — only overwrite when the source is newer than the destination
+ * (timestamp-based, as it was before 3.4.0).</li>
+ * <li>{@code TIMESTAMP_AND_CONTENT} — overwrite only when the source is newer
+ * <em>and</em> the content differs.</li>
+ * <li>{@code ALWAYS} — always overwrite existing files (equivalent to the former
+ * {@code <overwrite>true</overwrite>}).</li>
+ * <li>{@code NEVER} — never overwrite an existing destination file.</li>
+ * </ul>
+ *
+ * @since 3.4.0
Review Comment:
Fixed in cf0b8a8.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MRESOURCES-453] Leverage ChangeDetection from maven-filtering #397 [maven-resources-plugin]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #527:
URL: https://github.com/apache/maven-resources-plugin/pull/527#issuecomment-5849913788
## CI Failure Analysis
The compilation failure (`cannot find symbol: class ChangeDetection` in `org.apache.maven.shared.filtering`) is caused by an **upstream SNAPSHOT not yet containing the class**.
### Root Cause
1. [apache/maven-filtering#397](https://github.com/apache/maven-filtering/pull/397) (`ChangeDetection` strategy) was merged at 17:12 UTC today
2. The post-merge CI on `maven-filtering` master [**failed**](https://github.com/apache/maven-filtering/actions/runs/36258503500) due to a checkstyle parsing error in `FilteringUtilsTest.java` (likely new Java syntax unsupported by the checkstyle grammar)
3. Because CI failed, **no new SNAPSHOT was deployed** to the Apache snapshot repository with the `ChangeDetection` class
4. The latest snapshot (`4.0.0-beta-2-20260926.175207-105`) was built from a state **before** PR #397 was merged
### Resolution
The `maven-filtering` checkstyle issue needs to be fixed first so that a SNAPSHOT containing `ChangeDetection` gets deployed. Then this PR's CI will pass on the next rerun.
_This analysis was generated by Hermès on behalf of @gnodet._
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [MRESOURCES-453] Leverage ChangeDetection from maven-filtering #397 [maven-resources-plugin]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on PR #527:
URL: https://github.com/apache/maven-resources-plugin/pull/527#issuecomment-5849847888
CI failure is caused by a missing `ChangeDetection` class in the `maven-filtering` 4.0.0-beta-2-SNAPSHOT dependency.
**Root cause:** The `ChangeDetection` enum was [added to maven-filtering master](https://github.com/apache/maven-filtering/commit/e5c3765) but the CI for `maven-filtering` master [failed](https://github.com/apache/maven-filtering/actions/runs/36258503500) due to a Checkstyle parsing error in `FilteringUtilsTest.java` (line 230 — `InputMismatchException`). As a result, the SNAPSHOT jar was never redeployed with the new class.
**Fix needed:** Fix the Checkstyle issue in `apache/maven-filtering` master → CI green → SNAPSHOT deployed → re-run this PR's CI.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org