diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-03-25 23:53:54 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-03-25 23:53:54 +0000 |
commit | f80619743397f217f6f8527a530994fa45046341 (patch) | |
tree | 0bde12c84063d86135ff53a1608a8320362c6edf /java/sca/modules/extensibility-equinox | |
parent | 1eafab3193550a62edf9a9c7c60c119796a9e7e8 (diff) |
Upgrade to equinox 3.4.x
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@758468 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/extensibility-equinox')
2 files changed, 23 insertions, 51 deletions
diff --git a/java/sca/modules/extensibility-equinox/pom.xml b/java/sca/modules/extensibility-equinox/pom.xml index 9177fb68c8..f360fe7c12 100644 --- a/java/sca/modules/extensibility-equinox/pom.xml +++ b/java/sca/modules/extensibility-equinox/pom.xml @@ -7,15 +7,15 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. --> <project> <modelVersion>4.0.0</modelVersion> @@ -37,39 +37,9 @@ <dependency> <groupId>org.eclipse</groupId> <artifactId>osgi</artifactId> - <version>3.3.0-v20070530</version> + <version>3.4.0-v20080605-1900</version> <scope>compile</scope> </dependency> - - <!-- - Exclude org.eclipse.equinox:app to avoid maven bug/bad equinox version scheme. i.e.: - - Couldn't find a version in [1.0.0-v20070606] to match range [1.0.0,2.0.0) - org.eclipse.equinox:app:jar:null - --> - <dependency> - <groupId>org.eclipse.core</groupId> - <artifactId>runtime</artifactId> - <version>3.3.100-v20070530</version> - <scope>test</scope> - <exclusions> - <exclusion> - <groupId>org.eclipse.equinox</groupId> - <artifactId>app</artifactId> - </exclusion> - </exclusions> - </dependency> - - <!-- - Now include org.eclipse.equinox:app explicitly - --> - <dependency> - <groupId>org.eclipse.equinox</groupId> - <artifactId>app</artifactId> - <version>1.0.0-v20070606</version> - <scope>test</scope> - </dependency> - </dependencies> <build> <plugins> diff --git a/java/sca/modules/extensibility-equinox/src/test/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscovererTestCase.java b/java/sca/modules/extensibility-equinox/src/test/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscovererTestCase.java index deb5b4fb40..642bad0b2b 100644 --- a/java/sca/modules/extensibility-equinox/src/test/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscovererTestCase.java +++ b/java/sca/modules/extensibility-equinox/src/test/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscovererTestCase.java @@ -6,15 +6,15 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License. */ package org.apache.tuscany.sca.extensibility.equinox; @@ -41,7 +41,7 @@ import org.osgi.framework.BundleContext; /** * Test the Equinox service discoverer. - * + * * @version $Rev$ $Date$ */ public class EquinoxServiceDiscovererTestCase { @@ -88,20 +88,22 @@ public class EquinoxServiceDiscovererTestCase { discoverer = new EquinoxServiceDiscoverer(context); File dep = new File("target/bundles"); List<Bundle> bundles = new ArrayList<Bundle>(); + if(dep.isDirectory()) { for (File f : dep.listFiles()) { - BufferedInputStream bis = new BufferedInputStream(new FileInputStream(f)); - JarInputStream jis = new JarInputStream(bis); - Manifest manifest = jis.getManifest(); - if (manifest == null || manifest.getMainAttributes().getValue("Bundle-Name") == null) { + BufferedInputStream bis = new BufferedInputStream(new FileInputStream(f)); + JarInputStream jis = new JarInputStream(bis); + Manifest manifest = jis.getManifest(); + if (manifest == null || manifest.getMainAttributes().getValue("Bundle-Name") == null) { + bis.close(); + continue; + } + bis.close(); + bis = new BufferedInputStream(new FileInputStream(f)); + Bundle b = context.installBundle(f.getName(), bis); + System.out.println("Installed " + b.getSymbolicName() + " [" + getState(b) + "]"); + bundles.add(b); bis.close(); - continue; } - bis.close(); - bis = new BufferedInputStream(new FileInputStream(f)); - Bundle b = context.installBundle(f.getName(), bis); - System.out.println("Installed "+b.getSymbolicName() + " [" + getState(b) + "]"); - bundles.add(b); - bis.close(); } for (Bundle b : bundles) { b.start(); @@ -144,7 +146,7 @@ public class EquinoxServiceDiscovererTestCase { Assert.assertNotNull(descriptor); descriptor = discoverer.getFirstServiceDeclaration("notthere"); Assert.assertNull(descriptor); - } - + } + } |