Skip to content

Upgrade maven-bundle-plugin to 6.2.0 - #3098

Merged
jbonofre merged 1 commit into
apache:mainfrom
holgerfriedrich:pr-maven-bundle-plugin
Nov 20, 2026
Merged

jbonofre merged 1 commit into
apache:mainfrom
holgerfriedrich:pr-maven-bundle-plugin

Conversation

@holgerfriedrich

@holgerfriedrich holgerfriedrich commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Upgrade maven-bundle-plugin 6.0.2 -> 6.2.0 (bnd 7.0.0 -> 7.4.0). This replaces the closed dependabot PRs #2786, #2874 and #2924.

bnd >= 7.2 truncates the blueprint Import-Service filters, because the Felix BlueprintPlugin writes them unquoted. That broke ConfigExampleTest.testBlueprint. Switching to service_mode=generic avoids the problem.

This changes the generated manifests: blueprint bundles now declare Require-Capability: osgi.service;effective:=active;filter:="..." instead of Import-Service. Tools that read the legacy header directly may no longer work. Karafs seems to handle the change properly.

Example, karaf-config-example-blueprint:

# before
Import-Service: org.apache.aries.blueprint.NamespaceHandler;filter=(osgi.service.blueprint.namespace=http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0)

# after
Require-Capability: osgi.service;effective:=active;filter:="(&(objectClass=org.apache.aries.blueprint.NamespaceHandler)(osgi.service.blueprint.namespace=http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0))"

The newer bnd also knows Java 25 bytecode (bnd 7.0.0 wrote osgi.ee=UNKNOWN for it).
This is one of the blockers that shows when I switch javaVersion to 25 in pom.xml.

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Test Results

1 068 files  ±0  1 068 suites  ±0   1h 20m 47s ⏱️ - 3m 40s
1 210 tests ±0  1 076 ✅ ±0  134 💤 ±0  0 ❌ ±0 
4 840 runs  ±0  4 302 ✅ ±0  538 💤 ±0  0 ❌ ±0 

Results for commit 700d2d9. ± Comparison against base commit 8631179.

♻️ This comment has been updated with latest results.

@holgerfriedrich

holgerfriedrich commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor Author

PR to felix-dev regarding the truncated filters is ,created now merged:

So maybe we can remove service_mode=generic later.

bnd >= 7.2 truncates the unquoted Import-Service filters written by the
Felix BlueprintPlugin (see apache#2786). Use service_mode=generic, which emits
a properly quoted osgi.service Require-Capability instead.

The newer bnd (7.4.0) also knows JavaSE-25, needed for Java 25 bytecode.

@jbonofre jbonofre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks @holgerfriedrich!

Upgrading maven-bundle-plugin to 6.2.0 (bnd 7.4.0) unblocks JavaSE-25 support, and <service_mode>generic</service_mode> cleanly works around the unquoted Import-Service filter truncation in BlueprintPlugin while emitting standard osgi.service caps/reqs.

@jbonofre
jbonofre merged commit fc828f9 into apache:main Nov 20, 2026
9 checks passed
@holgerfriedrich
holgerfriedrich deleted the pr-maven-bundle-plugin branch November 20, 2026 15:03
jbonofre added a commit that referenced this pull request Nov 20, 2026
Follow-up to #3098. The blueprint archetype resolves maven-bundle-plugin to 6.2.0 (bnd 7.4.0) without inheriting the root pom.xml instructions. Adding <service_mode>generic</service_mode> avoids unquoted Import-Service filter truncation by bnd >= 7.2 when generated projects use service filters or namespace handlers.

Signed-off-by: JB Onofré <jbonofre@apache.org>
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