Skip to content

Feature/individual sub modul versioning#179

Open
AnteLund wants to merge 5 commits into
mainfrom
feature/individual-sub-modul-versioning
Open

Feature/individual sub modul versioning#179
AnteLund wants to merge 5 commits into
mainfrom
feature/individual-sub-modul-versioning

Conversation

@AnteLund

@AnteLund AnteLund commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator
  • Add support for the individual version strategy, allowing sub-modules in a multi-module Maven project to be versioned independently of each other.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds per-module (independent) versioning support for multi-module Maven reactors, including linked/fixed sub-groups and optional BOM-aware behavior, by switching from a single VERSION handoff file to a per-module VERSIONS mapping and updating the prepare/release flows accordingly.

Changes:

  • Introduces independent versioning with optional linked/fixed module grouping and BOM support (including skipBom).
  • Reworks prepare/release to compute/apply versions per artifactId and to hand off via .changeset/VERSIONS.
  • Expands integration tests and unit tests to cover independent/group/BOM/SNAPSHOT semantics and new changelog rendering.

Reviewed changes

Copilot reviewed 100 out of 101 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
README.md Documents independent/group/BOM strategies and prepare/release handoff via VERSIONS.
changesets-maven-plugin/src/main/java/se/fortnox/changesets/VersionsFile.java New helper for reading/writing .changeset/VERSIONS (artifactId → release version).
changesets-maven-plugin/src/main/java/se/fortnox/changesets/VersionFile.java Removes old single-version VERSION file helper.
changesets-maven-plugin/src/main/java/se/fortnox/changesets/maven/ReleaseMojo.java Applies per-module release versions from VERSIONS, syncs parent refs, updates BOM properties on release.
changesets-maven-plugin/src/main/java/se/fortnox/changesets/maven/PrepareMojo.java Aggregator prepare: plans bumps per module, writes VERSIONS, updates to next-dev snapshots, BOM property rewrite, supports skipBom.
changesets-maven-plugin/src/main/java/se/fortnox/changesets/maven/PomUpdater.java Adds setProperty to rewrite BOM <properties> pins.
changesets-maven-plugin/src/main/java/se/fortnox/changesets/maven/policy/ChangesetsVersionPolicy.java Release-plugin integration now resolves release/dev versions per module via VERSIONS.
changesets-maven-plugin/src/main/java/se/fortnox/changesets/maven/BomResolver.java New resolver for mapping BOM managed deps to the pinning property names.
changesets-maven-plugin/src/it/snapshot-versions/verify.groovy New IT verifying SNAPSHOT-as-next-release semantics (no double-bump).
changesets-maven-plugin/src/it/snapshot-versions/pom.xml New IT reactor root for SNAPSHOT version test.
changesets-maven-plugin/src/it/snapshot-versions/module-b/pom.xml New SNAPSHOT module fixture.
changesets-maven-plugin/src/it/snapshot-versions/module-a/pom.xml New SNAPSHOT module fixture.
changesets-maven-plugin/src/it/snapshot-versions/invoker.properties Runs prepare for SNAPSHOT IT.
changesets-maven-plugin/src/it/snapshot-versions/.changeset/patch-a.md Changeset fixture for SNAPSHOT IT.
changesets-maven-plugin/src/it/snapshot-versions/.changeset/config.json Enables independent for SNAPSHOT IT.
changesets-maven-plugin/src/it/release/verify.groovy Updates IT to assert via VERSIONS (no longer VERSION).
changesets-maven-plugin/src/it/release/.changeset/VERSIONS Adds per-module VERSIONS fixture for release IT.
changesets-maven-plugin/src/it/release/.changeset/VERSION Removes obsolete VERSION fixture.
changesets-maven-plugin/src/it/release-multimodule/verify.groovy Updates multi-module release IT expectations (parent sync + VERSIONS).
changesets-maven-plugin/src/it/release-multimodule/.changeset/VERSIONS Adds per-module VERSIONS fixture for multimodule release IT.
changesets-maven-plugin/src/it/release-multimodule/.changeset/VERSION Removes obsolete VERSION fixture.
changesets-maven-plugin/src/it/prepare/verify.groovy Updates prepare IT to assert VERSIONS contents and new changelog header format.
changesets-maven-plugin/src/it/prepare/pom.xml Adjusts starting version for prepare IT.
changesets-maven-plugin/src/it/prepare/EXPECTED_CHANGELOG.md Updates expected changelog format (multi-module-style headers).
changesets-maven-plugin/src/it/prepare/.changeset/VERSION Removes obsolete VERSION fixture.
changesets-maven-plugin/src/it/prepare-release-plugin-integration/verify.groovy Updates release-plugin-integration IT to assert VERSIONS and behavior.
changesets-maven-plugin/src/it/prepare-release-plugin-integration/EXPECTED_CHANGELOG.md Updates expected changelog format for integration IT.
changesets-maven-plugin/src/it/prepare-release-plugin-integration/.changeset/VERSION Removes obsolete VERSION fixture.
changesets-maven-plugin/src/it/prepare-no-version/verify.groovy Removes obsolete IT for missing VERSION behavior.
changesets-maven-plugin/src/it/prepare-no-version/EXPECTED_CHANGELOG.md Removes expected output for removed IT.
changesets-maven-plugin/src/it/prepare-no-version/.changeset/seven-owls-suspect.md Removes changeset fixture for removed IT.
changesets-maven-plugin/src/it/prepare-no-version/.changeset/nine-owls-knock.md Removes changeset fixture for removed IT.
changesets-maven-plugin/src/it/multi-module/verify.groovy Updates fixed-strategy IT to assert all modules appear in VERSIONS.
changesets-maven-plugin/src/it/multi-module/EXPECTED_CHANGELOG.md Updates expected changelog header format.
changesets-maven-plugin/src/it/multi-module/.changeset/VERSION Removes obsolete VERSION fixture.
changesets-maven-plugin/src/it/linked-groups/verify.groovy New IT for linked group where only one member has a changeset.
changesets-maven-plugin/src/it/linked-groups/pom.xml New linked-group reactor fixture.
changesets-maven-plugin/src/it/linked-groups/module-b/pom.xml New linked-group module fixture.
changesets-maven-plugin/src/it/linked-groups/module-a/pom.xml New linked-group module fixture.
changesets-maven-plugin/src/it/linked-groups/invoker.properties Runs prepare for linked-group IT.
changesets-maven-plugin/src/it/linked-groups/EXPECTED_CHANGELOG.md Expected changelog for linked-group IT.
changesets-maven-plugin/src/it/linked-groups/.changeset/config.json Enables independent + linked group for IT.
changesets-maven-plugin/src/it/linked-groups/.changeset/bump-a.md Changeset fixture for linked-group IT.
changesets-maven-plugin/src/it/linked-groups-multi/verify.groovy New IT for linked group where both members have changesets (max bump level).
changesets-maven-plugin/src/it/linked-groups-multi/pom.xml New linked-group-multi reactor fixture.
changesets-maven-plugin/src/it/linked-groups-multi/module-b/pom.xml New linked-group-multi module fixture.
changesets-maven-plugin/src/it/linked-groups-multi/module-a/pom.xml New linked-group-multi module fixture.
changesets-maven-plugin/src/it/linked-groups-multi/invoker.properties Runs prepare for linked-group-multi IT.
changesets-maven-plugin/src/it/linked-groups-multi/EXPECTED_CHANGELOG.md Expected changelog for linked-group-multi IT.
changesets-maven-plugin/src/it/linked-groups-multi/.changeset/patch-a.md Changeset fixture for linked-group-multi IT.
changesets-maven-plugin/src/it/linked-groups-multi/.changeset/minor-b.md Changeset fixture for linked-group-multi IT.
changesets-maven-plugin/src/it/linked-groups-multi/.changeset/config.json Enables independent + linked group for IT.
changesets-maven-plugin/src/it/independent-versioning/verify.groovy New IT verifying independent per-module bumps and unchanged root.
changesets-maven-plugin/src/it/independent-versioning/pom.xml New independent-versioning reactor fixture.
changesets-maven-plugin/src/it/independent-versioning/module-b/pom.xml New independent-versioning module fixture.
changesets-maven-plugin/src/it/independent-versioning/module-a/pom.xml New independent-versioning module fixture.
changesets-maven-plugin/src/it/independent-versioning/invoker.properties Runs prepare for independent-versioning IT.
changesets-maven-plugin/src/it/independent-versioning/EXPECTED_CHANGELOG.md Expected changelog for independent-versioning IT.
changesets-maven-plugin/src/it/independent-versioning/.changeset/config.json Enables independent for IT.
changesets-maven-plugin/src/it/independent-versioning/.changeset/bump-b.md Changeset fixture for IT.
changesets-maven-plugin/src/it/independent-versioning/.changeset/bump-a.md Changeset fixture for IT.
changesets-maven-plugin/src/it/fixed-groups/verify.groovy New IT verifying fixed sub-group semantics inside independent mode.
changesets-maven-plugin/src/it/fixed-groups/pom.xml New fixed-groups reactor fixture.
changesets-maven-plugin/src/it/fixed-groups/module-c/pom.xml New fixed-groups module fixture.
changesets-maven-plugin/src/it/fixed-groups/module-b/pom.xml New fixed-groups module fixture.
changesets-maven-plugin/src/it/fixed-groups/module-a/pom.xml New fixed-groups module fixture.
changesets-maven-plugin/src/it/fixed-groups/invoker.properties Runs prepare for fixed-groups IT.
changesets-maven-plugin/src/it/fixed-groups/EXPECTED_CHANGELOG.md Expected changelog for fixed-groups IT.
changesets-maven-plugin/src/it/fixed-groups/.changeset/config.json Enables independent + fixed group for IT.
changesets-maven-plugin/src/it/fixed-groups/.changeset/bump-a.md Changeset fixture for fixed-groups IT.
changesets-maven-plugin/src/it/bom-versioning/verify.groovy New IT verifying BOM auto-bump + properties rewrite + consumer-parent behavior.
changesets-maven-plugin/src/it/bom-versioning/starter-b/pom.xml New BOM IT module fixture.
changesets-maven-plugin/src/it/bom-versioning/starter-a/pom.xml New BOM IT module fixture.
changesets-maven-plugin/src/it/bom-versioning/pom.xml New BOM IT reactor root fixture.
changesets-maven-plugin/src/it/bom-versioning/invoker.properties Runs prepare for BOM IT.
changesets-maven-plugin/src/it/bom-versioning/EXPECTED_CHANGELOG.md Expected BOM-mode changelog rendering.
changesets-maven-plugin/src/it/bom-versioning/consumer-parent/pom.xml New BOM IT consumer-parent fixture.
changesets-maven-plugin/src/it/bom-versioning/bom/pom.xml New BOM module fixture with pinned properties.
changesets-maven-plugin/src/it/bom-versioning/.changeset/config.json Enables independent + bom config for IT.
changesets-maven-plugin/src/it/bom-versioning/.changeset/bump-b.md Changeset fixture for BOM IT.
changesets-maven-plugin/src/it/bom-versioning/.changeset/bump-a.md Changeset fixture for BOM IT.
changesets-maven-plugin/src/it/bom-skipBom/verify.groovy New IT verifying skipBom=true bypasses BOM bump/property rewrite.
changesets-maven-plugin/src/it/bom-skipBom/test.properties Sets skipBom=true for IT run.
changesets-maven-plugin/src/it/bom-skipBom/starter-b/pom.xml BOM skipBom IT module fixture.
changesets-maven-plugin/src/it/bom-skipBom/starter-a/pom.xml BOM skipBom IT module fixture.
changesets-maven-plugin/src/it/bom-skipBom/pom.xml BOM skipBom IT reactor root fixture.
changesets-maven-plugin/src/it/bom-skipBom/invoker.properties Runs prepare for skipBom IT.
changesets-maven-plugin/src/it/bom-skipBom/EXPECTED_CHANGELOG.md Expected plain independent changelog under skipBom.
changesets-maven-plugin/src/it/bom-skipBom/consumer-parent/pom.xml BOM skipBom IT consumer-parent fixture.
changesets-maven-plugin/src/it/bom-skipBom/bom/pom.xml BOM skipBom IT BOM fixture.
changesets-maven-plugin/src/it/bom-skipBom/.changeset/config.json Enables independent + bom (then bypassed via skipBom) for IT.
changesets-maven-plugin/src/it/bom-skipBom/.changeset/bump-b.md Changeset fixture for skipBom IT.
changesets-maven-plugin/src/it/bom-skipBom/.changeset/bump-a.md Changeset fixture for skipBom IT.
changesets-java/src/test/java/se/fortnox/changesets/ChangesetsConfigTest.java Unit tests for config defaults/loading/validation (including BOM config parsing).
changesets-java/src/test/java/se/fortnox/changesets/ChangelogAggregatorTest.java Adds unit coverage for multi-module and BOM-mode changelog rendering behaviors.
changesets-java/src/test/java/se/fortnox/changesets/BumpPlannerTest.java Adds unit coverage for fixed/independent/linked/fixed-group/BOM bump planning.
changesets-java/src/main/java/se/fortnox/changesets/ChangesetsConfig.java New config model for versioning strategy, grouping, changelog mode, and BOM settings.
changesets-java/src/main/java/se/fortnox/changesets/ChangesetLocator.java Adds getAllChangesets() and refactors filtering for module-specific changesets.
changesets-java/src/main/java/se/fortnox/changesets/ChangelogAggregator.java Adds multi-module and BOM-aware changelog merging/rendering APIs.
changesets-java/src/main/java/se/fortnox/changesets/BumpPlanner.java New pure bump planning logic for fixed/independent/group/BOM semantics.
.changeset/brave-otters-versioning.md Adds package changeset entry describing the feature.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .changeset/brave-otters-versioning.md Outdated
AnteLund and others added 2 commits July 1, 2026 12:02
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

3 participants