Skip to content

javachanges Release Plan Manifest

1. Overview

When you run:

bash
mvn -q -DskipTests compile exec:java -Dexec.args="plan --directory /path/to/repo --apply true"

javachanges can write two generated files:

FilePurpose
.changesets/release-plan.jsonMachine-readable release manifest
.changesets/release-plan.mdHuman-readable release PR body

These files are compatibility artifacts. CI/CD release-plan automation skips them by default and should use --fresh true in later tag/release jobs so the release branch does not carry stale generated metadata.

2. Generation Timing

These files are generated when plan --apply true succeeds. Platform automation commands such as github-release-plan and gitlab-release-plan do not commit them by default. Pass --write-plan-files true only when compatibility automation still needs committed manifest files.

That means:

  • status does not write them
  • plan without --apply true does not write them
  • they represent the currently applied release plan, not just a preview
  • they are ignored by this repository by default because fresh release metadata is derived from the current applied version state

3. release-plan.json

Typical shape:

json
{
  "releaseVersion": "1.12.2",
  "nextSnapshotVersion": "1.3.2-SNAPSHOT",
  "releaseLevel": "minor",
  "tagStrategy": "whole-repo",
  "tags": ["v1.12.2"],
  "releaseTargets": [
    {
      "module": null,
      "tag": "v1.12.2"
    }
  ],
  "generatedAt": "2026-04-19T12:34:56+08:00",
  "changesets": [
    {
      "file": "20260419-example.md",
      "release": "minor",
      "type": "other",
      "summary": "add release notes command",
      "modules": ["javachanges"]
    }
  ]
}

Field reference:

FieldTypeMeaning
releaseVersionstringFinal release version without the leading v
nextSnapshotVersionstringRoot version written back into pom.xml or gradle.properties after plan application
releaseLevelstringAggregated release type across all pending changesets
tagStrategystringwhole-repo or per-module
tagsarrayPlanned tags derived from the selected tag strategy
releaseTargetsarrayStructured tag targets with module and tag values
generatedAtstringTimestamp when the manifest was generated
changesetsarrayIncluded pending changesets that were consumed

Changeset item fields:

FieldTypeMeaning
filestringOriginal changeset filename
releasestringDeclared release type for that changeset
typestringLegacy compatibility field, often other, safe to ignore in new integrations
summarystringUser-facing summary derived from the changeset body or legacy frontmatter
modulesarrayMaven artifactIds or Gradle project names affected by that changeset

Release target item fields:

FieldTypeMeaning
modulestring or nullResolved module name for per-module tags, or null for whole-repo tags
tagstringFinal git tag to create for that target

Note: the JSON field is still named modules for compatibility with the current implementation, even though the user-facing docs now prefer the term packages.

Note: if your changeset uses the official package-map format, the manifest may still emit "type": "other". That field is not the release bump. Use release as the meaningful release signal.

4. release-plan.md

This file is the generated pull request body.

Typical content includes:

  • release type
  • affected packages
  • release version
  • next snapshot version
  • included changesets

It is intended for:

  • GitHub pull request bodies
  • GitLab merge request descriptions
  • human review before merging a release branch

5. Common Consumers

5.1 Local shell scripts

Read a field with:

bash
mvn -q -DskipTests compile exec:java -Dexec.args="manifest-field --directory /path/to/repo --field releaseVersion"
mvn -q -DskipTests compile exec:java -Dexec.args="manifest-field --directory /path/to/repo --field releaseVersion --fresh true"

5.2 GitHub Actions

Typical uses:

  • derive releaseVersion with manifest-field --fresh true
  • derive the final release tag set with github-tag-from-plan --fresh true
  • generate a transient PR body with github-release-plan --write-plan-files false
  • for Gradle repositories, pass releaseVersion to ./gradlew publish -Pversion=... if your publishing job needs an explicit release version

5.3 GitLab CI/CD

Typical uses:

  • detect whether the version file or CHANGELOG.md changed when gitlab-tag-from-plan --fresh true is used
  • generate the final tag set only when a new applied plan exists
  • create or update the release-plan merge request body without committing generated plan files

When the manifest is generated, these files are usually updated in the same commit:

FileWhy it changes
pom.xml or gradle.propertiesRoot Maven <revision> or Gradle version advances to the next snapshot
CHANGELOG.mdA new release section is inserted
.changesets/release-plan.jsonMachine-readable release data when compatibility manifest output is enabled
.changesets/release-plan.mdHuman-readable release PR body when compatibility manifest output is enabled

At the same time, the consumed .changesets/*.md entries are deleted.

7. Common Mistakes

ProblemCauseFix
manifest-field failsthe compatibility manifest was not writtenuse manifest-field --fresh true or generate and apply the release plan first
No tag is created in CIrelease state did not changeconfirm a release plan updated the version file and CHANGELOG.md
Release PR body is stalegenerated plan files were committed and not regenerateduse --write-plan-files false so the body is regenerated transiently
Version mismatch in CIworkflow reads stale generated filesuse manifest-field --field releaseVersion --fresh true
NeedDocument
Command to read manifest fieldsCLI Reference
First-time use of plan --apply trueGetting Started
Gradle release handoffGradle Usage Guide
GitHub workflow consumptionGitHub Actions Usage Guide
GitLab workflow consumptionGitLab CI/CD Usage Guide

Released under the Apache-2.0 License.