Skip to content

FELIX-6872 - Dependency Manager: release only the bundles that changed - #600

Merged
paulrutter merged 3 commits into
apache:masterfrom
paulrutter:FELIX-6872-release-selected-bundles
Nov 26, 2026
Merged

paulrutter merged 3 commits into
apache:masterfrom
paulrutter:FELIX-6872-release-selected-bundles

Conversation

@paulrutter

@paulrutter paulrutter commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

The Dependency Manager bundles are versioned separately, and the earlier releases only contained the bundles that changed. With the Maven build the release plugin releases the whole reactor, so a fix in one bundle (FELIX-6874 and FELIX-6880 only touch org.apache.felix.dependencymanager) would republish four unchanged bundles.

  • mvn -N exec:exec@release-plan (dependencymanager/release/ReleasePlan.java, plain Java 11) guides the release in a terminal: it checks that the working tree is clean and not behind origin and fetches the tags, finds the bundles that changed since the git tag of their latest release, proposes the versions and asks to confirm them (Enter accepts), warns when changelog.txt does not list the released bundles, and then runs release:prepare and release:perform with those versions, each after a confirmation, with the console of the user (gpg passphrase). The bundles that did not change are put back to the version they were released with. Changes to a bundle's tests and docs are ignored, and so are the version changes of its pom; other pom changes are reported with the bundle. Nothing that is not answered is done, so it stops when there is no terminal. -Dplan.only=true only prints the plan and the commands, and changes nothing.
  • While performing a release (the apache-release profile, which release:perform activates), a bundle whose <artifactId>-<version> tag exists on origin on another commit than the one being released is neither deployed nor tagged. That is how the unchanged bundles are left out. A tag on the release commit is from an earlier attempt of the same perform and does not count, so a failed perform can be retried. A failing git ls-remote fails the build instead of deploying. Snapshot versions are never tagged. The bundle tagging from FELIX-6872 - Dependency Manager: tag every released bundle #593 moved from exec-maven-plugin to the antrun plugin, because the tagging has to be skipped for those bundles.
  • README.release describes how to release with Maven; the Gradle one was removed with the Gradle build.

Plain mvn release:prepare and mvn release:perform still work, the plan only proposes the versions.

Tested end to end in a scratch git repo with a local bare remote (scm URLs rewritten to it), with maven-release-plugin 3.0.1: the plan reports only the changed bundle as changed; a real release:prepare with the proposed -Dproject.rel/dev options (full verify, including the bundle baseline check, with the unchanged bundles at their released versions) and then release:perform with no extra flags deploy only the parent pom and the changed bundle, skip the four others, and push the tag of the changed bundle; a retry of the perform redeploys it; a snapshot deploy creates no tag. The maven-release-plugin does not set performRelease, which is why the profile is apache-release. I could not run a release against the real repositories.

🤖 Generated with Claude Code

The bundles are versioned separately, and the earlier releases only contained
the bundles that changed. With the Maven build the release plugin releases the
whole reactor.

- mvn -N exec:exec@release-plan finds the bundles that changed since the tag of
  their latest release, and proposes the versions and the release:prepare
  command: the bundles that did not change are put back to the version they
  were released with.
- While performing a release (the apache-release profile) a bundle whose
  version was released before, on another commit than the one being released,
  is not deployed (nor tagged) again. A tag on the release commit is from an
  earlier attempt of the same perform and does not count, so a perform can be
  retried. Snapshot versions are never tagged. The bundle tagging now uses the
  antrun plugin, as that needs to be able to skip a bundle.
- Add README.release, which describes how to release with Maven.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@paulrutter
paulrutter force-pushed the FELIX-6872-release-selected-bundles branch from 422f0dc to 8844251 Compare November 26, 2026 14:28
paulrutter and others added 2 commits November 26, 2026 15:37
…xec@release-plan

The release program no longer only proposes the versions and the commands: it
checks that the checkout is ready, proposes the versions, and runs
release:prepare and release:perform with them, each after it asked for a
confirmation and with the console of the user, for example for the gpg
passphrase. -Dplan.only=true keeps the old behavior of only printing the plan.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…am without Maven

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@paulrutter
paulrutter merged commit 5f29c67 into apache:master Nov 26, 2026
4 checks passed
@paulrutter

Copy link
Copy Markdown
Contributor Author

@pderop i made a few changes so we can release bundles (with maven) separatley without releasing all (untouched) subprojects.
In dependencymanager, run mvn -N exec:exec@release-plan going forward to create a new release. It will guide you through the steps and in the end will still use mvn release:prepare and mvn release:perform to do the actual releasing and tagging.

@pderop

pderop commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

I was analysing all this, great work Paul

I have other pending fixes to add, now I see you have started a new release, but no problem, we can do another release later.

@paulrutter

Copy link
Copy Markdown
Contributor Author

I was analysing all this, great work Paul

I have other pending fixes to add, now I see you have started a new release, but no problem, we can do another release later.

Yeah, sorry, that one could have been part of the release. But given how easy it is now, we can do another one soon.

@pderop

pderop commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

sure, no worries at all, what you have done is great, it will be be easier to release now.
I will also have to catch up with the antora stuff, I don't remember how docs are organized, I will look into soon.

@paulrutter

paulrutter commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor Author

That part is pretty easy, see example i prepared for this release: apache/felix-antora-site#32 and apache/felix-antora-site#28 earlier.

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