Skip to content

Remove redundant project.build.sourceEncoding from IT POMs - #522

Merged
gnodet merged 2 commits into
apache:masterfrom
gnodet:fix/remove-redundant-source-encoding-from-its
Sep 28, 2026
Merged

gnodet merged 2 commits into
apache:masterfrom
gnodet:fix/remove-redundant-source-encoding-from-its

Conversation

@gnodet

@gnodet gnodet commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Remove the redundant <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
property from all IT pom.xml files under src/it/.

Rationale

Since MNG-7763, Maven 4 defaults project.build.sourceEncoding to UTF-8 when not
explicitly set. Since maven-resources-plugin 4.x requires Maven 4, explicitly
declaring this property in IT POMs is redundant noise. Empty <properties> blocks
left after the removal are also cleaned up.

Files changed

  • src/it/MRESOURCES-110/pom.xml — encoding line removed (block keeps replaceThis property)
  • src/it/MRESOURCES-171/pom.xml — encoding line and empty <properties> block removed
  • src/it/MRESOURCES-231/pom.xml — encoding line and empty <properties> block removed
  • src/it/MRESOURCES-257/pom.xml — encoding line and empty <properties> block removed
  • src/it/gh-312/pom.xml — encoding line removed (block keeps compiler source/target properties)
  • src/it/include-git-ignore/pom.xml — encoding line and empty <properties> block removed

Note: src/it/MRESOURCES-231/src/main/resources/test.txt references
${project.build.sourceEncoding} as a filter expression under test — it is intentionally left
unchanged, and will still resolve correctly since Maven 4 provides the default.


Co-authored-by: Claude Sonnet 4.6 noreply@anthropic.com

maven-resources-plugin 4.x requires Maven 4, which defaults
project.build.sourceEncoding to UTF-8 (MNG-7763). The explicit
declaration in IT pom.xml files is therefore redundant and can
be removed. Empty <properties> blocks are also removed.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@gnodet
gnodet marked this pull request as ready for review September 25, 2026 08:02

@gnodet-bot gnodet-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the IT POM cleanup. Findings:

IT encoding removal — all 6 IT POMs correctly drop the now-redundant project.build.sourceEncoding=UTF-8. No other IT POMs were missed (grep confirms zero remaining occurrences in src/it/**/*.xml after this patch).

MRESOURCES-231 — test.txt still uses ${project.build.sourceEncoding} as a filter expression, and verify.groovy asserts it resolves to UTF-8. This is fine: Maven 4 sets project.build.sourceEncoding to UTF-8 by default (MNG-7763), and the property is available during resource filtering, not just model interpolation.

No Maven 3 risk — no invoker.properties in src/it/ constrains invoker.maven.version, so all ITs run on whatever Maven the build uses (Maven 4 for this branch).

Stale base / unrelated changes — the PR branch appears to be based before #523 merged, so it carries a stale downgrade of mavenVersion (rc-7 → rc-6) and maven4-version in the CI workflow. It also includes an unrelated Jenkinsfile.disable → Jenkinsfile rename and a dependabot comment removal. These will likely conflict or should be split out; a rebase on current main would clean this up.

The IT encoding cleanup itself is correct and safe. 👍

This review was generated by an AI agent, Hermès on behalf of @gnodet.

@gnodet
gnodet requested a review from slachiewicz September 27, 2026 08:31

@gnodet-bot gnodet-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review after rebase (merge commit 500f42f).

Previous finding status:

  • ✅ Stale base / unrelated changes — Addressed. The branch is now rebased on current master. The diff is clean: only the 6 IT POM sourceEncoding removals, no stale version downgrades or unrelated file renames.

Diff check:

  • All 6 IT POMs correctly drop the redundant project.build.sourceEncoding=UTF-8 property
  • Empty <properties> blocks removed where applicable (MRESOURCES-171, 231, 257, include-git-ignore)
  • <properties> blocks with other properties preserved correctly (MRESOURCES-110 keeps replaceThis, gh-312 keeps compiler source/target)
  • No remaining project.build.sourceEncoding in any src/it/**/*.xml after this patch
  • MRESOURCES-231/src/main/resources/test.txt still uses ${project.build.sourceEncoding} as a filter expression — correct, Maven 4 provides the default value

Clean chore PR. Ready to merge.

This review was generated by an AI agent, Hermès on behalf of @gnodet.

@gnodet
gnodet merged commit 857a8f6 into apache:master Sep 28, 2026
16 checks passed
@gnodet
gnodet deleted the fix/remove-redundant-source-encoding-from-its branch September 28, 2026 13:30
@github-actions

Copy link
Copy Markdown

@gnodet Please assign appropriate label to PR according to the type of change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants