Skip to content

Version all POMs in the release workflow and verify they stay in sync - #338

Merged
AndreasIgel merged 5 commits into
java-helpers:mainfrom
igel-devin-ai:devin/1791727357-release-version-all-poms
Oct 11, 2026
Merged

AndreasIgel merged 5 commits into
java-helpers:mainfrom
igel-devin-ai:devin/1791727357-release-version-all-poms

Conversation

@igel-devin-ai

@igel-devin-ai igel-devin-ai commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes the root cause behind #336.

Problem

maven-central-release.yml bumped a hardcoded module list (-pl core,processor,example,example-custom-generator + explicit git add). performance-test (only part of the performance-test profile) was never bumped, so after #295 it stayed on 0.6.0-SNAPSHOT while main is on 0.7.0-SNAPSHOT. Since #329 Dependabot scans /performance-test, sees simple-builders-core:${project.version} = 0.6.0-SNAPSHOT and proposes the released 0.6.0 (#336).

Changes

  • New .github/scripts/project-version.sh:
    • --set <version> runs versions:set on every tracked pom.xml (discovered via git ls-files), so new or profile-only modules are picked up automatically. -DupdateBuildOutputTimestampPolicy=never leaves project.build.outputTimestamp to the existing dedicated release step.
    • --verify fails if any POM's version differs from the root POM's.
  • Release workflow: runs --verify in "Determine version"; uses --set for both the release and the next-snapshot bump; stages pom.xml '*/pom.xml' instead of a fixed file list. Deploy/SBOM/timestamp steps keep their explicit core,processor list on purpose (that list controls what gets published).
  • performance-test/pom.xml → 0.7.0-SNAPSHOT; RELEASE.md updated.

Once merged, Dependabot should close #336 on its own (0.6.0 is older than 0.7.0-SNAPSHOT).

Tested locally

  • --verify on current main fails on performance-test/pom.xml (0.6.0-SNAPSHOT vs 0.7.0-SNAPSHOT); passes after the fix.
  • --set 0.7.0 in a scratch copy changes exactly the <version> of all 6 POMs, and git add -- pom.xml '*/pom.xml' stages all of them.
  • shellcheck clean.

Written by Devin

The release workflow bumped a hardcoded module list, so performance-test
(only part of a profile) was left on 0.6.0-SNAPSHOT, which made Dependabot
propose bumping it to the released 0.6.0 (java-helpers#336).

- add .github/scripts/project-version.sh (set|verify) discovering all
  tracked POMs via git
- use it for the release and next-snapshot bumps and stage all POMs
- fail CI and the release when any POM drifts from the root version
- align performance-test with 0.7.0-SNAPSHOT
- readable functions and explicit --set <version> / --verify / --help options
- run the version check only for release/* PRs, not on every CI build
  nor in the release workflow
@codecov

codecov Bot commented Oct 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@sonarqubecloud

Copy link
Copy Markdown

@AndreasIgel
AndreasIgel merged commit efa3b1a into java-helpers:main Oct 11, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants