Feature/individual sub modul versioning#179
Open
AnteLund wants to merge 5 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
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
independentversioning with optionallinked/fixedmodule grouping and BOM support (includingskipBom). - Reworks
prepare/releaseto compute/apply versions perartifactIdand 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.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
individualversion strategy, allowing sub-modules in a multi-module Maven project to be versioned independently of each other.