if (modulesUrlStr == null)
return urls;
+ String baseUrl = getProperty(PROP_SLC_OSGI_BASE_URL);
+
Map installedBundles = getBundles();
BufferedReader reader = null;
String moduleName = st.nextToken();
String moduleVersion = st.nextToken();
String url = st.nextToken();
+ if (baseUrl != null)
+ url = baseUrl + url;
if (installedBundles.containsKey(moduleName)) {
Bundle bundle = (Bundle) installedBundles.get(moduleName);
for (Bundle bundle : getBundleContext().getBundles()) {
OsgiBundle osgiBundle = new OsgiBundle(bundle);
- String location = bundle.getLocation();
- if (location.startsWith("reference:file:"))
- location = location.substring("reference:".length());
+ String originalLocation = bundle.getLocation();
+ String location = originalLocation;
+ if (originalLocation.startsWith("reference:file:"))
+ location = originalLocation.substring("reference:".length());
+
try {
URL url = new URL(location);
Resource res = resourceLoader.getResource(url.toString());
distributions.put(osgiBundle,
new VersionedResourceDistribution(osgiBundle, res));
+
+ if (log.isTraceEnabled())
+ log.debug("Added url " + url + " from original location "
+ + originalLocation);
} catch (Exception e) {
log.warn("Cannot interpret location " + location
+ " of bundle " + bundle + ": " + e);