From 7188fa70c225d6b55ca6a02106ccf0f92eb1fc8e Mon Sep 17 00:00:00 2001 From: rfeng Date: Wed, 18 Mar 2009 21:10:05 +0000 Subject: Access the equinox jars from a temporary maven repo @http://people.apache.org/~rfeng/repo/maven2 git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@755736 13f79535-47bb-0310-9956-ffa450edef68 --- java/sca/modules/node-impl-osgi/pom.xml | 34 ++++++++++++++++++++++ .../dosgi/test/CalculatorOSGiNodeTestCase.java | 8 ----- .../dosgi/test/CalculatorOSGiTestCase.java | 14 ++++----- .../src/test/java/hello/HelloWorld.java | 30 ------------------- .../src/test/java/hello/HelloWorldImpl.java | 30 ------------------- .../src/test/resources/HelloWorld.composite | 30 ------------------- 6 files changed, 39 insertions(+), 107 deletions(-) delete mode 100644 java/sca/modules/node-impl-osgi/src/test/java/hello/HelloWorld.java delete mode 100644 java/sca/modules/node-impl-osgi/src/test/java/hello/HelloWorldImpl.java delete mode 100644 java/sca/modules/node-impl-osgi/src/test/resources/HelloWorld.composite (limited to 'java/sca/modules/node-impl-osgi') diff --git a/java/sca/modules/node-impl-osgi/pom.xml b/java/sca/modules/node-impl-osgi/pom.xml index ed7a922d6b..cc42ebbd00 100644 --- a/java/sca/modules/node-impl-osgi/pom.xml +++ b/java/sca/modules/node-impl-osgi/pom.xml @@ -29,20 +29,54 @@ tuscany-node-impl-osgi Apache Tuscany SCA OSGi Node Implementation + + + + + false + + rfeng.repo + A Temporary Maven 2.x Repository for Equinox 3.4.2 + http://people.apache.org/~rfeng/repo/maven2/ + default + + org.eclipse osgi + 3.4.0-v20080605-1900 + compile org.eclipse.osgi services + 3.1.200-v20071203 + test + + + + org.eclipse.equinox + ds + 1.0.0-v20080427-0830 + test + + + + org.eclipse.equinox + util + 1.0.0-v20080414 + test + + org.apache.tuscany.sca tuscany-assembly diff --git a/java/sca/modules/node-impl-osgi/src/test/java/calculator/dosgi/test/CalculatorOSGiNodeTestCase.java b/java/sca/modules/node-impl-osgi/src/test/java/calculator/dosgi/test/CalculatorOSGiNodeTestCase.java index 86b0da3a01..dbb45dedb4 100644 --- a/java/sca/modules/node-impl-osgi/src/test/java/calculator/dosgi/test/CalculatorOSGiNodeTestCase.java +++ b/java/sca/modules/node-impl-osgi/src/test/java/calculator/dosgi/test/CalculatorOSGiNodeTestCase.java @@ -19,7 +19,6 @@ package calculator.dosgi.test; -import java.io.File; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; @@ -80,13 +79,6 @@ public class CalculatorOSGiNodeTestCase { } Set bundles = new HashSet(); - File plugins = new File("target/test-classes/plugins"); - for (File f : plugins.listFiles()) { - if (f.isFile()) { - bundles.add(f.toURI().toURL()); - } - } - if (client == null || client.booleanValue()) { System.out.println("Generating calculator.dosgi bundle..."); bundles.add(OSGiTestBundles.createBundle("target/test-classes/calculator-bundle.jar", diff --git a/java/sca/modules/node-impl-osgi/src/test/java/calculator/dosgi/test/CalculatorOSGiTestCase.java b/java/sca/modules/node-impl-osgi/src/test/java/calculator/dosgi/test/CalculatorOSGiTestCase.java index 82204a0272..6ff261d01f 100644 --- a/java/sca/modules/node-impl-osgi/src/test/java/calculator/dosgi/test/CalculatorOSGiTestCase.java +++ b/java/sca/modules/node-impl-osgi/src/test/java/calculator/dosgi/test/CalculatorOSGiTestCase.java @@ -19,7 +19,6 @@ package calculator.dosgi.test; -import java.io.File; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; @@ -62,13 +61,6 @@ public class CalculatorOSGiTestCase { public static void setUpBeforeClass() throws Exception { Set bundles = new HashSet(); - File plugins = new File("target/test-classes/plugins"); - for (File f : plugins.listFiles()) { - if (f.isFile()) { - bundles.add(f.toURI().toURL()); - } - } - bundles.add(OSGiTestBundles.createBundle("target/test-classes/calculator-bundle.jar", "calculator/dosgi/META-INF/MANIFEST.MF", new String[][] { @@ -103,10 +95,14 @@ public class CalculatorOSGiTestCase { DivideService.class, DivideServiceImpl.class)); try { - host = new EquinoxHost(bundles); + host = new EquinoxHost(); BundleContext context = host.start(); + for (URL loc : bundles) { + host.installBundle(loc, null); + } for (Bundle b : context.getBundles()) { if (b.getSymbolicName().equals("org.eclipse.equinox.ds")) { + System.out.println(string(b, false)); b.start(); System.out.println(string(b, false)); } diff --git a/java/sca/modules/node-impl-osgi/src/test/java/hello/HelloWorld.java b/java/sca/modules/node-impl-osgi/src/test/java/hello/HelloWorld.java deleted file mode 100644 index e3fcdfd25f..0000000000 --- a/java/sca/modules/node-impl-osgi/src/test/java/hello/HelloWorld.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * 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. - */ - -package hello; - -import org.oasisopen.sca.annotation.Remotable; - -/** - * HelloWorld interface - */ -@Remotable -public interface HelloWorld { - String hello(String name); -} diff --git a/java/sca/modules/node-impl-osgi/src/test/java/hello/HelloWorldImpl.java b/java/sca/modules/node-impl-osgi/src/test/java/hello/HelloWorldImpl.java deleted file mode 100644 index c9a7560b12..0000000000 --- a/java/sca/modules/node-impl-osgi/src/test/java/hello/HelloWorldImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * 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. - */ - -package hello; - -/** - * HelloWorldImpl - */ -public class HelloWorldImpl implements HelloWorld { - public String hello(String name) { - System.out.println("Hello: " + name); - return "Hello, " + name; - } -} diff --git a/java/sca/modules/node-impl-osgi/src/test/resources/HelloWorld.composite b/java/sca/modules/node-impl-osgi/src/test/resources/HelloWorld.composite deleted file mode 100644 index 27ddcb94a8..0000000000 --- a/java/sca/modules/node-impl-osgi/src/test/resources/HelloWorld.composite +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - -- cgit v1.2.3