diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-19 05:31:14 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-19 05:31:14 +0000 |
commit | 6a633dee838417ed68cf91fbd2e9b3b9fa07bd8f (patch) | |
tree | 658d78b2087d2f851518be4d27ed9d913ac47ebb /branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java | |
parent | bd126f649a92dd53cd3b3ccef5029ab273436291 (diff) |
Simplified ServiceDiscoverer. Started to use it to create factories to resolve ClassNotFoundExceptions. Renamed calculator-osgi to calculator-equinox and a few fixes to get it working in Eclipse.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@696924 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java')
-rw-r--r-- | branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java b/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java index 6efdcb0da5..aabfd4bcfe 100644 --- a/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java +++ b/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java @@ -20,6 +20,7 @@ package org.apache.tuscany.sca.node.equinox.launcher; import static org.apache.tuscany.sca.node.equinox.launcher.NodeLauncherUtil.bundleLocation; +import static org.apache.tuscany.sca.node.equinox.launcher.NodeLauncherUtil.installBundle; import static org.apache.tuscany.sca.node.equinox.launcher.NodeLauncherUtil.string; import static org.osgi.framework.Constants.BUNDLE_SYMBOLICNAME; @@ -153,7 +154,7 @@ public class EquinoxHost { // Install the launcher bundle String bundleLocation = bundleLocation(); logger.info("Installing launcher bundle: " + bundleLocation); - launcherBundle = bundleContext.installBundle(bundleLocation); + launcherBundle = installBundle(bundleContext, bundleLocation); logger.info("Starting bundle: " + string(launcherBundle, false)); launcherBundle.start(); @@ -229,6 +230,15 @@ public class EquinoxHost { if (mf.isFile()) { Manifest manifest = new Manifest(new FileInputStream(mf)); bundleName = manifest.getMainAttributes().getValue(BUNDLE_SYMBOLICNAME); + } else { + if (file.getPath().endsWith("target/classes")) { + // Development mode, MANIFEST.MF is outside the bundle location + mf = new File(file.getParentFile().getParentFile(), "META-INF/MANIFEST.MF"); + if (mf.isFile()) { + Manifest manifest = new Manifest(new FileInputStream(mf)); + bundleName = manifest.getMainAttributes().getValue(BUNDLE_SYMBOLICNAME); + } + } } } else { JarFile jar = new JarFile(file, false); |