diff --git a/core/src/main/java/lucee/runtime/osgi/OSGiUtil.java b/core/src/main/java/lucee/runtime/osgi/OSGiUtil.java index 6325396376..95da845433 100644 --- a/core/src/main/java/lucee/runtime/osgi/OSGiUtil.java +++ b/core/src/main/java/lucee/runtime/osgi/OSGiUtil.java @@ -1095,6 +1095,39 @@ private static BundleFile _getBundleFile(CFMLEngineFactory factory, BundleRange if (mbf != null) { return improveFileName(bd, mbf); } + + List children = listFiles(dir, addional, JAR_EXT_FILTER); + + // now we check all jar files + { + + // now we check by Manifest comparsion, name not necessary reflect the correct bundle info + BundleFile bf; + for (boolean checkBundleRange: checkBundleRanges) { + mbf = null; + for (Resource child: children) { + if (checkBundleRange && !new Filter(bundleRange).accept(child.getName())) continue; + match = child; + bf = BundleFile.getInstance(child); + if (bf.isBundle()) { + if (bf.getSymbolicName().equals(bundleRange.getName())) { + if (bundleRange.matches(bf)) { + if (mbf == null || OSGiUtil.isNewerThan(bf.getVersion(), mbf.getVersion())) mbf = bf; + } + else { + if (versionsFound != null) { + if (versionsFound.length() > 0) versionsFound.append(", "); + versionsFound.append(bf.getVersionAsString()); + } + } + } + } + } + if (mbf != null) { + return improveFileName(factory.getBundleDirectory(), mbf); + } + } + } /* * List children = listFiles(dir, addional, JAR_EXT_FILTER); * diff --git a/loader/build.xml b/loader/build.xml index c4da2e87f5..a6df405ef4 100644 --- a/loader/build.xml +++ b/loader/build.xml @@ -2,7 +2,7 @@ - + diff --git a/loader/pom.xml b/loader/pom.xml index acf7547a4c..2cf0bf9fcb 100644 --- a/loader/pom.xml +++ b/loader/pom.xml @@ -3,7 +3,7 @@ org.lucee lucee - 6.1.1.51-BETA + 6.1.1.51-SNAPSHOT jar Lucee Loader Build