You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mvnup: maven-bundle-plugin upgrade to 5.1.1 too aggressive for legacy OSGi projects (bndlib 2.x to 7.x breaking changes) #14164
When upgrading org.apache.felix:maven-bundle-plugin to 5.1.1 (the current mvnup target), the upgrade may span from very old versions (e.g. 2.3.7, 2.4.0) all the way to 5.1.1, crossing bndlib major versions 2.x to 3.x to 4.x to 5.x to 6.x to 7.x. Each major bndlib version introduced stricter OSGi header parsing.
Legacy OSGi projects (especially Apache ServiceMix bundles, last active 2015) contain OSGi bundle configurations that worked with bndlib 2.x but are rejected by bndlib 7.x with errors like:
[ERROR] Bundle ... : Can not parse name from bundle native code header:
[ERROR] Error(s) found in bundle configuration
Affected projects
apache/servicemix4-bundles (gnodet/maven4-testing #42049) — spring-test bundle has an empty/malformed Bundle-NativeCode header accepted by bndlib 2.x, rejected by bndlib 7.x
Root cause
The jump from maven-bundle-plugin:2.3.7 to 5.1.1 is equivalent to jumping from bndlib ~2.3 to bndlib 7.x. bndlib 7.x has significantly stricter OSGi header validation. Projects that relied on bndlib's lenient parsing now fail.
While the upgrade is necessary to fix FELIX-6259 (ConcurrentModificationException on JDK 17+, introduced in bndlib 2.x/3.x), the jump is too large for projects with custom/edge-case OSGi headers.
Expected behavior
mvnup should either:
Apply a staged upgrade: first to 3.x (fixes FELIX-6259 with bndlib 3.x), then verify before jumping to 5.x, OR
Add a sanity check: when upgrading from a very old version (< 3.0), warn about the large jump, OR
At minimum, document in the upgrade output that large bundle-plugin version jumps may introduce bndlib header parsing regressions.
Activity
fix: skip maven-bundle-plugin upgrade from bndlib 2.x to avoid OSGi h…
fix: warn about bndlib header validation changes when upgrading maven…
fix: warn about bndlib header validation changes when upgrading maven…