[SITES-44663] core.wcm.components.core bundle is not installable on AEM 6.5 / 6.5 LTS — commons-lang3 OSGi import range too narrow#3034
Conversation
…EM 6.5 / 6.5 LTS — commons-lang3 OSGi import range too narrow * Add explicit Import-Package directive for org.apache.commons.lang3 and org.apache.commons.lang3.tuple with version range [3.12,4) in bundles/core/pom.xml. * Restores compatibility with AEM 6.5 (SP18+) and 6.5 LTS (SP1+) which ship commons-lang3 3.12-3.19, while keeping the bundle compatible with the AEM as a Cloud Service SDK (commons-lang3 3.20+). * Compile-time dependency in parent/pom.xml stays at 3.20.0 - the CVE-2025-48924 (Snyk) fix introduced in PR #3015 is preserved at build time. * Only StringUtils, ArrayUtils, ObjectUtils, CharEncoding, tuple.Pair and tuple.ImmutablePair are referenced in the bundle source - all available since commons-lang3 3.0.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
@LSantha wouldn't it had been safer to decrease the version number in parent pom for with this change, you risk that new code makes use of commons-lang3 features not available in version 3.12 - but you will only realize it when the java code fails at runtime, as you have canceled out the OSGi version checking mechanisms which would have failed the build early otherwise. |



commons-lang3stays at 3.20.0 inparent/pom.xml.Problem
Since commit
bd91365a(PR #3015, 2026-05-05) bumpedcommons-lang3to3.20.0inparent/pom.xml, the OSGiImport-Packagerange generated forcom.adobe.cq.core.wcm.components.corebecame[3.20.0, 4.0.0). No publicly released AEM 6.5 GA or 6.5 LTS Service Pack ships commons-lang3 in that range, so the core bundle fails to resolve on every released AEM 6.5 / LTS instance:commons-lang3 shipped by each released AEM 6.5 / LTS SP
(Sourced from the official Adobe docs bundle lists.)
>=3.20?What the bundle actually uses
Only 6 commons-lang3 classes are referenced across all 90 files in
bundles/core/src/main/java/:org.apache.commons.lang3.StringUtilsorg.apache.commons.lang3.ArrayUtilsorg.apache.commons.lang3.ObjectUtilsorg.apache.commons.lang3.CharEncodingorg.apache.commons.lang3.tuple.Pairorg.apache.commons.lang3.tuple.ImmutablePairAll of these are available since commons-lang3 3.0/3.1, so the auto-generated
[3.20.0, 4.0.0)range is unnecessarily strict.Fix
Add explicit
Import-Packagedirectives so the bundle resolves on commons-lang3 ≥ 3.12 at runtime, while the compile-time dependency stays at 3.20.0:Verification
Local build of
bundles/corenow produces a manifest with the widened range:Final verification will come from the CI matrix executions (
github-aem-core-wcm-components-main,CQ_VERSION=6.5.0andCQ_VERSION=6.5.LTS) once this PR is merged — both have been UNSTABLE or FAILURE for weeks because of this issue.