Skip to content

Port build-versions.py to Python 3 and read its modules from the poms - #1709

Merged
dashorst merged 1 commit into
masterfrom
build-versions-python3
Oct 23, 2026
Merged

dashorst merged 1 commit into
masterfrom
build-versions-python3

Conversation

@dashorst

@dashorst dashorst commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Part of #1708, backported in #1710 (10.x), #1711 (9.x) and #1712 (8.x). build-versions.py writes the per-module versions that release.sh appends to release.properties for release:prepare. It now runs on Python 3 and takes its module list from the poms.

The old script failed on every line that still releases. It was Python 2 behind #!/usr/bin/python, so where python is Python 3 release.sh stopped with a SyntaxError. Its module list came from the <modules> of the root pom and wicket-native-websocket only, with artifact IDs derived from directory names, so the modules under wicket-experimental were missing and wicket-experimental was listed twice under two wrong groupIds. The issue has the per-branch table.

The script now walks the <modules> tree from the root pom and emits each module with the groupId and artifactId its pom declares, inheriting the groupId from <parent> where the pom has none. Adding or removing a module needs no change to the script.

Review

The only file is build-versions.py, one commit. The output format is unchanged, so release.sh needs no change.

Risk

Only release tooling changes; nothing in the build or the artifacts does. A module declared only inside a profile would also be emitted, since the script does not evaluate profiles; no branch has one.

Tests

  • master: ./build-versions.py 11.0.0 11.1.0-SNAPSHOT emits 34 modules, the same 34 as Maven's reactor build order (mvn -o validate), with org.apache.wicket.experimental.wicket10 for wicket-experimental and wicket-metrics.
  • Maintenance lines: run against each branch's poms, the script emits 32 modules on wicket-10.x and wicket-9.x and 33 on wicket-8.x, each matching that branch's <modules> tree. Maven itself was not run on those branches.

🤖 Generated with Claude Code

release.sh builds release.properties for release:prepare from the
output of build-versions.py, which gives every module its release
version and the next development version. The script was Python 2
behind #!/usr/bin/python, so where python is Python 3 release.sh
stopped there with a SyntaxError.

Its module list was also incomplete. It read the <modules> of the root
pom and of wicket-native-websocket only, derived artifact IDs from
directory names and always added wicket-experimental under the
org.apache.wicket.experimental.wicket8 groupId. The modules under
wicket-experimental were missing (wicket-metrics, and on 9.x and 8.x
wicket-http2 and its submodules), and wicket-experimental itself was
listed twice, under two wrong groupIds. The release plugin then fell
back to prompting or its own default for those modules.

The script now runs on Python 3 and walks the <modules> tree from the
root pom, taking the groupId and artifactId each pom declares. Its
output matches the reactor: 34 modules on master. Adding or removing a
module no longer needs a change to the script.

GitHub issue #1708

Generated-by: Claude Code (Claude Opus 5.5)
@codecov-commenter

codecov-commenter commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.32%. Comparing base (97b3bf5) to head (8d0bfa1).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1709   +/-   ##
=========================================
  Coverage     62.32%   62.32%           
- Complexity    11360    11363    +3     
=========================================
  Files          1253     1253           
  Lines         48438    48438           
  Branches       6794     6794           
=========================================
+ Hits          30188    30191    +3     
+ Misses        15551    15550    -1     
+ Partials       2699     2697    -2     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dashorst
dashorst merged commit 8d0bfa1 into master Oct 23, 2026
3 checks passed
@dashorst
dashorst deleted the build-versions-python3 branch October 23, 2026 15:23
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