From 65daee9fbfa5a8f7beae61a96edf428c054108cc Mon Sep 17 00:00:00 2001 From: antelder Date: Wed, 8 Feb 2012 08:43:19 +0000 Subject: Remove the unreleased stuff git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1241817 13f79535-47bb-0310-9956-ffa450edef68 --- .../unreleased/distribution/osgi/pom.xml | 428 --------------------- .../java/sample/GenerateFeatureReposTestCase.java | 37 -- .../osgi/src/test/java/sample/TestBaseClass.java | 205 ---------- .../tags/2.0-Beta4-RC0/unreleased/samples/README | 154 -------- .../unreleased/samples/applications/pom.xml | 36 -- .../unreleased/samples/applications/store/README | 28 -- .../samples/applications/store/build.xml | 82 ---- .../unreleased/samples/applications/store/pom.xml | 114 ------ .../store/src/main/java/launch/Launch.java | 39 -- .../store/src/main/java/services/Cart.java | 28 -- .../store/src/main/java/services/Catalog.java | 27 -- .../src/main/java/services/CurrencyConverter.java | 29 -- .../main/java/services/CurrencyConverterImpl.java | 38 -- .../src/main/java/services/FruitsCatalogImpl.java | 52 --- .../store/src/main/java/services/Item.java | 54 --- .../src/main/java/services/ShoppingCartImpl.java | 112 ------ .../store/src/main/java/services/Total.java | 29 -- .../store/src/main/resources/store.composite | 58 --- .../store/src/main/resources/uiservices/store.html | 162 -------- .../store/src/test/java/client/Shopper.java | 29 -- .../store/src/test/java/client/ShopperImpl.java | 64 --- .../store/src/test/java/store/StoreTestCase.java | 121 ------ .../src/test/resources/store-client.composite | 38 -- .../samples/applications/store/store.png | Bin 15670 -> 0 bytes .../samples/applications/store/store.svg | 304 --------------- .../unreleased/samples/binding.ws.composite | 32 -- .../getting-started/helloworld-scaclient/README | 28 -- .../getting-started/helloworld-scaclient/pom.xml | 87 ----- .../src/main/java/sample/Helloworld.java | 28 -- .../src/main/java/sample/HelloworldSCAClient.java | 46 --- .../src/test/java/sample/HelloworldTestCase.java | 54 --- .../getting-started/helloworld-webapp/README | 30 -- .../getting-started/helloworld-webapp/pom.xml | 147 ------- .../src/main/java/sample/Helloworld.java | 28 -- .../src/main/webapp/WEB-INF/web.composite | 30 -- .../src/main/webapp/WEB-INF/web.xml | 41 -- .../helloworld-webapp/src/main/webapp/hello.jsp | 37 -- .../src/test/java/itest/HelloworldTestCase.java | 53 --- .../src/test/resources/test-web.xml | 30 -- .../samples/getting-started/helloworld/README | 43 --- .../samples/getting-started/helloworld/pom.xml | 77 ---- .../src/main/java/sample/Helloworld.java | 28 -- .../src/main/java/sample/HelloworldImpl.java | 27 -- .../main/resources/META-INF/sca-contribution.xml | 25 -- .../src/main/resources/helloworld.composite | 29 -- .../src/test/java/sample/HelloworldTestCase.java | 48 --- .../unreleased/samples/getting-started/pom.xml | 39 -- .../samples/helloworld-contribution2/README | 24 -- .../samples/helloworld-contribution2/pom.xml | 58 --- .../src/main/java/sample/Helloworld.java | 28 -- .../src/main/java/sample/HelloworldImpl.java | 36 -- .../main/resources/META-INF/sca-contribution.xml | 25 -- .../src/main/resources/helloworld.composite | 29 -- .../src/test/java/sample/HelloworldTestCase.java | 36 -- .../samples/helloworld-http-contribution/README | 43 --- .../samples/helloworld-http-contribution/pom.xml | 114 ------ .../src/main/java/sample/Helloworld.java | 28 -- .../src/main/java/sample/HelloworldImpl.java | 36 -- .../main/resources/META-INF/helloworld.composite | 32 -- .../main/resources/META-INF/sca-contribution.xml | 25 -- .../src/test/java/sample/HelloworldTestCase.java | 68 ---- .../samples/helloworld-rest-contribution/README | 43 --- .../samples/helloworld-rest-contribution/pom.xml | 109 ------ .../src/main/java/sample/Helloworld.java | 34 -- .../src/main/java/sample/HelloworldImpl.java | 36 -- .../main/resources/META-INF/helloworld.composite | 32 -- .../main/resources/META-INF/sca-contribution.xml | 25 -- .../src/test/java/sample/HelloworldTestCase.java | 68 ---- .../samples/helloworld-rest-contribution2/README | 43 --- .../helloworld-metadata.xml | 25 -- .../helloworld-rest-contribution2/nodeConfig.xml | 28 -- .../samples/helloworld-rest-contribution2/pom.xml | 109 ------ .../src/main/java/sample/JaxrsHelloworld.java | 34 -- .../main/resources/META-INF/helloworld.composite | 33 -- .../main/resources/META-INF/sca-contribution.xml | 26 -- .../src/test/java/sample/HelloworldTestCase.java | 71 ---- .../samples/helloworld-scala-contribution/pom.xml | 119 ------ .../main/resources/META-INF/sca-contribution.xml | 25 -- .../src/main/resources/helloworld.composite | 29 -- .../src/main/scala/sample/Helloworld.scala | 8 - .../src/main/scala/sample/HelloworldImpl.scala | 9 - .../src/test/scala/sample/HelloworldTestCase.scala | 23 -- .../samples/helloworld-spring-contribution/README | 28 -- .../samples/helloworld-spring-contribution/pom.xml | 91 ----- .../src/main/java/sample/Helloworld.java | 28 -- .../src/main/java/sample/HelloworldImpl.java | 33 -- .../main/resources/META-INF/helloworld-context.xml | 32 -- .../main/resources/META-INF/helloworld.composite | 29 -- .../main/resources/META-INF/sca-contribution.xml | 25 -- .../src/test/java/sample/HelloworldTestCase.java | 48 --- .../helloworld-spring-web-contribution/README | 28 -- .../helloworld-spring-web-contribution/pom.xml | 136 ------- .../src/main/java/sample/Helloworld.java | 34 -- .../src/main/java/sample/HelloworldImpl.java | 33 -- .../main/resources/META-INF/helloworld-context.xml | 32 -- .../main/resources/META-INF/helloworld.composite | 33 -- .../main/resources/META-INF/sca-contribution.xml | 25 -- .../src/test/java/sample/HelloworldTestCase.java | 71 ---- .../unreleased/samples/using-tuscany.odt | Bin 10895 -> 0 bytes .../unreleased/testing/itest/bundle/commands.txt | 227 ----------- .../unreleased/testing/itest/bundle/pom.xml | 265 ------------- .../bundle/src/main/java/sample/Helloworld.java | 28 -- .../src/main/java/sample/impl/HelloworldImpl.java | 43 --- .../src/main/java/sample/impl/SampleActivator.java | 45 --- .../main/resources/META-INF/sca-contribution.xml | 25 -- ...ca.contribution.processor.StAXArtifactProcessor | 20 - ....apache.tuscany.sca.definitions.xml.Definitions | 17 - ...ache.tuscany.sca.provider.PolicyProviderFactory | 18 - .../bundle/src/main/resources/definitions.xml | 60 --- .../bundle/src/main/resources/helloworld.composite | 50 --- .../src/test/java/sample/HelloworldTestCase.java | 216 ----------- 111 files changed, 6486 deletions(-) delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/distribution/osgi/pom.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/distribution/osgi/src/test/java/sample/GenerateFeatureReposTestCase.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/distribution/osgi/src/test/java/sample/TestBaseClass.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/README delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/pom.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/README delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/build.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/pom.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/launch/Launch.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/Cart.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/Catalog.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/CurrencyConverter.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/CurrencyConverterImpl.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/FruitsCatalogImpl.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/Item.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/ShoppingCartImpl.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/Total.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/resources/store.composite delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/resources/uiservices/store.html delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/test/java/client/Shopper.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/test/java/client/ShopperImpl.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/test/java/store/StoreTestCase.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/test/resources/store-client.composite delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/store.png delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/store.svg delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/binding.ws.composite delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-scaclient/README delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-scaclient/pom.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-scaclient/src/main/java/sample/Helloworld.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-scaclient/src/main/java/sample/HelloworldSCAClient.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-scaclient/src/test/java/sample/HelloworldTestCase.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/README delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/pom.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/src/main/java/sample/Helloworld.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/src/main/webapp/WEB-INF/web.composite delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/src/main/webapp/WEB-INF/web.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/src/main/webapp/hello.jsp delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/src/test/java/itest/HelloworldTestCase.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/src/test/resources/test-web.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/README delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/pom.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/src/main/java/sample/Helloworld.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/src/main/java/sample/HelloworldImpl.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/src/main/resources/helloworld.composite delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/src/test/java/sample/HelloworldTestCase.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/pom.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/README delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/pom.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/src/main/java/sample/Helloworld.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/src/main/java/sample/HelloworldImpl.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/src/main/resources/helloworld.composite delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/src/test/java/sample/HelloworldTestCase.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/README delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/pom.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/src/main/java/sample/Helloworld.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/src/main/java/sample/HelloworldImpl.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/src/main/resources/META-INF/helloworld.composite delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/src/test/java/sample/HelloworldTestCase.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/README delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/pom.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/src/main/java/sample/Helloworld.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/src/main/java/sample/HelloworldImpl.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/src/main/resources/META-INF/helloworld.composite delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/src/test/java/sample/HelloworldTestCase.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/README delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/helloworld-metadata.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/nodeConfig.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/pom.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/src/main/java/sample/JaxrsHelloworld.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/src/main/resources/META-INF/helloworld.composite delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/src/test/java/sample/HelloworldTestCase.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-scala-contribution/pom.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-scala-contribution/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-scala-contribution/src/main/resources/helloworld.composite delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-scala-contribution/src/main/scala/sample/Helloworld.scala delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-scala-contribution/src/main/scala/sample/HelloworldImpl.scala delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-scala-contribution/src/test/scala/sample/HelloworldTestCase.scala delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/README delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/pom.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/src/main/java/sample/Helloworld.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/src/main/java/sample/HelloworldImpl.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/src/main/resources/META-INF/helloworld-context.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/src/main/resources/META-INF/helloworld.composite delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/src/test/java/sample/HelloworldTestCase.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/README delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/pom.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/src/main/java/sample/Helloworld.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/src/main/java/sample/HelloworldImpl.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/src/main/resources/META-INF/helloworld-context.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/src/main/resources/META-INF/helloworld.composite delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/src/test/java/sample/HelloworldTestCase.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/using-tuscany.odt delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/commands.txt delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/pom.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/java/sample/Helloworld.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/java/sample/impl/HelloworldImpl.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/java/sample/impl/SampleActivator.java delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/resources/META-INF/sca-contribution.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/resources/definitions.xml delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/resources/helloworld.composite delete mode 100644 sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/test/java/sample/HelloworldTestCase.java (limited to 'sca-java-2.x') diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/distribution/osgi/pom.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/distribution/osgi/pom.xml deleted file mode 100644 index 132d8f8dcf..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/distribution/osgi/pom.xml +++ /dev/null @@ -1,428 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-distribution - 2.0-Beta4 - - - tuscany-distribution-osgi - Apache Tuscany SCA OSGI Distribution - - - - - java.net2 - java.net Maven 2.x Repository - http://download.java.net/maven/2 - - - intalio.org - http://www.intalio.org/public/maven2 - - true - - - false - - - - openejb-repository - OpenEJB Repository - http://svn.apache.org/repos/asf/openejb/repo - default - - false - - - true - - - - - - - - - org.apache.tuscany.sca - tuscany-feature-all - pom - 2.0-Beta4 - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-Beta4 - compile - - - - org.apache.aries.application - org.apache.aries.application.api - 0.4-SNAPSHOT - test - - - - org.apache.aries.application - org.apache.aries.application.management - 0.4-SNAPSHOT - test - - - - org.apache.aries.application - org.apache.aries.application.modeller - 0.4-SNAPSHOT - test - - - - org.apache.aries.application - org.apache.aries.application.resolver.obr - 0.4-SNAPSHOT - test - - - - - org.ops4j.pax.exam - pax-exam - 1.2.4 - test - - - - org.ops4j.pax.exam - pax-exam-junit - 1.2.4 - test - - - - org.ops4j.pax.exam - pax-exam-container-default - 1.2.4 - test - - - - org.ops4j.pax.logging - pax-logging-api - 1.6.1 - test - - - - org.ops4j.pax.logging - pax-logging-service - 1.6.1 - test - - - - org.ops4j.pax.url - pax-url-mvn - 1.2.4 - test - - - - - - org.apache.felix - org.apache.felix.bundlerepository - 1.6.2 - test - - - - org.apache.aries - org.apache.aries.util - 0.4-SNAPSHOT - test - - - - org.apache.aries.blueprint - org.apache.aries.blueprint - 0.4-SNAPSHOT - test - - - - org.apache.aries.proxy - org.apache.aries.proxy - 0.4-SNAPSHOT - test - - - - org.apache.aries.application - org.apache.aries.application.runtime - 0.4-SNAPSHOT - test - - - - org.apache.aries.application - org.apache.aries.application.default.local.platform - 0.4-SNAPSHOT - test - - - - org.apache.aries.application - org.apache.aries.application.runtime.itest.interfaces - 0.4-SNAPSHOT - test - - - - asm - asm-all - 3.3.1 - test - - - - org.osgi - org.osgi.compendium - 4.2.0 - test - - - - org.osgi - org.osgi.core - 4.2.0 - test - - - - - - - org.apache.tuscany.maven.plugins - maven-bundle-plugin - 1.0.7 - - - - extensions-build - process-resources - - generate-meta-data - - - false - false - true - false - true - false - false - features - - - org.apache.tuscany.sca - tuscany-base-runtime-pom - 2.0-Beta4 - - - - - org.apache.tuscany.sca - tuscany-binding-atom-runtime - 2.0-Beta4 - - - org.apache.tuscany.sca - tuscany-binding-commet-runtime - 2.0-Beta4 - - - org.apache.tuscany.sca - tuscany-binding-corba-runtime - 2.0-Beta4 - - - org.apache.tuscany.sca - tuscany-binding-ejb-runtime - 2.0-Beta4 - - - org.apache.tuscany.sca - tuscany-binding-hazelcase-runtime - 2.0-Beta4 - - - org.apache.tuscany.sca - tuscany-binding-jms-runtime - 2.0-Beta4 - - - org.apache.tuscany.sca - tuscany-binding-jsonp-runtime - 2.0-Beta4 - - - org.apache.tuscany.sca - tuscany-binding-jsonrpc-runtime - 2.0-Beta4 - - - org.apache.tuscany.sca - tuscany-binding-rest-runtime - 2.0-Beta4 - - - org.apache.tuscany.sca - tuscany-binding-rmi-runtime - 2.0-Beta4 - - - org.apache.tuscany.sca - tuscany-binding-rss-runtime - 2.0-Beta4 - - - org.apache.tuscany.sca - tuscany-binding-ws-runtime-axis2 - 2.0-Beta4 - - - - org.apache.tuscany.sca - tuscany-implementation-bpel-runtime - 2.0-Beta4 - - - org.apache.tuscany.sca - tuscany-implementation-jaxes-runtime - 2.0-Beta4 - - - org.apache.tuscany.sca - tuscany-implementation-osgi-runtime - 2.0-Beta4 - - - org.apache.tuscany.sca - tuscany-implementation-python-runtime - 2.0-Beta4 - - - org.apache.tuscany.sca - tuscany-implementation-script-runtime - 2.0-Beta4 - - - org.apache.tuscany.sca - tuscany-implementation-spring-runtime - 2.0-Beta4 - - - org.apache.tuscany.sca - tuscany-implementation-web-runtime - 2.0-Beta4 - - - org.apache.tuscany.sca - tuscany-implementation-widget-runtime - 2.0-Beta4 - - - - org.apache.tuscany.sca - tuscany-host-jetty - 2.0-Beta4 - - - - - - org.apache.woden - woden-impl-dom - 1.0M8 - ${basedir}/manifests/woden-impl-dom-1.0M8.MF - - - org.apache.axis2 - axis2-kernel - 1.5.3 - ${basedir}/manifests/axis2-kernel-1.5.3.MF - - - org.apache.axis2 - axis2-transport-http - 1.5.3 - ${basedir}/manifests/axis2-transport-http-1.5.3.MF - - - org.apache.axis2 - * - * - - - - - - - - org.eclipse - osgi - 3.3.0-v20070530 - - - - - org.apache.servicemix.tooling - depends-maven-plugin - 1.2 - - - generate-depends-file - - generate-depends-file - - - ${project.build.directory}/test-classes/META-INF/maven/dependencies.properties - - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/distribution/osgi/src/test/java/sample/GenerateFeatureReposTestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/distribution/osgi/src/test/java/sample/GenerateFeatureReposTestCase.java deleted file mode 100644 index a5c852b7f5..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/distribution/osgi/src/test/java/sample/GenerateFeatureReposTestCase.java +++ /dev/null @@ -1,37 +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 sample; - - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.junit.JUnit4TestRunner; - - -@RunWith( JUnit4TestRunner.class ) -public class GenerateFeatureReposTestCase extends TestBaseClass{ - - @Test - public void generateBaseRepositoryXML() { - generateRepositoryXML("tuscany-base-runtime-pom"); - generateRepositoryXML("tuscany-binding-ws-runtime-axis2"); - } -} - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/distribution/osgi/src/test/java/sample/TestBaseClass.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/distribution/osgi/src/test/java/sample/TestBaseClass.java deleted file mode 100644 index e1a684c50d..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/distribution/osgi/src/test/java/sample/TestBaseClass.java +++ /dev/null @@ -1,205 +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 sample; - -import static org.junit.Assert.assertEquals; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileOutputStream; -import java.io.FileReader; -import java.util.HashSet; -import java.util.Set; - -import static org.ops4j.pax.exam.CoreOptions.equinox; -import static org.ops4j.pax.exam.CoreOptions.options; -import static org.ops4j.pax.exam.CoreOptions.systemProperty; - -import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.workingDirectory; - -import org.apache.aries.application.filesystem.IDirectory; -import org.apache.aries.application.management.spi.repository.RepositoryGenerator; -import org.apache.aries.application.modelling.ModelledResourceManager; -import org.apache.aries.application.modelling.ModelledResource; -import org.apache.aries.application.utils.filesystem.FileSystem; - -import org.apache.felix.bundlerepository.Repository; -import org.apache.felix.bundlerepository.RepositoryAdmin; - -import org.junit.Test; -import org.junit.runner.RunWith; - -import org.ops4j.pax.exam.CoreOptions; -import org.ops4j.pax.exam.Inject; -import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.container.def.options.WorkingDirectoryOption; -import org.ops4j.pax.exam.junit.Configuration; -import org.ops4j.pax.exam.junit.JUnit4TestRunner; -import org.ops4j.pax.exam.options.MavenArtifactProvisionOption; - -import org.osgi.framework.BundleContext; -import org.osgi.framework.Constants; -import org.osgi.framework.Filter; -import org.osgi.framework.FrameworkUtil; -import org.osgi.util.tracker.ServiceTracker; - -/* For debugging, uncomment the next two lines and add these imports: - */ -import static org.ops4j.pax.exam.CoreOptions.waitForFrameworkStartup; -import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption; - - -/** - * Note that much of the technical detail/instruction comes from... - * - * http://svn.apache.org/repos/asf/aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverTest.java - * - */ - -//@RunWith( JUnit4TestRunner.class ) -public class TestBaseClass { - - public static final long DEFAULT_TIMEOUT = 30000; - - @Inject - protected BundleContext bundleContext; - - @Configuration - public static Option[] configuration() { - Option[] options = options( - mavenBundle("org.ops4j.pax.logging", "pax-logging-api"), - mavenBundle("org.ops4j.pax.logging", "pax-logging-service"), - systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"), - - mavenBundle("org.ops4j.pax.url", "pax-url-mvn"), - - mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint"), - mavenBundle("asm", "asm-all"), - mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"), - mavenBundle("org.apache.aries", "org.apache.aries.util"), - - mavenBundle("org.apache.aries.application", "org.apache.aries.application.api"), - mavenBundle("org.apache.aries.application", "org.apache.aries.application.utils"), - mavenBundle("org.apache.aries.application", "org.apache.aries.application.modeller"), - mavenBundle("org.apache.aries.application", "org.apache.aries.application.default.local.platform"), - mavenBundle("org.apache.felix", "org.apache.felix.bundlerepository"), - mavenBundle("org.apache.aries.application", "org.apache.aries.application.resolver.obr"), - mavenBundle("org.apache.aries.application", "org.apache.aries.application.deployment.management"), - mavenBundle("org.apache.aries.application", "org.apache.aries.application.management"), - mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime"), - mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime.itest.interfaces"), - mavenBundle("org.osgi", "org.osgi.compendium"), - mavenBundle("org.apache.aries.testsupport", "org.apache.aries.testsupport.unit"), - - mavenBundle("org.apache.tuscany.sca", "tuscany-sca-api"), - - //mavenBundle("org.apache.tuscany.sca", "bundle"), - - /* For debugging, uncomment the next two lines - vmOption("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=7777"), - waitForFrameworkStartup(), - */ - - workingDirectory("D://sca-java-2.x//unreleased//distribution//osgi//target"), - - equinox().version("3.5.0")); - - return options; - } - - public void generateRepositoryXML(String featureName) { - System.out.println("generateRepositoryXML - start"); - System.out.println("test dir = " + System.getProperty("user.dir")); - System.out.println("current dir = " + this.getClass().getProtectionDomain().getCodeSource().getLocation()); - - // get the OBR repository admin service - RepositoryAdmin respositoryAdminService = getOsgiService(RepositoryAdmin.class); - - // get the repository generator service - System.out.println("get RepositoryGenerator service ="); - RepositoryGenerator repositoryGenerator = getOsgiService(RepositoryGenerator.class); - System.out.println(repositoryGenerator); - - System.out.println("get ModelledResourceManager service ="); - ModelledResourceManager modelledResourceManager = getOsgiService(ModelledResourceManager.class); - System.out.println(modelledResourceManager); - - Set mrs = new HashSet(); - - try { - // create mrs based on base runtime - // directories relative to working directory - populateMRS(modelledResourceManager, - mrs, - "../../../../distribution/all/target/features/" + featureName + "/which-jars", - "../../../../distribution/all/target/modules"); - FileOutputStream fout = new FileOutputStream("./features/" +featureName + "/repository.xml"); - repositoryGenerator.generateRepository(featureName + " repository", mrs, fout); - fout.close(); - - } catch(Exception ex) { - ex.printStackTrace(); - } - - System.out.println("generateRepositoryXML - end"); - } - - public void populateMRS(ModelledResourceManager modelledResourceManager, - Set mrs, - String whichJars, - String modules){ - try { - BufferedReader in = new BufferedReader(new FileReader(whichJars)); - String line; - while ((line = in.readLine()) != null) { - if (line.endsWith(".jar")){ - int dirSeparatorIndex = line.indexOf("/"); - if (dirSeparatorIndex > 0){ - line = line.substring(0, dirSeparatorIndex); - } - System.out.println("Processing - " + line); - File bundleFile = new File(modules + "\\" + line); - IDirectory jarDir = FileSystem.getFSRoot(bundleFile); - mrs.add(modelledResourceManager.getModelledResource(bundleFile.toURI().toString(), jarDir)); - } - } - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - public T getOsgiService(Class type) { - try { - String filterString = "(" + Constants.OBJECTCLASS + "=" + type.getName() + ")"; - Filter osgiFilter = FrameworkUtil.createFilter(filterString); - ServiceTracker tracker = new ServiceTracker(bundleContext, osgiFilter, null); - tracker.open(); - Object tmp = tracker.waitForService(DEFAULT_TIMEOUT); - return type.cast(tmp); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - public static MavenArtifactProvisionOption mavenBundle(String groupId, String artifactId) { - return CoreOptions.mavenBundle().groupId(groupId).artifactId(artifactId).versionAsInProject(); - } -} - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/README b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/README deleted file mode 100644 index 15736845da..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/README +++ /dev/null @@ -1,154 +0,0 @@ -The Apache Tuscany SCA Samples -============================== - -Welcome to the Apache Tuscany SCA Java runtime. You can find more general -documentation about the runtime at: - -http://tuscany.apache.org/documentation-2x/ - -Here we give a short overview of what you can find in the samples directory. -More detail on the individual sample contributions can be found at: - -http://tuscany.apache.org/documentation-2x/20-beta-samples-documentation.html - -There are several samples subdirectories in the distribution; - -getting-started -=============== - -This is a good place to start if you've not tried Tuscany SCA Java before. This -directory contains a number of simple "SCA Contributions" that can be run using -the Tuscany SCA runtime. An SCA Contribution is the way that SCA composite -applications are packaged so they can be run. For general information on SCA -see http://tuscany.apache.org/documentation-2x/sca-introduction.html - -learning-more -============= - -This directory contains many more SCA Contributions that you can try with -the Tuscany SCA Java runtime. Some demonstrate particular features of the -runtime, or example, the contributions under the async directory demonstrate -the asynchronous programming model that the runtime supports. - -SCA is extensible. You can plug in extensions to support many different types -of technology. The Tuscany SCA Java runtime comes with lots of extensions -and the majority of contributions here demonstrate these extensions. They are -organized under directories following the name of the extension, for example, -contributions that demonstrate the web services binding in operation can -be found in the binding-ws directory. When you want to use the web service -binding with an SCA service a reference it appears in the composite XML in -the following way: - - - - - -Hence it should be easy to map between extensions, as they appear in -composite files and other samples that demonstrate various features of the -extension. - -The contributions here can be run with using the approach that you find -most convenient from the running-tuscany directory. - -running-tuscany -=============== - -The Tuscany SCA Java runtime can be used directly from the command line. It can -also be embedded in other programs. As such there are many different ways that -you can start the Tuscany SCA runtime and deploy contributions to it. Each -directory here describes a different way of running Tuscany. In most cases these -different approaches can be used to run any of the contributions from the -getting-started or learning-more directories. - -applications -============ - -The contributions here demonstrate more fully formed applications when -compared to the contributions found the getting-started or learning-more -directories. - -extending-tuscany -================= - -Once you're familiar with Tuscany and SCA you're likely to find that to -implement you're application you need particular bindings, implementation -types, policies or databindings. The examples in this directory show you -how to extend the Tuscany runtime to include the technologies you need to use. - -Running samples ---------------- - -Running a samples contribution involves 3 basic steps - -1) build the contribution - -Using ant, maven or eclipse (see below) - -2) launch the contribution - -Using one of the approaches described in the running-tuscany directory - -3) send a test message to the a component service - -When you want to exercise an SCA composite application you have to send a -message to a component service. There are several ways of doing this depending -on how the sample contribution has been configured. For example, you could -send a SOAP message using the Web Services explorer in Eclipse, you could -use a separate client program that uses the SCA client API, the sample -contribution itself may even include initialization code that sends a test -message when the contribution is started. The documentation for each sample -describes what to do to send a test message. - -Building the sample contributions using Ant --------------------------------------------- -Most sample contributions are provided with a build.xml file. When you see one -you can build it using Ant. - -These build.xml files are designed to work with the Tuscany SCA Java binary -distribution and build a classpath that, by various means, refers to the -jars that are shipped in the modules directory. For them to work properly -they should be run from the directory in which you find the build.xml file. - -cd -ant - -The result of this process will be the built contribution (a jar file) in the -target subdirectory of the sample contribution directory. - -Once the sample is built you have the option of running the sample in whatever -way best suits you. - -Building SCA Samples Using Maven --------------------------------- -All sample contributions are provided with a pom.xml Maven build file. The -Maven build process will work from both source and binary distributions. - -cd -mvn - -This will take a little while to complete. Experience with Maven tells us that -sometimes there are problems downloading the dependencies that Apache Tuscany -SCA requires. If Maven reports that it cannot download required dependencies -try running the Maven build again. - -When using Maven the samples are unit tested using JUnit test cases and so you -will sometimes see test output during the build process. - -The result of this process will be the built contribution (a jar file) in the -target subdirectory of the sample contribution directory. - -Once the sample is built you have the option of running the sample in whatever -way best suits you. - -Building Samples In An IDE ---------------------------- - -The easiest way to use the samples in an IDE is to use Maven to generate all -of the IDE project files for you automatically. You don't have to do this -though and can use a series of manual steps in order to import the Tuscany -samples into an IDE. - -Both approaches to importing SCA contribution projects into Eclipse are -documented at: - -http://tuscany.apache.org/import-existing-tuscany-sca-projects-into-eclipse.html diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/pom.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/pom.xml deleted file mode 100644 index d9d4286b15..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/pom.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-samples - 2.0-Beta4 - - - tuscany-samples-applications - 2.0-Beta4 - pom - Apache Tuscany Sample Applications - - - store - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/README b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/README deleted file mode 100644 index d31e4c59b7..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/README +++ /dev/null @@ -1,28 +0,0 @@ -Store Sample -====================================== - -This is a sample store scenario that is used as a getting started guide -for Tuscany SCA. For detailed information, please see: - -http://tuscany.apache.org/getting-started-with-tuscany.html - -or - -http://tuscany.apache.org/getting-started-with-tuscany-using-tuscany-eclipse-plugin.html - - -Building And Running The Sample Using Ant ------------------------------------------ -With the binary distribution the sample can be built using Ant as follows: - -cd store -ant compile - -and then, to run: - -ant run - -Once the store application is running use your browser to visit the following -URL: - -http://localhost:8080/store diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/build.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/build.xml deleted file mode 100644 index e28e7c87be..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/build.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/pom.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/pom.xml deleted file mode 100644 index e125d8cb27..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/pom.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca - tuscany-samples - 2.0-Beta4 - - sample-store - Apache Tuscany SCA Sample Getting Started Online Store - - - - org.apache.tuscany.sca - tuscany-base-runtime-pom - 2.0-Beta4 - pom - - - org.apache.tuscany.sca - tuscany-data-api - 2.0-Beta4 - - - org.apache.tuscany.sca - tuscany-binding-atom-runtime - 2.0-Beta4 - - - org.apache.tuscany.sca - tuscany-binding-http-runtime - 2.0-Beta4 - - - org.apache.tuscany.sca - tuscany-binding-jsonrpc-runtime - 2.0-Beta4 - - - org.apache.tuscany.sca - tuscany-implementation-widget-runtime - 2.0-Beta4 - - - org.apache.tuscany.sca - tuscany-implementation-widget-runtime-dojo - 2.0-Beta4 - - - org.apache.tuscany.sca - tuscany-web-javascript-dojo - 2.0-Beta4 - - - org.mortbay.jetty - jetty - 6.1.19 - test - - - net.sourceforge.htmlunit - htmlunit - 2.6 - test - - - junit - junit - 4.8.1 - test - - - - - ${project.artifactId} - - - org.codehaus.mojo - exec-maven-plugin - 1.1.1 - - - - java - - - - - test - store.StoreTestCase - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/launch/Launch.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/launch/Launch.java deleted file mode 100644 index 8e4b5839e4..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/launch/Launch.java +++ /dev/null @@ -1,39 +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 launch; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; - -public class Launch { - public static void main(String[] args) throws Exception { - System.out.println("Starting ..."); - String contribution = ContributionLocationHelper.getContributionLocation(Launch.class); - Node node = NodeFactory.newInstance().createNode("store.composite", new Contribution("test", contribution)); - node.start(); - System.out.println("store.composite ready for big business !!!"); - System.in.read(); - System.out.println("Stopping ..."); - node.stop(); - System.out.println(); - } -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/Cart.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/Cart.java deleted file mode 100644 index 3fb5439bc3..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/Cart.java +++ /dev/null @@ -1,28 +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 services; - -import org.apache.tuscany.sca.data.collection.Collection; -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface Cart extends Collection { - -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/Catalog.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/Catalog.java deleted file mode 100644 index b5e504fe11..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/Catalog.java +++ /dev/null @@ -1,27 +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 services; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface Catalog { - Item[] get(); -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/CurrencyConverter.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/CurrencyConverter.java deleted file mode 100644 index a064f3dd69..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/CurrencyConverter.java +++ /dev/null @@ -1,29 +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 services; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface CurrencyConverter { - public double getConversion(String fromCurrenycCode, String toCurrencyCode, double amount); - - public String getCurrencySymbol(String currencyCode); -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/CurrencyConverterImpl.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/CurrencyConverterImpl.java deleted file mode 100644 index c354aed447..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/CurrencyConverterImpl.java +++ /dev/null @@ -1,38 +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 services; - -public class CurrencyConverterImpl implements CurrencyConverter { - public double getConversion(String fromCurrencyCode, String toCurrencyCode, double amount) { - if (toCurrencyCode.equals("USD")) - return amount; - else if (toCurrencyCode.equals("EUR")) - return ((double)Math.round(amount * 0.7256 * 100)) /100; - return 0; - } - - public String getCurrencySymbol(String currencyCode) { - if (currencyCode.equals("USD")) - return "$"; - else if (currencyCode.equals("EUR")) - return "E"; //"€"; - return "?"; - } -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/FruitsCatalogImpl.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/FruitsCatalogImpl.java deleted file mode 100644 index d132a24b00..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/FruitsCatalogImpl.java +++ /dev/null @@ -1,52 +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 services; - -import java.util.ArrayList; -import java.util.List; - -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Property; -import org.oasisopen.sca.annotation.Reference; - -public class FruitsCatalogImpl implements Catalog { - - @Property - public String currencyCode = "USD"; - - @Reference - public CurrencyConverter currencyConverter; - - private List catalog = new ArrayList(); - - @Init - public void init() { - String currencySymbol = currencyConverter.getCurrencySymbol(currencyCode); - catalog.add(new Item("Apple", currencySymbol + currencyConverter.getConversion("USD", currencyCode, 2.99))); - catalog.add(new Item("Orange", currencySymbol + currencyConverter.getConversion("USD", currencyCode, 3.55))); - catalog.add(new Item("Pear", currencySymbol + currencyConverter.getConversion("USD", currencyCode, 1.55))); - } - - public Item[] get() { - Item[] catalogArray = new Item[catalog.size()]; - catalog.toArray(catalogArray); - return catalogArray; - } -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/Item.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/Item.java deleted file mode 100644 index 0a9dcb2ffc..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/Item.java +++ /dev/null @@ -1,54 +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 services; - -public class Item { - private String name; - private String price; - - public Item() { - } - - public Item(String name, String price) { - this.name = name; - this.price = price; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPrice() { - return price; - } - - public void setPrice(String price) { - this.price = price; - } - - public String toString() { - return "Item name: " + name + ", price: " + price; - } - -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/ShoppingCartImpl.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/ShoppingCartImpl.java deleted file mode 100644 index 698614212d..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/ShoppingCartImpl.java +++ /dev/null @@ -1,112 +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 services; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -import org.apache.tuscany.sca.data.collection.Entry; -import org.apache.tuscany.sca.data.collection.NotFoundException; -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Scope; - -@Scope("COMPOSITE") -public class ShoppingCartImpl implements Cart, Total { - - private Map cart; - - @Init - public void init() { - cart = new HashMap(); - } - - public Entry[] getAll() { - Entry[] entries = new Entry[cart.size()]; - int i = 0; - for (Map.Entry e: cart.entrySet()) { - entries[i++] = new Entry(e.getKey(), e.getValue()); - } - return entries; - } - - public Item get(String key) throws NotFoundException { - Item item = cart.get(key); - if (item == null) { - throw new NotFoundException(key); - } else { - return item; - } - } - - public String post(String key, Item item) { - if (key == null) { - key ="cart-" + UUID.randomUUID().toString(); - } - cart.put(key, item); - return key; - } - - public void put(String key, Item item) throws NotFoundException { - if (!cart.containsKey(key)) { - throw new NotFoundException(key); - } - cart.put(key, item); - } - - public void delete(String key) throws NotFoundException { - if (key == null || key.equals("")) { - cart.clear(); - } else { - Item item = cart.remove(key); - if (item == null) - throw new NotFoundException(key); - } - } - - public Entry[] query(String queryString) { - List> entries = new ArrayList>(); - if (queryString.startsWith("name=")) { - String name = queryString.substring(5); - for (Map.Entry e: cart.entrySet()) { - Item item = e.getValue(); - if (item.getName().equals(name)) { - entries.add(new Entry(e.getKey(), e.getValue())); - } - } - } - return entries.toArray(new Entry[entries.size()]); - } - - public String getTotal() { - double total = 0; - String currencySymbol = ""; - if (!cart.isEmpty()) { - Item item = cart.values().iterator().next(); - currencySymbol = item.getPrice().substring(0, 1); - } - for (Item item : cart.values()) { - total += Double.valueOf(item.getPrice().substring(1)); - } - return currencySymbol + String.valueOf(total); - } -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/Total.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/Total.java deleted file mode 100644 index b77cc1c7ac..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/java/services/Total.java +++ /dev/null @@ -1,29 +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 services; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface Total { - - String getTotal(); - -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/resources/store.composite b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/resources/store.composite deleted file mode 100644 index 9c3b79c508..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/resources/store.composite +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - USD - - - - - - - - - - - - - - - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/resources/uiservices/store.html b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/resources/uiservices/store.html deleted file mode 100644 index be3efea327..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/main/resources/uiservices/store.html +++ /dev/null @@ -1,162 +0,0 @@ - - - -Store - - - - - - - - - -

Store

-
-

Catalog

-
-
-
- -
- -
- -

Your Shopping Cart

-
-
-
-
-
- - - (feed) -
-
- - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/test/java/client/Shopper.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/test/java/client/Shopper.java deleted file mode 100644 index 4e2fa63493..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/test/java/client/Shopper.java +++ /dev/null @@ -1,29 +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 client; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface Shopper { - - String shop(String itemName, int quantity); - -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/test/java/client/ShopperImpl.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/test/java/client/ShopperImpl.java deleted file mode 100644 index 05b1800d4f..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/test/java/client/ShopperImpl.java +++ /dev/null @@ -1,64 +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 client; - -import org.apache.tuscany.sca.data.collection.NotFoundException; -import org.oasisopen.sca.annotation.Reference; - -import services.Cart; -import services.Catalog; -import services.Item; -import services.Total; - -public class ShopperImpl implements Shopper { - - @Reference - public Catalog catalog; - - @Reference - public Cart shoppingCart; - - @Reference - public Total shoppingTotal; - - public String shop(String itemName, int quantity) { - - Item[] items = catalog.get(); - for (Item item: items) { - if (item.getName().startsWith(itemName)) { - - try { - shoppingCart.delete(""); - } catch (NotFoundException e) { - // ignore - } - - for (int i = 0; i < quantity; i++) { - shoppingCart.post("item" + i, item); - } - - return shoppingTotal.getTotal(); - } - } - - return ""; - } - -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/test/java/store/StoreTestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/test/java/store/StoreTestCase.java deleted file mode 100644 index 7fa866d1c6..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/test/java/store/StoreTestCase.java +++ /dev/null @@ -1,121 +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 store; - -import java.io.IOException; -import java.net.MalformedURLException; - -import junit.framework.Assert; - -import org.apache.tuscany.sca.node.Contribution; -import org.apache.tuscany.sca.node.ContributionLocationHelper; -import org.apache.tuscany.sca.node.Node; -import org.apache.tuscany.sca.node.NodeFactory; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; - -import client.Shopper; - -import com.gargoylesoftware.htmlunit.BrowserVersion; -import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.NicelyResynchronizingAjaxController; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.HtmlCheckBoxInput; -import com.gargoylesoftware.htmlunit.html.HtmlForm; -import com.gargoylesoftware.htmlunit.html.HtmlPage; - - -/** - * Test the store-merger. - * - * @version $Rev$ $Date$ - */ -public class StoreTestCase { - private static Node nodeStore; - - public static void main(String[] args) throws Exception { - setUp(); - testWaitForInput(); - tearDown(); - } - - @BeforeClass - public static void setUp() throws Exception { - String storeLocation = ContributionLocationHelper.getContributionLocation("store.composite"); - String storeClientLocation = ContributionLocationHelper.getContributionLocation("store-client.composite"); - - nodeStore = NodeFactory.newInstance().createNode(new Contribution("store", storeLocation), new Contribution("storeClient", storeClientLocation)); - nodeStore.start(); - } - - @AfterClass - public static void tearDown() throws Exception { - nodeStore.stop(); - } - - public static void testWaitForInput() { - try { - System.out.println("press enter to continue)"); - System.in.read(); - } catch (IOException e) { - e.printStackTrace(); - } - } - - @Test - public void testShop() { - Shopper shopper = nodeStore.getService(Shopper.class, "StoreClient"); - - String total = shopper.shop("Orange", 5); - System.out.println("Total: " + total); - - Assert.assertEquals("$17.75", total); - - } - - @Test - public void testStoreWidget() throws FailingHttpStatusCodeException, MalformedURLException, IOException { - WebClient webClient = new WebClient(BrowserVersion.FIREFOX_3); - webClient.setRedirectEnabled(true); - webClient.setThrowExceptionOnScriptError(false); - //webClient.waitForBackgroundJavaScript(100000); - //webClient.waitForBackgroundJavaScriptStartingBefore(100000); - webClient.setAjaxController(new NicelyResynchronizingAjaxController()); - - HtmlPage page = (HtmlPage) webClient.getPage("http://localhost:8080/store/store.html"); - - HtmlForm form = (HtmlForm) page.getFormByName("catalogForm"); - - try { - Thread.sleep(1000); - } catch (InterruptedException e) { - } - - HtmlCheckBoxInput catalogItems = (HtmlCheckBoxInput) form.getInputByName("items"); - - System.out.println(">>>" + catalogItems.getAttribute("value")); - Assert.assertEquals("Apple - $2.99", catalogItems.getAttribute("value")); - - webClient.closeAllWindows(); - } - -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/test/resources/store-client.composite b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/test/resources/store-client.composite deleted file mode 100644 index c9abe8e996..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/src/test/resources/store-client.composite +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/store.png b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/store.png deleted file mode 100644 index da413edeee..0000000000 Binary files a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/store.png and /dev/null differ diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/store.svg b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/store.svg deleted file mode 100644 index 74f8ecd36d..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/applications/store/store.svg +++ /dev/null @@ -1,304 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - store - ufs - - ShoppingCart - - CurrencyConverter - - - - - - - - - - CurrenyCode HTTP JSONRPC Atom - - Catalog - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/binding.ws.composite b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/binding.ws.composite deleted file mode 100644 index a53a68f5bc..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/binding.ws.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-scaclient/README b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-scaclient/README deleted file mode 100644 index 0cfd8df590..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-scaclient/README +++ /dev/null @@ -1,28 +0,0 @@ -Tuscany - Getting Started - Helloworld SCAClient Sample -------------------------------------------------------- - -This sample demonstrates using the OASIS SCAClient API to invoke a service in a remote SCA domain. - -See the README in the top-level samples folder for general information on the Tuscany samples. - -This project has a Java class with a main method which uses the SCAClient API to invoke a Helloworld -service in a remote SCA domain. - -Before running this sample you must have a helloworld service running in a SCA domain somewhere, -for example, you can do that by using a separate command prompt to run the Tuscany -"Getting Started - Helloworld Sample" with the command - - mvn tuscany:run -DdomainURI=uri:default - -(including that domainURI parameter activates the Tuscany distributed domain) - -You can then run this SCAClient sample with the Maven command: - - mvn tuscany:run - -You should see the following oputput: - - HelloworldSCAClient, using domainURI uri:default - Calling HelloworldComponent.sayHello("world") - Hello world - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-scaclient/pom.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-scaclient/pom.xml deleted file mode 100644 index 45b95adaaa..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-scaclient/pom.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - 4.0.0 - - - org.apache.tuscany.sca.samples - tuscany-samples - 2.0-Beta4 - - - - helloworld-scaclient - 2.0-Beta4 - - Apache Tuscany SCA Samples Helloworld SCAClient - - - ${project.version} - - - - - - org.apache.tuscany.sca - tuscany-sca-api - ${tuscany.version} - provided - - - - junit - junit - 4.8.1 - test - - - - org.apache.tuscany.sca - tuscany-base-runtime - ${tuscany.version} - test - - - - org.apache.tuscany.sca - tuscany-domain-hazelcast - ${tuscany.version} - test - - - - - - - - - - org.apache.tuscany.maven.plugins - maven-tuscany-plugin - ${tuscany.version} - - sample.HelloworldSCAClient - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-scaclient/src/main/java/sample/Helloworld.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-scaclient/src/main/java/sample/Helloworld.java deleted file mode 100644 index 1eeb8be9fd..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-scaclient/src/main/java/sample/Helloworld.java +++ /dev/null @@ -1,28 +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 sample; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface Helloworld { - - String sayHello(String name); - -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-scaclient/src/main/java/sample/HelloworldSCAClient.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-scaclient/src/main/java/sample/HelloworldSCAClient.java deleted file mode 100644 index 9954179e74..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-scaclient/src/main/java/sample/HelloworldSCAClient.java +++ /dev/null @@ -1,46 +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 sample; - -import java.net.URI; - -import org.oasisopen.sca.NoSuchDomainException; -import org.oasisopen.sca.NoSuchServiceException; -import org.oasisopen.sca.client.SCAClientFactory; - -public class HelloworldSCAClient { - - public static void main(String[] args) throws NoSuchDomainException, NoSuchServiceException { - - String domainURI = System.getProperties().getProperty("domainURI"); - if (domainURI == null || domainURI.length() < 1) { - domainURI = "uri:default"; - } - System.out.println("HelloworldSCAClient, using domainURI " + domainURI); - - String name = args.length < 1 ? "world" : args[0]; - - SCAClientFactory factory = SCAClientFactory.newInstance(URI.create(domainURI)); - Helloworld service = factory.getService(Helloworld.class, "HelloworldComponent"); - - System.out.println("Calling HelloworldComponent.sayHello(\"" + name + "\")"); - System.out.println(service.sayHello(name)); - } - -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-scaclient/src/test/java/sample/HelloworldTestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-scaclient/src/test/java/sample/HelloworldTestCase.java deleted file mode 100644 index d0ebf5be19..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-scaclient/src/test/java/sample/HelloworldTestCase.java +++ /dev/null @@ -1,54 +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 sample; - -import org.apache.tuscany.sca.Node; -import org.apache.tuscany.sca.TuscanyRuntime; -import org.apache.tuscany.sca.contribution.processor.ContributionReadException; -import org.apache.tuscany.sca.monitor.ValidationException; -import org.apache.tuscany.sca.runtime.ActivationException; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; -import org.oasisopen.sca.NoSuchDomainException; -import org.oasisopen.sca.NoSuchServiceException; - -public class HelloworldTestCase { - - static Node node; - - @Test - public void testSayHello() throws NoSuchDomainException, NoSuchServiceException { - HelloworldSCAClient.main(new String[0]); - } - - @BeforeClass - public static void start() throws ContributionReadException, ActivationException, ValidationException { - node = TuscanyRuntime.newInstance().createNode("uri:default"); - node.installContribution(null, "../helloworld/target/classes", null, null, true); - } - - @AfterClass - public static void stop() { - if (node != null) { - node.stop(); - } - } - -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/README b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/README deleted file mode 100644 index 29b67787b7..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/README +++ /dev/null @@ -1,30 +0,0 @@ -Tuscany - Getting Started - Helloworld WebApp Sample ----------------------------------------------------- - -This sample demonstrates how to use SCA contributions with Web Applications - -See the README in the top-level samples folder for general information on the Tuscany samples. - -This sample project creates a .war web application which includes Tuscany. The SCA contribution -from the helloworld sample is included within the war and its SCA composite started by the webapp, -and there is a JSP page which shows how to invoke SCA services by using the SCA taglib. - -As this sample creates a web application .war archive there is a manual step to deploy the WAR file -to your web application server. The archive is the helloworld-webapp-.war in the target folder. -Alternatively, you can run it by using the Tuscany Maven plugin by using the following command: - - mvn tuscany:run - -(or if you prefer using Jetty then mvn jetty:run, or with the Tomcat plugin mvn tomcat:run) - -Once the web app is running use your browser to visit the following URL; - -http://localhost:8080/helloworld-webapp - -(The port and hostname will of course vary depending on your local installation) - -You should then see the web page return the following: - - Calling HelloworldService sayHello("world") returns: - - Hello world \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/pom.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/pom.xml deleted file mode 100644 index b8fbe6d12a..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/pom.xml +++ /dev/null @@ -1,147 +0,0 @@ - - - - 4.0.0 - - - org.apache.tuscany.sca.samples - tuscany-samples - 2.0-Beta4 - - - - helloworld-webapp - 2.0-Beta4 - - Apache Tuscany SCA Samples Helloworld WebApp - war - - - ${project.version} - - - - - - org.apache.tuscany.sca - tuscany-base-runtime - ${tuscany.version} - - - - junit - junit - 4.8.1 - test - - - - net.sourceforge.htmlunit - htmlunit - 2.6 - test - - - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy - compile - - copy - - - - - org.apache.tuscany.sca.samples - helloworld - ${project.version} - - src/main/webapp/WEB-INF/sca-contributions - - - - - - - - - - org.apache.tuscany.maven.plugins - maven-tuscany-plugin - ${tuscany.version} - - - - - org.mortbay.jetty - maven-jetty-plugin - 6.1.26 - - helloworld-webapp - foo - 9999 - - - - start-jetty - process-test-classes - - run - - - 0 - true - - - 8085 - - - - - - stop-jetty - prepare-package - - stop - - - - - - - - org.codehaus.mojo - tomcat-maven-plugin - 1.1 - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/src/main/java/sample/Helloworld.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/src/main/java/sample/Helloworld.java deleted file mode 100644 index 1eeb8be9fd..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/src/main/java/sample/Helloworld.java +++ /dev/null @@ -1,28 +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 sample; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface Helloworld { - - String sayHello(String name); - -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/src/main/webapp/WEB-INF/web.composite b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/src/main/webapp/WEB-INF/web.composite deleted file mode 100644 index 0c03826f99..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/src/main/webapp/WEB-INF/web.composite +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/src/main/webapp/WEB-INF/web.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index b83a9c3417..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - Apache Tuscany Helloworld Sample - - - tuscany - org.apache.tuscany.sca.host.webapp.TuscanyServletFilter - - - - tuscany - /* - - - - hello.jsp - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/src/main/webapp/hello.jsp b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/src/main/webapp/hello.jsp deleted file mode 100644 index 57abb08ca2..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/src/main/webapp/hello.jsp +++ /dev/null @@ -1,37 +0,0 @@ - - -<%@ page contentType="text/html;charset=UTF-8" language="java" %> -<%@ taglib uri="http://www.osoa.org/sca/sca_jsp.tld" prefix="sca" %> - - - - - - -

Apache Tuscany Helloworld JSP Sample

- - Calling HelloworldService sayHello("world") returns: - -

- - <%= service.sayHello("world") %> - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/src/test/java/itest/HelloworldTestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/src/test/java/itest/HelloworldTestCase.java deleted file mode 100644 index 40da70b98d..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/src/test/java/itest/HelloworldTestCase.java +++ /dev/null @@ -1,53 +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 itest; - -import static org.junit.Assert.assertEquals; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.util.Iterator; - -import org.junit.Test; - -import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.HtmlElement; -import com.gargoylesoftware.htmlunit.html.HtmlPage; -import com.gargoylesoftware.htmlunit.html.HtmlParagraph; - -/** - */ -public class HelloworldTestCase { - - @Test - public void testA() throws FailingHttpStatusCodeException, MalformedURLException, IOException { - HtmlPage page = (HtmlPage)new WebClient().getPage("http://localhost:8085/helloworld-webapp"); - Iterator ss = page.getAllHtmlChildElements().iterator(); - while(ss.hasNext()) { - HtmlElement htmlElement = (HtmlElement) ss.next(); - if( htmlElement instanceof HtmlParagraph) { - assertEquals("Hello world", htmlElement.asText()); - break; - } - } - } - -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/src/test/resources/test-web.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/src/test/resources/test-web.xml deleted file mode 100644 index 4ca1c962a0..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld-webapp/src/test/resources/test-web.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - org.apache.tuscany.sca.config - uri:default?bind=127.0.0.1:54321 - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/README b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/README deleted file mode 100644 index fc306caa34..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/README +++ /dev/null @@ -1,43 +0,0 @@ -Tuscany - Getting Started - Helloworld Sample ---------------------------------------------- - -This sample demonstrates a simple helloworld style SCA application and how to run that with Tuscany. - -See the README in the top-level samples folder for general information on the Tuscany samples. - -This project creates an SCA contribution with a deployable composite named helloworld.composite. -The composite defines an SCA component, HelloworldComponent, which provides a Helloworld service, -the component is implemented by a Java class. - -You can use the contribution by starting the composite in the Tuscany Shell. To do that run the -following command in the helloworld folder: - - mvn tuscany:run - -Alternatively, the Tuscany Shell can be started with the scripts in the Tuscany binary distribution -bin folder. To do that run the following command at the root of a Tuscany binary distribution: - - bin\tuscany.bat samples\getting-started\helloworld - -Once the Shell has been started with one of those methods you can use Shell commands to explore -the SCA domain, for example, use the "installed" command to get the status of installed contributions, -"services" to see the available component services, and you may test calling the helloworld service by -using the "invoke" command: - - invoke HelloworldComponent sayHello yourName - ---- - -This sample was created by the Tuscany contribution-jar Maven archetype. You can use that archetype to -create your own SCA contribution projects by running the following Maven command: - - mvn archetype:generate -DarchetypeCatalog=http://tuscany.apache.org - -then at the prompt select 1 to choose the contribution-jar archetype and then answer the questions. -This project used the following answers: - - Define value for property 'groupId': : org.apache.tuscany.sca.samples - Define value for property 'artifactId': : helloworld-contribution - Define value for property 'version': 1.0-SNAPSHOT: 2.0-SNAPSHOT - Define value for property 'package': org.apache.tuscany.sca.samples: sample - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/pom.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/pom.xml deleted file mode 100644 index e2c4b1e17a..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/pom.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - 4.0.0 - - - org.apache.tuscany.sca.samples - tuscany-samples - 2.0-Beta4 - - - - helloworld - 2.0-Beta4 - - Apache Tuscany SCA Samples Helloworld - - - ${project.version} - - - - - - org.apache.tuscany.sca - tuscany-sca-api - ${tuscany.version} - provided - - - - junit - junit - 4.8.1 - test - - - - org.apache.tuscany.sca - tuscany-base-runtime - ${tuscany.version} - test - - - - - - - - - org.apache.tuscany.maven.plugins - maven-tuscany-plugin - ${tuscany.version} - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/src/main/java/sample/Helloworld.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/src/main/java/sample/Helloworld.java deleted file mode 100644 index f4e8c50448..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/src/main/java/sample/Helloworld.java +++ /dev/null @@ -1,28 +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 sample; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface Helloworld { - - String sayHello(String name); - -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/src/main/java/sample/HelloworldImpl.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/src/main/java/sample/HelloworldImpl.java deleted file mode 100644 index 089b1a4290..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/src/main/java/sample/HelloworldImpl.java +++ /dev/null @@ -1,27 +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 sample; - -public class HelloworldImpl implements Helloworld { - - public String sayHello(String name) { - return "Hello " + name; - } - -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 95c32fb5bf..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/src/main/resources/helloworld.composite b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/src/main/resources/helloworld.composite deleted file mode 100644 index e0206cd6e8..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/src/main/resources/helloworld.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/src/test/java/sample/HelloworldTestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/src/test/java/sample/HelloworldTestCase.java deleted file mode 100644 index be27aa68ef..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/helloworld/src/test/java/sample/HelloworldTestCase.java +++ /dev/null @@ -1,48 +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 sample; - -import org.junit.Assert; - -import org.apache.tuscany.sca.Node; -import org.apache.tuscany.sca.TuscanyRuntime; -import org.junit.Test; -import org.oasisopen.sca.NoSuchServiceException; - -public class HelloworldTestCase { - - @Test - public void testSayHello() throws NoSuchServiceException { - - // Run the SCA composite in a Tuscany runtime - Node node = TuscanyRuntime.runComposite("helloworld.composite", "target/classes"); - try { - - // Get the Helloworld service proxy - Helloworld helloworld = node.getService(Helloworld.class, "HelloworldComponent"); - - // test that it works as expected - Assert.assertEquals("Hello Amelia", helloworld.sayHello("Amelia")); - - } finally { - // Stop the Tuscany runtime Node - node.stop(); - } - } -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/pom.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/pom.xml deleted file mode 100644 index 4a19e3e82a..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/getting-started/pom.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - 4.0.0 - - org.apache.tuscany.sca.samples - tuscany-samples - 2.0-Beta4 - - - tuscany-samples-getting-started - 2.0-Beta4 - pom - Apache Tuscany SCA Samples Getting Started - - - helloworld - helloworld-webapp - helloworld-scaclient - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/README b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/README deleted file mode 100644 index 4abff8df36..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/README +++ /dev/null @@ -1,24 +0,0 @@ -Tuscany - Getting Started - Helloworld Sample ---------------------------------------------- - -This sample demonstrates a simple helloworld style SCA application. - -See the README in the top-level samples folder for general information on the Tuscany samples. - -This project creates an SCA contribution with a deployable composite named helloworld.comosite. -The composite defines an SCA component, HelloworldComponent, which provides a Helloworld service, -the component is implemented by a Java class. - -You can use the contribution by starting the composite in the Tuscany Shell. To do that run the -the Tuscany Shell which can be started with the scripts in the Tuscany binary distribution -bin folder. To do that run the following command at the root of a Tuscany binary distribution: - - bin\tuscany.bat samples\getting-started\helloworld-contribution - -Once the Shell has been started you may use Shell commands to explore -the SCA domain, for example, use the "installed" command to get the status of installed contributions, -"services" to see the available component services, and you may test calling the helloworld service by -using the "invoke" command: - - invoke HelloworldComponent sayHello yourName - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/pom.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/pom.xml deleted file mode 100644 index dfbde57eef..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - 4.0.0 - - - org.apache.tuscany.sca.samples - tuscany-samples - 2.0-Beta4 - - - org.apache.tuscany.sca.samples - helloworld-contribution2 - - Tuscany Sample Helloworld Contribution2 - - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-Beta4 - provided - - - - junit - junit - 4.8.1 - test - - - - - - install - helloworld-contribution - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/src/main/java/sample/Helloworld.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/src/main/java/sample/Helloworld.java deleted file mode 100644 index 1eeb8be9fd..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/src/main/java/sample/Helloworld.java +++ /dev/null @@ -1,28 +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 sample; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface Helloworld { - - String sayHello(String name); - -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/src/main/java/sample/HelloworldImpl.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/src/main/java/sample/HelloworldImpl.java deleted file mode 100644 index c2c851324b..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/src/main/java/sample/HelloworldImpl.java +++ /dev/null @@ -1,36 +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 sample; - -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Scope; -import org.oasisopen.sca.annotation.EagerInit; - -@Scope("COMPOSITE") @EagerInit -public class HelloworldImpl implements Helloworld { - - public String sayHello(String name) { - return "Hello " + name; - } - - @Init - public void init() { - System.out.println(sayHello("world")); - } -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index e82c54d3a7..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/src/main/resources/helloworld.composite b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/src/main/resources/helloworld.composite deleted file mode 100644 index e0206cd6e8..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/src/main/resources/helloworld.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/src/test/java/sample/HelloworldTestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/src/test/java/sample/HelloworldTestCase.java deleted file mode 100644 index d3b858053a..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-contribution2/src/test/java/sample/HelloworldTestCase.java +++ /dev/null @@ -1,36 +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 sample; - -import org.junit.Assert; -import org.junit.Test; -import org.oasisopen.sca.NoSuchServiceException; - -public class HelloworldTestCase { - - @Test - public void testSayHello() throws NoSuchServiceException { - - // Get the Helloworld service proxy - Helloworld helloworld = new HelloworldImpl(); - - // test that it works as expected - Assert.assertEquals("Hello Amelia", helloworld.sayHello("Amelia")); - } -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/README b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/README deleted file mode 100644 index 83e2302ac1..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/README +++ /dev/null @@ -1,43 +0,0 @@ -Tuscany - Getting Started - Helloworld Sample ---------------------------------------------- - -This sample demonstrates a simple helloworld style SCA application and how to run that with Tuscany. - -See the README in the top-level samples folder for general information on the Tuscany samples. - -This project creates an SCA contribution with a deployable composite named helloworld.comosite. -The composite defines an SCA component, HelloworldComponent, which provides a Helloworld service, -the component is implemented by a Java class. - -You can use the contribution by starting the composite in the Tuscany Shell. To do that run the -following command in the helloworld-contribution folder: - - mvn tuscany:run - -Alternatively, the Tuscany Shell can be started with the scripts in the Tuscany binary distribution -bin folder. To do that run the following command at the root of a Tuscany binary distribution: - - bin\tuscany.bat samples\getting-started\helloworld-contribution - -Once the Shell has been started with one of those methods you can use Shell commands to explore -the SCA domain, for example, use the "installed" command to get the status of installed contributions, -"services" to see the available component services, and you may test calling the helloworld service by -using the "invoke" command: - - invoke HelloworldComponent sayHello yourName - ---- - -This sample was created by the Tuscany contribution-jar Maven archetype. You can use that archetype to -create your own SCA contribution projects by running the following Maven command: - - mvn archetype:generate -DarchetypeCatalog=http://tuscany.apache.org - -then at the prompt select 1 to choose the contribution-jar archetype and then answer the questions. -This project used the following answers: - - Define value for property 'groupId': : org.apache.tuscany.sca.samples - Define value for property 'artifactId': : helloworld-contribution - Define value for property 'version': 1.0-SNAPSHOT: 2.0-SNAPSHOT - Define value for property 'package': org.apache.tuscany.sca.samples: sample - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/pom.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/pom.xml deleted file mode 100644 index 16a83e204b..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/pom.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - 4.0.0 - - - org.apache.tuscany.sca.samples - tuscany-samples - 2.0-Beta4 - ../pom.xml - - - org.apache.tuscany.sca.samples - helloworld-http-contribution - 2.0-Beta4 - jar - - Tuscany Sample Helloworld Rest Contribution - - - 2.0-Beta4 - - - - - - org.apache.tuscany.sca - tuscany-sca-api - ${tuscany.version} - provided - - - - junit - junit - 4.8.1 - test - - - - org.apache.tuscany.sca - tuscany-base-runtime - ${tuscany.version} - test - - - - org.apache.tuscany.sca - tuscany-binding-http-runtime - ${tuscany.version} - test - - - - org.apache.tuscany.sca - tuscany-databinding-json - 2.0-Beta4 - test - - - - org.mortbay.jetty - jetty - 6.1.19 - test - - - - - - install - helloworld-contribution - - - - org.apache.tuscany.maven.plugins - maven-tuscany-plugin - ${tuscany.version} - - - org.apache.tuscany.sca - tuscany-binding-http-runtime - ${tuscany.version} - - - org.apache.tuscany.sca - tuscany-databinding-json - 2.0-Beta4 - - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/src/main/java/sample/Helloworld.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/src/main/java/sample/Helloworld.java deleted file mode 100644 index 1eeb8be9fd..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/src/main/java/sample/Helloworld.java +++ /dev/null @@ -1,28 +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 sample; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface Helloworld { - - String sayHello(String name); - -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/src/main/java/sample/HelloworldImpl.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/src/main/java/sample/HelloworldImpl.java deleted file mode 100644 index 95e97b6afb..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/src/main/java/sample/HelloworldImpl.java +++ /dev/null @@ -1,36 +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 sample; - -import org.oasisopen.sca.annotation.EagerInit; -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Scope; - -@Scope("COMPOSITE") @EagerInit -public class HelloworldImpl implements Helloworld { - - public String sayHello(String name) { - return "Hello " + name; - } - - @Init - public void init() { - System.out.println(sayHello("world")); - } -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/src/main/resources/META-INF/helloworld.composite b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/src/main/resources/META-INF/helloworld.composite deleted file mode 100644 index fbfe29eb3e..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/src/main/resources/META-INF/helloworld.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index e82c54d3a7..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/src/test/java/sample/HelloworldTestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/src/test/java/sample/HelloworldTestCase.java deleted file mode 100644 index 3cda2eec2a..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-http-contribution/src/test/java/sample/HelloworldTestCase.java +++ /dev/null @@ -1,68 +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 sample; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.net.URL; - -import org.apache.tuscany.sca.Node; -import org.apache.tuscany.sca.TuscanyRuntime; -import org.junit.Assert; -import org.junit.Test; -import org.oasisopen.sca.NoSuchServiceException; - -public class HelloworldTestCase { - - @Test - public void testSayHello() throws NoSuchServiceException, IOException { - - // Run the SCA composite in a Tuscany runtime - Node node = TuscanyRuntime.runComposite(null, "target/classes"); - try { - - // test that has exposed an HTTP endpoint that works as expected - URL url = new URL("http://localhost:8080/HelloworldComponent/Helloworld/sayHello?name=Amelia"); - Assert.assertEquals("\"Hello Amelia\"", read(url.openStream())); - - } finally { - // Stop the Tuscany runtime Node - node.stop(); - } - } - - private static String read(InputStream is) throws IOException { - BufferedReader reader = null; - try { - reader = new BufferedReader(new InputStreamReader(is)); - StringBuffer sb = new StringBuffer(); - String str; - while ((str = reader.readLine()) != null) { - sb.append(str); - } - return sb.toString(); - } finally { - if (reader != null) { - reader.close(); - } - } - } -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/README b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/README deleted file mode 100644 index 83e2302ac1..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/README +++ /dev/null @@ -1,43 +0,0 @@ -Tuscany - Getting Started - Helloworld Sample ---------------------------------------------- - -This sample demonstrates a simple helloworld style SCA application and how to run that with Tuscany. - -See the README in the top-level samples folder for general information on the Tuscany samples. - -This project creates an SCA contribution with a deployable composite named helloworld.comosite. -The composite defines an SCA component, HelloworldComponent, which provides a Helloworld service, -the component is implemented by a Java class. - -You can use the contribution by starting the composite in the Tuscany Shell. To do that run the -following command in the helloworld-contribution folder: - - mvn tuscany:run - -Alternatively, the Tuscany Shell can be started with the scripts in the Tuscany binary distribution -bin folder. To do that run the following command at the root of a Tuscany binary distribution: - - bin\tuscany.bat samples\getting-started\helloworld-contribution - -Once the Shell has been started with one of those methods you can use Shell commands to explore -the SCA domain, for example, use the "installed" command to get the status of installed contributions, -"services" to see the available component services, and you may test calling the helloworld service by -using the "invoke" command: - - invoke HelloworldComponent sayHello yourName - ---- - -This sample was created by the Tuscany contribution-jar Maven archetype. You can use that archetype to -create your own SCA contribution projects by running the following Maven command: - - mvn archetype:generate -DarchetypeCatalog=http://tuscany.apache.org - -then at the prompt select 1 to choose the contribution-jar archetype and then answer the questions. -This project used the following answers: - - Define value for property 'groupId': : org.apache.tuscany.sca.samples - Define value for property 'artifactId': : helloworld-contribution - Define value for property 'version': 1.0-SNAPSHOT: 2.0-SNAPSHOT - Define value for property 'package': org.apache.tuscany.sca.samples: sample - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/pom.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/pom.xml deleted file mode 100644 index 8724f1da93..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/pom.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - 4.0.0 - - - org.apache.tuscany.sca.samples - tuscany-samples - 2.0-Beta4 - ../pom.xml - - - org.apache.tuscany.sca.samples - helloworld-rest-contribution - 2.0-Beta4 - jar - - Tuscany Sample Helloworld Rest Contribution - - - 2.0-Beta4 - - - - - - org.apache.tuscany.sca - tuscany-sca-api - ${tuscany.version} - provided - - - - javax.ws.rs - jsr311-api - 1.1.1 - provided - - - - junit - junit - 4.8.1 - test - - - - org.apache.tuscany.sca - tuscany-base-runtime - ${tuscany.version} - test - - - - org.apache.tuscany.sca - tuscany-binding-rest-runtime - ${tuscany.version} - test - - - - org.mortbay.jetty - jetty - 6.1.19 - test - - - - - - install - helloworld-contribution - - - - org.apache.tuscany.maven.plugins - maven-tuscany-plugin - ${tuscany.version} - - - org.apache.tuscany.sca - tuscany-binding-rest-runtime - ${tuscany.version} - - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/src/main/java/sample/Helloworld.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/src/main/java/sample/Helloworld.java deleted file mode 100644 index 2faf096c33..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/src/main/java/sample/Helloworld.java +++ /dev/null @@ -1,34 +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 sample; - -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.QueryParam; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface Helloworld { - - @GET - @Path("sayHello") - String sayHello(@QueryParam("name")String name); - -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/src/main/java/sample/HelloworldImpl.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/src/main/java/sample/HelloworldImpl.java deleted file mode 100644 index 95e97b6afb..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/src/main/java/sample/HelloworldImpl.java +++ /dev/null @@ -1,36 +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 sample; - -import org.oasisopen.sca.annotation.EagerInit; -import org.oasisopen.sca.annotation.Init; -import org.oasisopen.sca.annotation.Scope; - -@Scope("COMPOSITE") @EagerInit -public class HelloworldImpl implements Helloworld { - - public String sayHello(String name) { - return "Hello " + name; - } - - @Init - public void init() { - System.out.println(sayHello("world")); - } -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/src/main/resources/META-INF/helloworld.composite b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/src/main/resources/META-INF/helloworld.composite deleted file mode 100644 index 7378f22b49..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/src/main/resources/META-INF/helloworld.composite +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index e82c54d3a7..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/src/test/java/sample/HelloworldTestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/src/test/java/sample/HelloworldTestCase.java deleted file mode 100644 index 8926c6803d..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution/src/test/java/sample/HelloworldTestCase.java +++ /dev/null @@ -1,68 +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 sample; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.net.URL; - -import org.apache.tuscany.sca.Node; -import org.apache.tuscany.sca.TuscanyRuntime; -import org.junit.Assert; -import org.junit.Test; -import org.oasisopen.sca.NoSuchServiceException; - -public class HelloworldTestCase { - - @Test - public void testSayHello() throws NoSuchServiceException, IOException { - - // Run the SCA composite in a Tuscany runtime - Node node = TuscanyRuntime.runComposite(null, "target/classes"); - try { - - // test that has exposed an HTTP endpoint that works as expected - URL url = new URL("http://localhost:8080/HelloworldComponent/Helloworld/sayHello?name=Amelia"); - Assert.assertEquals("Hello Amelia", read(url.openStream())); - - } finally { - // Stop the Tuscany runtime Node - node.stop(); - } - } - - private static String read(InputStream is) throws IOException { - BufferedReader reader = null; - try { - reader = new BufferedReader(new InputStreamReader(is)); - StringBuffer sb = new StringBuffer(); - String str; - while ((str = reader.readLine()) != null) { - sb.append(str); - } - return sb.toString(); - } finally { - if (reader != null) { - reader.close(); - } - } - } -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/README b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/README deleted file mode 100644 index 83e2302ac1..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/README +++ /dev/null @@ -1,43 +0,0 @@ -Tuscany - Getting Started - Helloworld Sample ---------------------------------------------- - -This sample demonstrates a simple helloworld style SCA application and how to run that with Tuscany. - -See the README in the top-level samples folder for general information on the Tuscany samples. - -This project creates an SCA contribution with a deployable composite named helloworld.comosite. -The composite defines an SCA component, HelloworldComponent, which provides a Helloworld service, -the component is implemented by a Java class. - -You can use the contribution by starting the composite in the Tuscany Shell. To do that run the -following command in the helloworld-contribution folder: - - mvn tuscany:run - -Alternatively, the Tuscany Shell can be started with the scripts in the Tuscany binary distribution -bin folder. To do that run the following command at the root of a Tuscany binary distribution: - - bin\tuscany.bat samples\getting-started\helloworld-contribution - -Once the Shell has been started with one of those methods you can use Shell commands to explore -the SCA domain, for example, use the "installed" command to get the status of installed contributions, -"services" to see the available component services, and you may test calling the helloworld service by -using the "invoke" command: - - invoke HelloworldComponent sayHello yourName - ---- - -This sample was created by the Tuscany contribution-jar Maven archetype. You can use that archetype to -create your own SCA contribution projects by running the following Maven command: - - mvn archetype:generate -DarchetypeCatalog=http://tuscany.apache.org - -then at the prompt select 1 to choose the contribution-jar archetype and then answer the questions. -This project used the following answers: - - Define value for property 'groupId': : org.apache.tuscany.sca.samples - Define value for property 'artifactId': : helloworld-contribution - Define value for property 'version': 1.0-SNAPSHOT: 2.0-SNAPSHOT - Define value for property 'package': org.apache.tuscany.sca.samples: sample - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/helloworld-metadata.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/helloworld-metadata.xml deleted file mode 100644 index 97f3fd9f10..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/helloworld-metadata.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/nodeConfig.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/nodeConfig.xml deleted file mode 100644 index 64ffd9c40c..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/nodeConfig.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/pom.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/pom.xml deleted file mode 100644 index b616ab2458..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/pom.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - 4.0.0 - - - org.apache.tuscany.sca.samples - tuscany-samples - 2.0-Beta4 - ../pom.xml - - - org.apache.tuscany.sca.samples - helloworld-rest-contribution2 - 2.0-Beta4 - jar - - Tuscany Sample Helloworld Rest Contribution2 - - - 2.0-Beta4 - - - - - - org.apache.tuscany.sca - tuscany-sca-api - ${tuscany.version} - provided - - - - javax.ws.rs - jsr311-api - 1.1.1 - provided - - - - junit - junit - 4.8.1 - test - - - - org.apache.tuscany.sca - tuscany-base-runtime - ${tuscany.version} - test - - - - org.apache.tuscany.sca - tuscany-binding-rest-runtime - ${tuscany.version} - test - - - - org.mortbay.jetty - jetty - 6.1.19 - test - - - - - - install - helloworld-contribution - - - - org.apache.tuscany.maven.plugins - maven-tuscany-plugin - ${tuscany.version} - - - org.apache.tuscany.sca - tuscany-binding-rest-runtime - ${tuscany.version} - - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/src/main/java/sample/JaxrsHelloworld.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/src/main/java/sample/JaxrsHelloworld.java deleted file mode 100644 index aa0918bbb1..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/src/main/java/sample/JaxrsHelloworld.java +++ /dev/null @@ -1,34 +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 sample; - -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.QueryParam; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface JaxrsHelloworld { - - @GET - @Path("sayHello") - String sayHello(@QueryParam("name") String name); - -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/src/main/resources/META-INF/helloworld.composite b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/src/main/resources/META-INF/helloworld.composite deleted file mode 100644 index 88df3636c3..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/src/main/resources/META-INF/helloworld.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 7d237ea63e..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/src/test/java/sample/HelloworldTestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/src/test/java/sample/HelloworldTestCase.java deleted file mode 100644 index 4749a2eb29..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-rest-contribution2/src/test/java/sample/HelloworldTestCase.java +++ /dev/null @@ -1,71 +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 sample; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.net.URL; - -import org.apache.tuscany.sca.Node; -import org.apache.tuscany.sca.TuscanyRuntime; -import org.apache.tuscany.sca.contribution.processor.ContributionReadException; -import org.apache.tuscany.sca.monitor.ValidationException; -import org.apache.tuscany.sca.runtime.ActivationException; -import org.junit.Assert; -import org.junit.Test; -import org.oasisopen.sca.NoSuchServiceException; - -public class HelloworldTestCase { - - @Test - public void testSayHello() throws NoSuchServiceException, IOException, ContributionReadException, ActivationException, ValidationException { - - // Run the SCA composite in a Tuscany runtime - Node node = TuscanyRuntime.newInstance().createNodeFromXML("nodeConfig.xml"); - try { - - // test that has exposed an HTTP endpoint that works as expected - URL url = new URL("http://localhost:8080/HelloworldComponent/Helloworld/sayHello?name=Amelia"); - Assert.assertEquals("Hello Amelia", read(url.openStream())); - - } finally { - // Stop the Tuscany runtime Node - node.stop(); - } - } - - private static String read(InputStream is) throws IOException { - BufferedReader reader = null; - try { - reader = new BufferedReader(new InputStreamReader(is)); - StringBuffer sb = new StringBuffer(); - String str; - while ((str = reader.readLine()) != null) { - sb.append(str); - } - return sb.toString(); - } finally { - if (reader != null) { - reader.close(); - } - } - } -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-scala-contribution/pom.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-scala-contribution/pom.xml deleted file mode 100644 index 52080adf3d..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-scala-contribution/pom.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - - 4.0.0 - - - org.apache.tuscany.sca - tuscany-sca - 2.0-Beta2 - - - org.apache.tuscany.sca.samples - helloworld-scala-contribution - 2.0-Beta2 - - Tuscany Sample Helloworld Scala Contribution - - - 2.0-Beta2 - 2.8.0 - - - - - - org.apache.tuscany.sca - tuscany-sca-api - ${tuscany.version} - provided - - - - junit - junit - 4.8.1 - test - - - - org.apache.tuscany.sca - tuscany-base-runtime - ${tuscany.version} - test - - - - org.scala-lang - scala-library - ${scala.version} - test - - - - - - install - helloworld-scala-contribution - - src/main/scala - src/test/scala - - - - - org.scala-tools - maven-scala-plugin - 2.15.0 - - - - compile - testCompile - - - - -make:transitive - -dependencyfile - ${project.build.directory}/.scala_dependencies - - - - - - - - org.apache.tuscany.maven.plugins - maven-tuscany-plugin - ${tuscany.version} - - - org.scala-lang - scala-library - ${scala.version} - - - - - - - - \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-scala-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-scala-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index e82c54d3a7..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-scala-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-scala-contribution/src/main/resources/helloworld.composite b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-scala-contribution/src/main/resources/helloworld.composite deleted file mode 100644 index e0206cd6e8..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-scala-contribution/src/main/resources/helloworld.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-scala-contribution/src/main/scala/sample/Helloworld.scala b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-scala-contribution/src/main/scala/sample/Helloworld.scala deleted file mode 100644 index 9f24220a09..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-scala-contribution/src/main/scala/sample/Helloworld.scala +++ /dev/null @@ -1,8 +0,0 @@ -package sample - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -trait Helloworld { - def sayHello(name : String):String -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-scala-contribution/src/main/scala/sample/HelloworldImpl.scala b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-scala-contribution/src/main/scala/sample/HelloworldImpl.scala deleted file mode 100644 index 2142d9ece3..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-scala-contribution/src/main/scala/sample/HelloworldImpl.scala +++ /dev/null @@ -1,9 +0,0 @@ -package sample - -class HelloworldImpl extends Helloworld { - - def sayHello(name : String) = { - "Hello " + name - } - -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-scala-contribution/src/test/scala/sample/HelloworldTestCase.scala b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-scala-contribution/src/test/scala/sample/HelloworldTestCase.scala deleted file mode 100644 index 61b6f48d55..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-scala-contribution/src/test/scala/sample/HelloworldTestCase.scala +++ /dev/null @@ -1,23 +0,0 @@ -package samples - -import org.junit._ -import Assert._ -import org.apache.tuscany.sca._ - -@Test -class HelloworldTestCase { - - @Test - def testSayHello() = { - var node = TuscanyRuntime.runComposite("helloworld.composite", "target/classes"); - try { - var helloworld = node.getService(classOf[sample.Helloworld], "HelloworldComponent"); - assertEquals("Hello Amelia", helloworld.sayHello("Amelia")); - } finally { - node.stop(); - } - } - -} - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/README b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/README deleted file mode 100644 index 506deddb32..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/README +++ /dev/null @@ -1,28 +0,0 @@ -Tuscany - Getting Started - Helloworld Sample ---------------------------------------------- - -This sample demonstrates a helloworld style SCA application that uses the Spring implementation type. - -See the README in the top-level samples folder for general information on the Tuscany samples. - -This project creates an SCA contribution with a deployable composite named helloworld-spring.comosite. -The composite defines an SCA component, HelloworldComponent, which provides a Helloworld service, -the component is implemented by a Spring bean. - -You can use the contribution by starting the composite in the Tuscany Shell. To do that run the -following command in the helloworld-spring-contribution folder: - - mvn tuscany:run - -Alternatively, the Tuscany Shell can be started with the scripts in the Tuscany binary distribution -bin folder. To do that run the following command at the root of a Tuscany binary distribution: - - bin\tuscany.bat samples\getting-started\helloworld-spring-contribution - -Once the Shell has been started with one of those methods you can use Shell commands to explore -the SCA domain, for example, use the "installed" command to get the status of installed contributions, -"services" to see the available component services, and you may test calling the helloworld service by -using the "invoke" command: - - invoke HelloworldComponent sayHello yourName - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/pom.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/pom.xml deleted file mode 100644 index 98f1b990e7..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/pom.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - 4.0.0 - - - org.apache.tuscany.sca.samples - tuscany-samples - 2.0-Beta4 - ../pom.xml - - - helloworld-spring-contribution - Tuscany Sample Helloworld using Spring Contribution - - - 2.0-Beta4 - UTF-8 - - - - - - org.apache.tuscany.sca - tuscany-sca-api - ${tuscany.version} - provided - - - - junit - junit - 4.8.1 - test - - - - org.apache.tuscany.sca - tuscany-base-runtime - ${tuscany.version} - test - - - - org.apache.tuscany.sca - tuscany-implementation-spring-runtime - ${tuscany.version} - test - - - - - - install - - - - org.apache.tuscany.maven.plugins - maven-tuscany-plugin - ${tuscany.version} - - - org.apache.tuscany.sca - tuscany-implementation-spring-runtime - ${tuscany.version} - - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/src/main/java/sample/Helloworld.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/src/main/java/sample/Helloworld.java deleted file mode 100644 index 1eeb8be9fd..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/src/main/java/sample/Helloworld.java +++ /dev/null @@ -1,28 +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 sample; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface Helloworld { - - String sayHello(String name); - -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/src/main/java/sample/HelloworldImpl.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/src/main/java/sample/HelloworldImpl.java deleted file mode 100644 index d8bdadbfe5..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/src/main/java/sample/HelloworldImpl.java +++ /dev/null @@ -1,33 +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 sample; - - -//@Scope("COMPOSITE") @EagerInit -public class HelloworldImpl implements Helloworld { - - public String sayHello(String name) { - return "Hello " + name; - } - -// @Init - public void init() { - System.out.println(sayHello("world")); - } -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/src/main/resources/META-INF/helloworld-context.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/src/main/resources/META-INF/helloworld-context.xml deleted file mode 100644 index 8718d70597..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/src/main/resources/META-INF/helloworld-context.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/src/main/resources/META-INF/helloworld.composite b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/src/main/resources/META-INF/helloworld.composite deleted file mode 100644 index 755fa41638..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/src/main/resources/META-INF/helloworld.composite +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 2476201c93..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/src/test/java/sample/HelloworldTestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/src/test/java/sample/HelloworldTestCase.java deleted file mode 100644 index 1c5c085e8b..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-contribution/src/test/java/sample/HelloworldTestCase.java +++ /dev/null @@ -1,48 +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 sample; - -import org.junit.Assert; - -import org.apache.tuscany.sca.Node; -import org.apache.tuscany.sca.TuscanyRuntime; -import org.junit.Test; -import org.oasisopen.sca.NoSuchServiceException; - -public class HelloworldTestCase { - - @Test - public void testSayHello() throws NoSuchServiceException { - - // Run the SCA composite in a Tuscany runtime - Node node = TuscanyRuntime.runComposite(null, "target/classes"); - try { - - // Get the Helloworld service proxy - Helloworld helloworld = node.getService(Helloworld.class, "HelloworldComponent"); - - // test that it works as expected - Assert.assertEquals("Hello Amelia", helloworld.sayHello("Amelia")); - - } finally { - // Stop the Tuscany runtime Node - node.stop(); - } - } -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/README b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/README deleted file mode 100644 index 506deddb32..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/README +++ /dev/null @@ -1,28 +0,0 @@ -Tuscany - Getting Started - Helloworld Sample ---------------------------------------------- - -This sample demonstrates a helloworld style SCA application that uses the Spring implementation type. - -See the README in the top-level samples folder for general information on the Tuscany samples. - -This project creates an SCA contribution with a deployable composite named helloworld-spring.comosite. -The composite defines an SCA component, HelloworldComponent, which provides a Helloworld service, -the component is implemented by a Spring bean. - -You can use the contribution by starting the composite in the Tuscany Shell. To do that run the -following command in the helloworld-spring-contribution folder: - - mvn tuscany:run - -Alternatively, the Tuscany Shell can be started with the scripts in the Tuscany binary distribution -bin folder. To do that run the following command at the root of a Tuscany binary distribution: - - bin\tuscany.bat samples\getting-started\helloworld-spring-contribution - -Once the Shell has been started with one of those methods you can use Shell commands to explore -the SCA domain, for example, use the "installed" command to get the status of installed contributions, -"services" to see the available component services, and you may test calling the helloworld service by -using the "invoke" command: - - invoke HelloworldComponent sayHello yourName - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/pom.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/pom.xml deleted file mode 100644 index c873607e38..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/pom.xml +++ /dev/null @@ -1,136 +0,0 @@ - - - - 4.0.0 - - - org.apache.tuscany.sca.samples - tuscany-samples - 2.0-Beta4 - ../pom.xml - - - helloworld-spring-web-contribution - Tuscany Sample Helloworld using Spring and binding http/rest Contribution - - - 2.0-Beta4 - UTF-8 - - - - - - org.apache.tuscany.sca - tuscany-sca-api - ${tuscany.version} - provided - - - - junit - junit - 4.8.1 - test - - - - org.apache.tuscany.sca - tuscany-base-runtime - ${tuscany.version} - test - - - - org.apache.tuscany.sca - tuscany-implementation-spring-runtime - ${tuscany.version} - test - - - - org.apache.tuscany.sca - tuscany-binding-http-runtime - ${tuscany.version} - test - - - - org.apache.tuscany.sca - tuscany-databinding-json - 2.0-Beta4 - test - - - - javax.ws.rs - jsr311-api - 1.1.1 - provided - - - - org.apache.tuscany.sca - tuscany-binding-rest-runtime - ${tuscany.version} - test - - - - org.mortbay.jetty - jetty - 6.1.19 - test - - - - - - install - - - - org.apache.tuscany.maven.plugins - maven-tuscany-plugin - ${tuscany.version} - - - org.apache.tuscany.sca - tuscany-implementation-spring-runtime - ${tuscany.version} - - - org.apache.tuscany.sca - tuscany-binding-rest-runtime - ${tuscany.version} - - - org.apache.tuscany.sca - tuscany-binding-http-runtime - ${tuscany.version} - - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/src/main/java/sample/Helloworld.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/src/main/java/sample/Helloworld.java deleted file mode 100644 index 2faf096c33..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/src/main/java/sample/Helloworld.java +++ /dev/null @@ -1,34 +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 sample; - -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.QueryParam; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface Helloworld { - - @GET - @Path("sayHello") - String sayHello(@QueryParam("name")String name); - -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/src/main/java/sample/HelloworldImpl.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/src/main/java/sample/HelloworldImpl.java deleted file mode 100644 index d8bdadbfe5..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/src/main/java/sample/HelloworldImpl.java +++ /dev/null @@ -1,33 +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 sample; - - -//@Scope("COMPOSITE") @EagerInit -public class HelloworldImpl implements Helloworld { - - public String sayHello(String name) { - return "Hello " + name; - } - -// @Init - public void init() { - System.out.println(sayHello("world")); - } -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/src/main/resources/META-INF/helloworld-context.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/src/main/resources/META-INF/helloworld-context.xml deleted file mode 100644 index 2e3e34cc18..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/src/main/resources/META-INF/helloworld-context.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/src/main/resources/META-INF/helloworld.composite b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/src/main/resources/META-INF/helloworld.composite deleted file mode 100644 index 6d89d1ad71..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/src/main/resources/META-INF/helloworld.composite +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 2476201c93..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/src/test/java/sample/HelloworldTestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/src/test/java/sample/HelloworldTestCase.java deleted file mode 100644 index cf50eb4d54..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/helloworld-spring-web-contribution/src/test/java/sample/HelloworldTestCase.java +++ /dev/null @@ -1,71 +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 sample; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.net.URL; - -import org.apache.tuscany.sca.Node; -import org.apache.tuscany.sca.TuscanyRuntime; -import org.junit.Assert; -import org.junit.Test; -import org.oasisopen.sca.NoSuchServiceException; - -public class HelloworldTestCase { - - @Test - public void testSayHello() throws NoSuchServiceException, IOException { - - // Run the SCA composite in a Tuscany runtime - Node node = TuscanyRuntime.runComposite(null, "target/classes"); - try { - - // test that has exposed an HTTP endpoint that works as expected - URL url = new URL("http://localhost:8080/HelloworldComponent/Helloworld/foo/sayHello?name=Amelia"); - Assert.assertEquals("Hello Amelia", read(url.openStream())); - - url = new URL("http://localhost:8080/HelloworldComponent/Helloworld/sayHello?name=Amelia"); - Assert.assertEquals("\"Hello Amelia\"", read(url.openStream())); - - } finally { - // Stop the Tuscany runtime Node - node.stop(); - } - } - - private static String read(InputStream is) throws IOException { - BufferedReader reader = null; - try { - reader = new BufferedReader(new InputStreamReader(is)); - StringBuffer sb = new StringBuffer(); - String str; - while ((str = reader.readLine()) != null) { - sb.append(str); - } - return sb.toString(); - } finally { - if (reader != null) { - reader.close(); - } - } - } -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/using-tuscany.odt b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/using-tuscany.odt deleted file mode 100644 index 48b9a42e47..0000000000 Binary files a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/samples/using-tuscany.odt and /dev/null differ diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/commands.txt b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/commands.txt deleted file mode 100644 index b784087833..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/commands.txt +++ /dev/null @@ -1,227 +0,0 @@ -// Show the test bundle resolving against the Tuscany base repo - -java -jar bin/felix.jar - -obr:repos add file:///D:/sca-java-2.x/unreleased/testing/itest/bundle/target/repository.xml - -obr:list - -Apache Felix Bundle Repository (1.4.3, ...) -Apache Felix Configuration Admin Service (1.2.4, ...) -Apache Felix Declarative Services (1.6.0, ...) -Apache Felix EventAdmin (1.0.0) -Apache Felix File Install (3.0.2, ...) -Apache Felix Gogo Command (0.8.0, ...) -Apache Felix Gogo Runtime (0.8.0, ...) -Apache Felix Gogo Shell (0.8.0, ...) -Apache Felix Gogo Shell Commands (0.2.0) -Apache Felix Gogo Shell Console (0.2.0) -Apache Felix Gogo Shell Launcher (0.2.0) -Apache Felix Gogo Shell Runtime (0.2.0) -Apache Felix Http Api (2.0.4) -Apache Felix Http Base (2.0.4) -Apache Felix Http Bridge (2.0.4) -Apache Felix Http Bundle (2.0.4) -Apache Felix Http Jetty (2.0.4) -Apache Felix Http Proxy (2.0.4) -Apache Felix Http Samples - Filter (2.0.4) -Apache Felix Http Samples - Whiteboard (2.0.4) -Apache Felix HTTP Service Jetty (1.0.1, ...) -Apache Felix Http Whiteboard (2.0.4) -Apache Felix iPOJO (1.8.0, ...) -Apache Felix iPOJO (0.8.0) -Apache Felix iPOJO API (1.6.0, ...) -Apache Felix iPOJO Arch Command (1.6.0, ...) -Apache Felix iPOJO Composite (1.8.0, ...) -Apache Felix iPOJO Composite (1.0.0, ...) -Apache Felix iPOJO Event Admin Handler (1.6.0, ...) -Apache Felix iPOJO Extender Pattern Handler (1.4.0, ...) -Apache Felix iPOJO Extender Pattern Handler (1.0.0, ...) -Apache Felix iPOJO Gogo Command (1.0.1, ...) -Apache Felix iPOJO JMX Handler (1.4.0, ...) -Apache Felix iPOJO Temporal Service Dependency Handler (1.6.0, -Apache Felix iPOJO URL Handler (1.6.0, ...) -Apache Felix iPOJO WebConsole Plugins (1.6.0, ...) -Apache Felix iPOJO White Board Pattern Handler (1.2.0, ...) -Apache Felix iPOJO White Board Pattern Handler (1.4.0) -Apache Felix Log Service (1.0.0) -Apache Felix Metatype Service (1.0.2, ...) -Apache Felix Prefrences Service (1.0.2) -Apache Felix Remote Shell (1.0.4, ...) -Apache Felix Remote Shell (1.1.2, ...) -Apache Felix Shell Service (1.4.2, ...) -Apache Felix Shell TUI (1.4.1, ...) -Apache Felix UPnP Base Driver (0.8.0) -Apache Felix UPnP Extra (0.4.0) -Apache Felix UPnP Tester (0.4.0) -Apache Felix Web Console Event Plugin (1.0.2) -Apache Felix Web Console Memory Usage Plugin (1.0.0) -Apache Felix Web Console Memory Usage Plugin (1.0.2) -Apache Felix Web Console UPnP Plugin (1.0.0) -Apache Felix Web Management Console (3.1.2, ...) -Apache Felix Web Management Console (3.1.2, ...) -Apache Tuscany Java Interface for JAXWS (2.0.0) -Apache Tuscany Launcher (2.0.0) -Apache Tuscany Python Implementation Model (2.0.0) -Apache Tuscany SCA API (2.0.0) -Apache Tuscany SCA Assembly Model (2.0.0) -Apache Tuscany SCA Assembly Model XML Schemas (2.0.0) -Apache Tuscany SCA Atom Feed Binding Extension (2.0.0) -Apache Tuscany SCA BPEL Implementation Model (2.0.0) -Apache Tuscany SCA Client Impl (2.0.0) -Apache Tuscany SCA Comet Binding Model (2.0.0) -Apache Tuscany SCA Common HTTP (2.0.0) -Apache Tuscany SCA Common Java (2.0.0) -Apache Tuscany SCA Common XML (2.0.0) -Apache Tuscany SCA Contribution Model (2.0.0) -Apache Tuscany SCA CORBA Binding Extension (2.0.0) -Apache Tuscany SCA CORBA Host Extension Point (2.0.0) -Apache Tuscany SCA Core Runtime (2.0.0) -Apache Tuscany SCA Core SPI (2.0.0) -Apache Tuscany SCA Core/DataBinding Integration (2.0.0) -Apache Tuscany SCA Data API (2.0.0) -Apache Tuscany SCA Data Binding for JAXB (2.0.0) -Apache Tuscany SCA DataBinding Framework (2.0.0) -Apache Tuscany SCA Default Binding Model (2.0.0) -Apache Tuscany SCA Deployment (2.0.0) -Apache Tuscany SCA EJB Binding Model (2.0.0) -Apache Tuscany SCA Extensibility (2.0.0) -Apache Tuscany SCA HTTP Binding Model (2.0.0) -Apache Tuscany SCA HTTP Servlet Host Extension Point (2.0.0) -Apache Tuscany SCA Java Implementation Model (2.0.0) -Apache Tuscany SCA Java Implementation Model (2.0.0) -Apache Tuscany SCA Java Interface Model (2.0.0) -Apache Tuscany SCA JAX-RS Implementation Model (2.0.0) -Apache Tuscany SCA JAXWS RI based WS Binding Extension (2.0.0) -Apache Tuscany SCA JAXWS-based WS Binding Extension (2.0.0) -Apache Tuscany SCA Jetty Servlet Host Extension (2.0.0) -Apache Tuscany SCA JMS Binding Model (2.0.0) -Apache Tuscany SCA JSON-RPC Binding Model (2.0.0) -Apache Tuscany SCA JSONP Binding Model (2.0.0) -Apache Tuscany SCA Model Builders (2.0.0) -Apache Tuscany SCA Monitor (2.0.0) -Apache Tuscany SCA Node API (2.0.0) -Apache Tuscany SCA Node Implementation (2.0.0) -Apache Tuscany SCA REST Binding Model (2.0.0) -Apache Tuscany SCA RMI Binding Model (2.0.0) -Apache Tuscany SCA Script Implementation Model (2.0.0) -Apache Tuscany SCA Shell (2.0.0) -Apache Tuscany SCA Spring Implementation Model (2.0.0) -Apache Tuscany SCA Web Implementation Web Model (2.0.0) -Apache Tuscany SCA Web Implementation Web Runtime (2.0.0) -Apache Tuscany SCA Web Service binding WSDL Generator (2.0.0) -Apache Tuscany SCA Webapp Host (2.0.0) -Apache Tuscany SCA Widget Implementation Model (2.0.0) -Apache Tuscany SCA Wink (2.0.0) -Apache Tuscany SCA WS Binding Model (2.0.0) -Apache Tuscany SCA WSDL Interface Model (2.0.0) -Apache Tuscany SCA XML Assembly Model (2.0.0) -Apache Tuscany SCA XSD Model (2.0.0) -Apache Tuscany Security Policy Model (2.0.0) -asm.asm (3.1.0) -cglib.cglib (2.2.0) -jsr311-api (1.1.1) -OSGi OBR Service API (1.0.0) -OSGi R4 Compendium Bundle (4.0.0) -Servlet 2.1 API (1.0.0) -wsdl4j.wsdl4j (1.6.2) -XmlSchema (1.4.3) - -obr:repos list - -file:/D:/sca-java-2.x/unreleased/testing/itest/bundle/target/repository.xml -http://felix.apache.org/obr/releases.xml - - -//install file:///D:/sca-java-2.x/modules/sca-api/target/tuscany-sca-api-2.0-SNAPSHOT.jar -//start # - -install file:///D:/sca-java-2.x/unreleased/testing/itest/bundle/target/bundle-2.0-SNAPSHOT.jar -start # - - -// Create repository.xml for a maven resource or repository - -mvn org.apache.felix:maven-bundle-plugin:2.1.0:install-file -DpomFile=pom.xml -Dfile=target\bundle-2.0-SNAPSHOT.jar -mvn org.apache.felix:maven-bundle-plugin:2.1.0:install-file -DpomFile=pom.xml -Dfile=target\tuscany-sca-api-2.0-SNAPSHOT.jar - -mvn org.apache.felix:maven-bundle-plugin:2.1.0:index -DurlTemplate=maven -~/.m2/repository/repository.xml - - -// problems getting OBR to work - -g! obr:info "Apache Tuscany SCA API" ----------------------- -Apache Tuscany SCA API ----------------------- -id: org.apache.tuscany.sca.api/2.0.0 -symbolicname: org.apache.tuscany.sca.api -presentationname: Apache Tuscany SCA API -uri: file:/D:/sca-java-2.x/unreleased/testing/itest/bundle/target/../../../../.. -/distribution/all/target/modules/tuscany-sca-api-2.0-SNAPSHOT.jar -version: 2.0.0 -Requires: - (&(package=org.oasisopen.sca.annotation)(version>=2.0.0)) - (&(package=org.oasisopen.sca)(version>=2.0.0)) - (&(package=org.oasisopen.sca.client)(version>=2.0.0)) - (&(package=javax.security.auth)) -Capabilities: - {symbolicname=org.apache.tuscany.sca.api, presentationname=Apache Tuscany SCA - API, bundle-manifestversion=2, version=2.0.0} - {bundle-version=2.0.0, package=org.oasisopen.sca, bundle-symbolic-name=org.ap -ache.tuscany.sca.api, uses:=javax.security.auth, version=2.0.0} - {bundle-version=2.0.0, package=org.oasisopen.sca.annotation, bundle-symbolic- -name=org.apache.tuscany.sca.api, version=2.0.0} - {bundle-version=2.0.0, package=org.oasisopen.sca.client, bundle-symbolic-name -=org.apache.tuscany.sca.api, version=2.0.0} -g! lb -START LEVEL 1 - ID|State |Level|Name - 0|Active | 0|System Bundle (3.0.8) - 1|Active | 1|Apache Felix Bundle Repository (1.6.2) - 2|Active | 1|Apache Felix Gogo Command (0.8.0) - 3|Active | 1|Apache Felix Gogo Runtime (0.8.0) - 4|Active | 1|Apache Felix Gogo Shell (0.8.0) - 20|Installed | 1|Apache Tuscany SCA iTest Bundle (2.0.0.SNAPSHOT) -g! start 20 -org.osgi.framework.BundleException: Unresolved constraint in bundle org.apache.t -uscany.sca.bundle [20]: Unable to resolve 20.0: missing requirement [20.0] packa -ge; (&(package=org.oasisopen.sca.annotation)(version>=2.0.0)) -g! - - -g! obr:deploy "Apache Tuscany SCA API" -Target resource(s): -------------------- - Apache Tuscany SCA API (2.0.0) - -Deploying...done. -g! lb -START LEVEL 1 - ID|State |Level|Name - 0|Active | 0|System Bundle (3.0.8) - 1|Active | 1|Apache Felix Bundle Repository (1.6.2) - 2|Active | 1|Apache Felix Gogo Command (0.8.0) - 3|Active | 1|Apache Felix Gogo Runtime (0.8.0) - 4|Active | 1|Apache Felix Gogo Shell (0.8.0) - 20|Installed | 1|Apache Tuscany SCA iTest Bundle (2.0.0.SNAPSHOT) - 21|Installed | 1|Apache Tuscany SCA API (2.0.0) -g! start 21 -g! lb -START LEVEL 1 - ID|State |Level|Name - 0|Active | 0|System Bundle (3.0.8) - 1|Active | 1|Apache Felix Bundle Repository (1.6.2) - 2|Active | 1|Apache Felix Gogo Command (0.8.0) - 3|Active | 1|Apache Felix Gogo Runtime (0.8.0) - 4|Active | 1|Apache Felix Gogo Shell (0.8.0) - 20|Installed | 1|Apache Tuscany SCA iTest Bundle (2.0.0.SNAPSHOT) - 21|Active | 1|Apache Tuscany SCA API (2.0.0) -g! start 20 -14-Mar-2011 14:31:45 sample.impl.SampleActivator start -INFO: Starting org.apache.tuscany.sca.bundle [20] -14-Mar-2011 14:31:45 sample.impl.SampleActivator start -INFO: Hello Fred Bloggs->null - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/pom.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/pom.xml deleted file mode 100644 index 8d9caa6c3a..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/pom.xml +++ /dev/null @@ -1,265 +0,0 @@ - - - - 4.0.0 - - - org.apache.tuscany.sca - tuscany-itest - 2.0-Beta4 - - - bundle - Apache Tuscany SCA iTest Bundle - bundle - - - 2.0-Beta4 - - - - - - org.eclipse - osgi - 3.5.0-v20090520 - compile - - - - org.apache.tuscany.sca - tuscany-sca-api - 2.0-Beta4 - compile - - - - org.apache.aries.application - org.apache.aries.application.api - 0.4-SNAPSHOT - compile - - - - org.apache.aries.application - org.apache.aries.application.management - 0.4-SNAPSHOT - compile - - - - org.apache.aries.application - org.apache.aries.application.modeller - 0.4-SNAPSHOT - compile - - - - org.apache.aries.application - org.apache.aries.application.resolver.obr - 0.4-SNAPSHOT - compile - - - - - - - - org.ops4j.pax.exam - pax-exam - 1.2.4 - test - - - - org.ops4j.pax.exam - pax-exam-junit - 1.2.4 - test - - - - org.ops4j.pax.exam - pax-exam-container-default - 1.2.4 - test - - - - org.ops4j.pax.logging - pax-logging-api - 1.6.1 - test - - - - org.ops4j.pax.logging - pax-logging-service - 1.6.1 - test - - - - org.ops4j.pax.url - pax-url-mvn - 1.2.4 - test - - - - - - org.apache.felix - org.apache.felix.bundlerepository - 1.6.2 - test - - - - - - org.apache.aries - org.apache.aries.util - 0.4-SNAPSHOT - test - - - - org.apache.aries.blueprint - org.apache.aries.blueprint - 0.4-SNAPSHOT - test - - - - org.apache.aries.proxy - org.apache.aries.proxy - 0.4-SNAPSHOT - test - - - - org.apache.aries.application - org.apache.aries.application.runtime - 0.4-SNAPSHOT - test - - - - org.apache.aries.application - org.apache.aries.application.default.local.platform - 0.4-SNAPSHOT - test - - - - org.apache.aries.application - org.apache.aries.application.runtime.itest.interfaces - 0.4-SNAPSHOT - test - - - - asm - asm-all - 3.3.1 - test - - - - org.osgi - org.osgi.compendium - 4.2.0 - test - - - - org.osgi - org.osgi.core - 4.2.0 - test - - - - - - - - org.apache.felix - maven-bundle-plugin - true - - - - - sample - sample.impl - sample.impl.SampleActivator - - - - - org.apache.servicemix.tooling - depends-maven-plugin - 1.2 - - - generate-depends-file - - generate-depends-file - - - ${project.build.directory}/test-classes/META-INF/maven/dependencies.properties - - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/java/sample/Helloworld.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/java/sample/Helloworld.java deleted file mode 100644 index f4e8c50448..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/java/sample/Helloworld.java +++ /dev/null @@ -1,28 +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 sample; - -import org.oasisopen.sca.annotation.Remotable; - -@Remotable -public interface Helloworld { - - String sayHello(String name); - -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/java/sample/impl/HelloworldImpl.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/java/sample/impl/HelloworldImpl.java deleted file mode 100644 index 0e6d3cb1c7..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/java/sample/impl/HelloworldImpl.java +++ /dev/null @@ -1,43 +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 sample.impl; - -import org.oasisopen.sca.annotation.Property; -import org.oasisopen.sca.annotation.Reference; - -import sample.Helloworld; - -public class HelloworldImpl implements Helloworld { - - @Reference(required=false) - protected Helloworld hwRef; - - @Property - protected String componentName; - - public String sayHello(String name) { - String returnString = "Hello " + name + "->" + componentName; - if (hwRef != null){ - return hwRef.sayHello(returnString); - } else { - return returnString; - } - } - -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/java/sample/impl/SampleActivator.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/java/sample/impl/SampleActivator.java deleted file mode 100644 index 4838b534db..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/java/sample/impl/SampleActivator.java +++ /dev/null @@ -1,45 +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 sample.impl; - -import java.util.logging.Logger; - -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; - -import sample.Helloworld; - -public class SampleActivator implements BundleActivator { - private Logger logger = Logger.getLogger(SampleActivator.class.getName()); - - - public void start(BundleContext context) throws Exception { - logger.info("Starting " + context.getBundle()); - - Helloworld hw = new HelloworldImpl(); - logger.info(hw.sayHello("Fred Bloggs")); - } - - public void stop(BundleContext context) throws Exception { - logger.info("Stopping " + context.getBundle()); - // Registered services will be automatically unregistered - } - -} diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/resources/META-INF/sca-contribution.xml deleted file mode 100644 index 95c32fb5bf..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/resources/META-INF/sca-contribution.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor deleted file mode 100644 index e3f31ae8d7..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor +++ /dev/null @@ -1,20 +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. - -sample.ImplementationGenericPolicyProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.1#implementationGenericPolicy,model=sample.ImplementationGenericPolicy -sample.InteractionGenericPolicyProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.1#interactionGenericPolicy,model=sample.InteractionGenericPolicy -sample.InteractionBindingWSPolicyProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.1#interactionBindingWSPolicy,model=sample.InteractionBindingWSPolicy \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions deleted file mode 100644 index f362b64a1f..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/resources/META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions +++ /dev/null @@ -1,17 +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. -definitions.xml diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory deleted file mode 100644 index cbfb70c346..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory +++ /dev/null @@ -1,18 +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. - -sample.InteractionBindingWSPolicyProviderFactory;model=sample.InteractionBindingWSPolicy \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/resources/definitions.xml b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/resources/definitions.xml deleted file mode 100644 index f37fde76ab..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/resources/definitions.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - An intent that targets policy interceptors at the implementation - - - - - - An intent that targets policy interceptors at the binding generically - - - - - - An intent that targets policy interceptors at binding.ws - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/resources/helloworld.composite b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/resources/helloworld.composite deleted file mode 100644 index 47488f8bbd..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/main/resources/helloworld.composite +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/test/java/sample/HelloworldTestCase.java b/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/test/java/sample/HelloworldTestCase.java deleted file mode 100644 index 4c3f0271fa..0000000000 --- a/sca-java-2.x/tags/2.0-Beta4-RC0/unreleased/testing/itest/bundle/src/test/java/sample/HelloworldTestCase.java +++ /dev/null @@ -1,216 +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 sample; - -import static org.junit.Assert.assertEquals; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileOutputStream; -import java.io.FileReader; -import java.util.HashSet; -import java.util.Set; - -import static org.ops4j.pax.exam.CoreOptions.equinox; -import static org.ops4j.pax.exam.CoreOptions.options; -import static org.ops4j.pax.exam.CoreOptions.systemProperty; - -import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.workingDirectory; - -import org.apache.aries.application.filesystem.IDirectory; -import org.apache.aries.application.management.spi.repository.RepositoryGenerator; -import org.apache.aries.application.modelling.ModelledResourceManager; -import org.apache.aries.application.modelling.ModelledResource; -import org.apache.aries.application.utils.filesystem.FileSystem; - -import org.apache.felix.bundlerepository.Repository; -import org.apache.felix.bundlerepository.RepositoryAdmin; - -import org.junit.Test; -import org.junit.runner.RunWith; - -import org.ops4j.pax.exam.CoreOptions; -import org.ops4j.pax.exam.Inject; -import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.container.def.options.WorkingDirectoryOption; -import org.ops4j.pax.exam.junit.Configuration; -import org.ops4j.pax.exam.junit.JUnit4TestRunner; -import org.ops4j.pax.exam.options.MavenArtifactProvisionOption; - -import org.osgi.framework.BundleContext; -import org.osgi.framework.Constants; -import org.osgi.framework.Filter; -import org.osgi.framework.FrameworkUtil; -import org.osgi.util.tracker.ServiceTracker; - -/* For debugging, uncomment the next two lines and add these imports: - */ -import static org.ops4j.pax.exam.CoreOptions.waitForFrameworkStartup; -import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption; - - -/** - * Note that much of the technical detail/instruction comes from... - * - * http://svn.apache.org/repos/asf/aries/trunk/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverTest.java - * - */ - -@RunWith( JUnit4TestRunner.class ) -public class HelloworldTestCase { - - public static final long DEFAULT_TIMEOUT = 30000; - - @Inject - protected BundleContext bundleContext; - - @Configuration - public static Option[] configuration() { - Option[] options = options( - mavenBundle("org.ops4j.pax.logging", "pax-logging-api"), - mavenBundle("org.ops4j.pax.logging", "pax-logging-service"), - systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"), - -// mavenBundle("org.apache.felix", "org.apache.felix.configadmin"), - mavenBundle("org.ops4j.pax.url", "pax-url-mvn"), - - mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint"), - mavenBundle("asm", "asm-all"), - mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"), - mavenBundle("org.apache.aries", "org.apache.aries.util"), - - mavenBundle("org.apache.aries.application", "org.apache.aries.application.api"), - mavenBundle("org.apache.aries.application", "org.apache.aries.application.utils"), - mavenBundle("org.apache.aries.application", "org.apache.aries.application.modeller"), - mavenBundle("org.apache.aries.application", "org.apache.aries.application.default.local.platform"), - mavenBundle("org.apache.felix", "org.apache.felix.bundlerepository"), - mavenBundle("org.apache.aries.application", "org.apache.aries.application.resolver.obr"), - mavenBundle("org.apache.aries.application", "org.apache.aries.application.deployment.management"), - mavenBundle("org.apache.aries.application", "org.apache.aries.application.management"), - mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime"), - mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime.itest.interfaces"), - mavenBundle("org.osgi", "org.osgi.compendium"), - mavenBundle("org.apache.aries.testsupport", "org.apache.aries.testsupport.unit"), - - mavenBundle("org.apache.tuscany.sca", "tuscany-sca-api"), - - mavenBundle("org.apache.tuscany.sca", "bundle"), - - /* For debugging, uncomment the next two lines - vmOption("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=7777"), - waitForFrameworkStartup(), - */ - - workingDirectory("D://sca-java-2.x//unreleased//testing//itest//bundle//target"), - - equinox().version("3.5.0")); - - return options; - } - - @Test - public void testSayHello() { - System.out.println("testSayHello - start"); - System.out.println("test dir = " + System.getProperty("user.dir")); - System.out.println("current dir = " + this.getClass().getProtectionDomain().getCodeSource().getLocation()); - - // get the OBR repository admin service - RepositoryAdmin respositoryAdminService = getOsgiService(RepositoryAdmin.class); - - // print currently registered repos - Repository[] repos = respositoryAdminService.listRepositories(); - System.out.println("initial repos"); - for (Repository repo : repos) { - System.out.println("Repo >>> " + repo.getName()); - } - - // get the repository generator service - System.out.println("get RepositoryGenerator service ="); - RepositoryGenerator repositoryGenerator = getOsgiService(RepositoryGenerator.class); - System.out.println(repositoryGenerator); - - System.out.println("get ModelledResourceManager service ="); - ModelledResourceManager modelledResourceManager = getOsgiService(ModelledResourceManager.class); - System.out.println(modelledResourceManager); - - Set mrs = new HashSet(); - - try { - // create mrs based on base runtime - populateMRS(modelledResourceManager, - mrs, - "../../../../../distribution/all/target/features/tuscany-base-runtime-pom/which-jars", - "../../../../../distribution/all/target/modules"); - //File outFile = new File("D://sca-java-2.x//unreleased//testing//itest//bundle//target//myrepository.xml"); - //File outFile = new File(".//target//myrepository.xml"); - //FileOutputStream fout = new FileOutputStream(outFile); - FileOutputStream fout = new FileOutputStream("repository.xml"); - repositoryGenerator.generateRepository("Test repo description", mrs, fout); - fout.close(); - - } catch(Exception ex) { - ex.printStackTrace(); - } - - System.out.println("testSayHello - end"); - } - - private void populateMRS(ModelledResourceManager modelledResourceManager, - Set mrs, - String whichJars, - String modules){ - try { - BufferedReader in = new BufferedReader(new FileReader(whichJars)); - String line; - while ((line = in.readLine()) != null) { - if (line.endsWith(".jar")){ - int dirSeparatorIndex = line.indexOf("/"); - if (dirSeparatorIndex > 0){ - line = line.substring(0, dirSeparatorIndex); - } - System.out.println("Processing - " + line); - File bundleFile = new File(modules + "\\" + line); - IDirectory jarDir = FileSystem.getFSRoot(bundleFile); - mrs.add(modelledResourceManager.getModelledResource(bundleFile.toURI().toString(), jarDir)); - } - } - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - private T getOsgiService(Class type) { - try { - String filterString = "(" + Constants.OBJECTCLASS + "=" + type.getName() + ")"; - Filter osgiFilter = FrameworkUtil.createFilter(filterString); - ServiceTracker tracker = new ServiceTracker(bundleContext, osgiFilter, null); - tracker.open(); - Object tmp = tracker.waitForService(DEFAULT_TIMEOUT); - return type.cast(tmp); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - private static MavenArtifactProvisionOption mavenBundle(String groupId, String artifactId) { - return CoreOptions.mavenBundle().groupId(groupId).artifactId(artifactId).versionAsInProject(); - } -} - - -- cgit v1.2.3