Skip to content

LDEV-6627 accept a bundle jar as additional bundle location - #14

Merged
michaeloffner merged 1 commit into
mainfrom
LDEV-6627-bundle-jar-in-dirs
Nov 20, 2026
Merged

michaeloffner merged 1 commit into
mainfrom
LDEV-6627-bundle-jar-in-dirs

Conversation

@michaeloffner

Copy link
Copy Markdown
Contributor

Lucee core passes the entries of `this.javasettings.bundles` to `OSGiService.loadClass` / `getClassLoader` as `additionalBundleDirectories`. An entry can be a directory with bundle jars or a single bundle jar. `findJar`, `findJarVersion` and `findExporting` only handled directories (`dir.listFiles()`), so a jar entry never matched and the load failed with `no URL found for bundle [lucee.mockup:1.0.0.0]`.

  • new helper `jars(File location)`: the jar itself for a `.jar` file, the jars of the directory otherwise (unchanged behaviour for directories)
  • used by all three finders
  • new `BundleLocationTest` (directory, jar location, non matching name/version, non jar file, null, missing path)

Fixes the `checking OSGi Bundle` spec of `test/general/JavaSettings.cfc` in Lucee (lucee/Lucee#3849), which passes `bundles=["…/lucee-mockup-osgi-1.0.0.0.jar"]`. Not verified end to end against Lucee yet, only at unit level.

Not part of this PR: `loadMissing` looks for an exporting bundle for a missing package only in the own bundle directory, not in the additional locations.

@michaeloffner
michaeloffner merged commit 5403cde into main Nov 20, 2026
5 checks passed
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.

1 participant