diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-09 22:24:55 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-09 22:24:55 +0000 |
commit | 8c7f53c15bf5b2dc64d96e1bee8b1f8cc632d48a (patch) | |
tree | 7ea9c24be52993fc36a414df4a52b1e1c35c985e /java/sca/modules/node-launcher-equinox/src/main | |
parent | a1bc5c955317ac6ba27cf44d4575dcdd0ffb654a (diff) |
Use bundle.getResources to discover services
Run the test case within OSGi
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@693637 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/node-launcher-equinox/src/main')
2 files changed, 5 insertions, 1 deletions
diff --git a/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java b/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java index 2a6e24f6e0..06bc1907b4 100644 --- a/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java +++ b/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java @@ -100,7 +100,7 @@ public class EquinoxHost { props.put("osgi.contextClassLoaderParent", "boot"); // Set the extension bundle - props.put("osgi.framework.extensions", "org.apache.tuscany.sca.extensibility.equinox"); + props.put("osgi.framework.extensions", "org.apache.tuscany.sca.node.launcher.equinox"); // Set startup properties props.put(EclipseStarter.PROP_CLEAN, "true"); @@ -205,6 +205,9 @@ public class EquinoxHost { * @throws IOException */ private static String getBundleName(File file) throws IOException { + if (!file.exists()) { + return null; + } String bundleName = null; if (file.isDirectory()) { File mf = new File(file, "META-INF/MANIFEST.MF"); diff --git a/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/NodeLauncherUtil.java b/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/NodeLauncherUtil.java index 07da404d12..b422651244 100644 --- a/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/NodeLauncherUtil.java +++ b/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/NodeLauncherUtil.java @@ -250,6 +250,7 @@ final class NodeLauncherUtil { if (!entry.isDirectory() && entryName != null && entryName.length() > 0 && !entryName.startsWith(".") + && entryName.endsWith(".class") // Exclude resources from Export-Package && entryName.lastIndexOf("/") > 0) { String pkg = entryName.substring(0, entryName.lastIndexOf("/")).replace('/', '.') + version; packages.add(pkg); |