X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=base%2Fruntime%2Forg.argeo.osgi.boot%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fosgi%2Fboot%2FOsgiBoot.java;h=eaafef47937172b0f529df7d9a4ab784cd2bde03;hb=18ba85433f8d8a719098a59953beda9e848bc9fb;hp=7e608103c23c8fbf08de4fa0038fd02c4be77b2c;hpb=32403780e7735a5be0c5719fd0dbc9a114473f7e;p=lgpl%2Fargeo-commons.git diff --git a/base/runtime/org.argeo.osgi.boot/src/main/java/org/argeo/osgi/boot/OsgiBoot.java b/base/runtime/org.argeo.osgi.boot/src/main/java/org/argeo/osgi/boot/OsgiBoot.java index 7e608103c..eaafef479 100644 --- a/base/runtime/org.argeo.osgi.boot/src/main/java/org/argeo/osgi/boot/OsgiBoot.java +++ b/base/runtime/org.argeo.osgi.boot/src/main/java/org/argeo/osgi/boot/OsgiBoot.java @@ -58,8 +58,9 @@ public class OsgiBoot { public final static String PROP_ARGEO_OSGI_BUNDLES = "argeo.osgi.bundles"; public final static String PROP_ARGEO_OSGI_LOCATIONS = "argeo.osgi.locations"; public final static String PROP_ARGEO_OSGI_BASE_URL = "argeo.osgi.baseUrl"; - /** Use org.argeo.osgi */ + /** @deprecated */ public final static String PROP_ARGEO_OSGI_MODULES_URL = "argeo.osgi.modulesUrl"; + public final static String PROP_ARGEO_OSGI_DISTRIBUTION_URL = "argeo.osgi.distributionUrl"; // booleans public final static String PROP_ARGEO_OSGI_BOOT_DEBUG = "argeo.osgi.boot.debug"; @@ -80,7 +81,7 @@ public class OsgiBoot { public final static String INSTANCE_AREA_DEFAULT_PROP = "osgi.instance.area.default"; private boolean debug = Boolean.valueOf( - System.getProperty(PROP_ARGEO_OSGI_BOOT_DEBUG, "false")) + System.getProperty(PROP_ARGEO_OSGI_BOOT_DEBUG, "true")) .booleanValue(); /** Exclude svn metadata implicitely(a bit costly) */ private boolean excludeSvn = Boolean.valueOf( @@ -159,6 +160,7 @@ public class OsgiBoot { installUrls(getBundlesUrls()); installUrls(getLocationsUrls()); installUrls(getModulesUrls()); + installUrls(getDistributionUrls()); checkUnresolved(); startBundles(); long duration = System.currentTimeMillis() - begin; @@ -568,6 +570,34 @@ public class OsgiBoot { return urls; } + /* + * DISTRIBUTION JAR INSTALLATION + */ + public List getDistributionUrls() { + List urls = new ArrayList(); + String distributionUrl = OsgiBootUtils + .getProperty(PROP_ARGEO_OSGI_DISTRIBUTION_URL); + if (distributionUrl == null) + return urls; + String baseUrl = OsgiBootUtils.getProperty(PROP_ARGEO_OSGI_BASE_URL); + + DistributionBundle distributionBundle; + if (baseUrl != null + && !(distributionUrl.startsWith("http") || distributionUrl + .startsWith("file"))) { + // relative url + distributionBundle = new DistributionBundle(baseUrl, + distributionUrl); + } else { + distributionBundle = new DistributionBundle(distributionUrl); + if (baseUrl != null) + distributionBundle.setBaseUrl(baseUrl); + + } + distributionBundle.processUrl(); + return distributionBundle.listUrls(); + } + /* * MODULES LIST INSTALLATION (${argeo.osgi.modulesUrl}) */ @@ -577,6 +607,8 @@ public class OsgiBoot { * If ${argeo.osgi.baseUrl} is set, URLs will be considered relative paths * and be concatenated with the base URL, typically the root of a Maven * repository. + * + * @deprecated */ public List getModulesUrls() { List urls = new ArrayList();