From 2f187c12e2ceceb61ca2745463fcd7fbbb438b72 Mon Sep 17 00:00:00 2001 From: antelder Date: Thu, 16 Feb 2012 15:39:43 +0000 Subject: Rename beta3 tag to final name git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1245035 13f79535-47bb-0310-9956-ffa450edef68 --- .../2.0-Beta3-RC2/maven/archetypes/binding/pom.xml | 54 +++++ .../META-INF/maven/archetype-metadata.xml | 61 +++++ .../archetype-resources/META-INF/MANIFEST.MF | 17 ++ .../src/main/resources/archetype-resources/pom.xml | 94 ++++++++ .../src/main/java/__bindingName__Binding.java | 52 +++++ .../main/java/__bindingName__BindingFactory.java | 35 +++ .../__bindingName__BindingProviderFactory.java | 50 ++++ .../__bindingName__ReferenceBindingProvider.java | 58 +++++ .../runtime/__bindingName__ReferenceInvoker.java | 56 +++++ .../__bindingName__ServiceBindingProvider.java | 60 +++++ .../runtime/__bindingName__ServiceInvoker.java | 43 ++++ .../main/java/runtime/__bindingName__Stash.java | 47 ++++ .../__package__.__bindingName__BindingFactory | 20 ++ ...ca.contribution.processor.StAXArtifactProcessor | 20 ++ ...any.sca.contribution.processor.ValidationSchema | 19 ++ ...che.tuscany.sca.provider.BindingProviderFactory | 20 ++ .../src/main/resources/binding-__artifactId__.xsd | 37 +++ .../src/test/java/helloworld/HelloWorldClient.java | 36 +++ .../src/test/java/helloworld/HelloWorldImpl.java | 31 +++ .../test/java/helloworld/HelloWorldService.java | 31 +++ .../java/test/__bindingName__BindingTestCase.java | 55 +++++ .../src/test/resources/helloworld.composite | 39 ++++ .../resources/projects/basic/archetype.properties | 23 ++ .../src/test/resources/projects/basic/goal.txt | 0 .../contribution-jar/META-INF/MANIFEST.MF | 11 + .../maven/archetypes/contribution-jar/pom.xml | 51 +++++ .../META-INF/maven/archetype-metadata.xml | 49 ++++ .../main/resources/META-INF/maven/archetype.xml | 22 ++ .../src/main/resources/archetype-resources/pom.xml | 87 +++++++ .../src/main/java/Helloworld.java | 28 +++ .../src/main/java/HelloworldImpl.java | 36 +++ .../main/resources/META-INF/sca-contribution.xml | 25 ++ .../src/main/resources/helloworld.composite | 29 +++ .../src/test/java/HelloworldTestCase.java | 48 ++++ .../archetypes/contribution-zip-discriptor/pom.xml | 33 +++ .../assemblies/tuscany-zip-contribution.xml | 40 ++++ .../contribution-zip/META-INF/MANIFEST.MF | 11 + .../maven/archetypes/contribution-zip/pom.xml | 51 +++++ .../META-INF/maven/archetype-metadata.xml | 36 +++ .../main/resources/META-INF/maven/archetype.xml | 30 +++ .../src/main/resources/archetype-resources/pom.xml | 153 +++++++++++++ .../archetype-resources/src/main/java/AddImpl.java | 38 ++++ .../src/main/java/AddService.java | 25 ++ .../main/resources/META-INF/sca-contribution.xml | 23 ++ .../src/main/resources/add.composite | 29 +++ .../maven/archetypes/implementation/pom.xml | 54 +++++ .../META-INF/maven/archetype-metadata.xml | 61 +++++ .../archetype-resources/META-INF/MANIFEST.MF | 17 ++ .../src/main/resources/archetype-resources/pom.xml | 59 +++++ .../java/__implementationName__Implementation.java | 52 +++++ ..._implementationName__ImplementationFactory.java | 35 +++ ...implementationName__BindingProviderFactory.java | 50 ++++ ...plementationName__ReferenceBindingProvider.java | 58 +++++ .../__implementationName__ReferenceInvoker.java | 56 +++++ ...implementationName__ServiceBindingProvider.java | 60 +++++ .../__implementationName__ServiceInvoker.java | 43 ++++ .../java/runtime/__implementationName__Stash.java | 47 ++++ .../__package__.__bindingName__BindingFactory | 20 ++ ...ca.contribution.processor.StAXArtifactProcessor | 20 ++ ...any.sca.contribution.processor.ValidationSchema | 19 ++ ...che.tuscany.sca.provider.BindingProviderFactory | 20 ++ .../resources/implementation-__artifactId__.xsd | 37 +++ .../src/test/java/helloworld/HelloWorldClient.java | 36 +++ .../src/test/java/helloworld/HelloWorldImpl.java | 31 +++ .../test/java/helloworld/HelloWorldService.java | 31 +++ .../java/test/__bindingName__BindingTestCase.java | 55 +++++ .../src/test/resources/helloworld.composite | 39 ++++ .../resources/projects/basic/archetype.properties | 23 ++ .../src/test/resources/projects/basic/goal.txt | 0 .../tags/2.0-Beta3-RC2/maven/archetypes/pom.xml | 52 +++++ .../quickstart-bpel/META-INF/MANIFEST.MF | 11 + .../maven/archetypes/quickstart-bpel/pom.xml | 51 +++++ .../META-INF/maven/archetype-metadata.xml | 43 ++++ .../main/resources/META-INF/maven/archetype.xml | 33 +++ .../src/main/resources/archetype-resources/pom.xml | 182 +++++++++++++++ .../src/main/java/HelloworldService.java | 28 +++ .../src/main/resources/helloworld.bpel | 66 ++++++ .../src/main/resources/helloworld.wsdl | 82 +++++++ .../src/main/webapp/WEB-INF/web.composite | 37 +++ .../src/main/webapp/WEB-INF/web.xml | 41 ++++ .../archetype-resources/src/main/webapp/hello.jsp | 36 +++ .../maven/archetypes/quickstart-jsf/pom.xml | 51 +++++ .../META-INF/maven/archetype-metadata.xml | 44 ++++ .../main/resources/META-INF/maven/archetype.xml | 38 ++++ .../src/main/resources/archetype-resources/pom.xml | 154 +++++++++++++ .../main/java/myfaces/HelloWorldController.java | 64 ++++++ .../src/main/java/sca/HelloworldService.java | 28 +++ .../src/main/java/sca/HelloworldServiceImpl.java | 30 +++ .../src/main/webapp/WEB-INF/faces-config.xml | 53 +++++ .../src/main/webapp/WEB-INF/web.composite | 35 +++ .../src/main/webapp/WEB-INF/web.xml | 230 +++++++++++++++++++ .../src/main/webapp/helloWorld.jsp | 37 +++ .../archetype-resources/src/main/webapp/index.jsp | 22 ++ .../archetype-resources/src/main/webapp/page2.jsp | 35 +++ .../quickstart-jsonp/META-INF/MANIFEST.MF | 11 + .../maven/archetypes/quickstart-jsonp/pom.xml | 51 +++++ .../META-INF/maven/archetype-metadata.xml | 42 ++++ .../main/resources/META-INF/maven/archetype.xml | 31 +++ .../src/main/resources/archetype-resources/pom.xml | 154 +++++++++++++ .../src/main/java/HelloworldImpl.java | 27 +++ .../src/main/java/HelloworldService.java | 28 +++ .../src/main/webapp/WEB-INF/web.composite | 32 +++ .../src/main/webapp/WEB-INF/web.xml | 43 ++++ .../archetype-resources/src/main/webapp/hello.jsp | 36 +++ .../quickstart-stripes/META-INF/MANIFEST.MF | 11 + .../maven/archetypes/quickstart-stripes/pom.xml | 51 +++++ .../META-INF/maven/archetype-metadata.xml | 44 ++++ .../main/resources/META-INF/maven/archetype.xml | 38 ++++ .../src/main/resources/archetype-resources/pom.xml | 124 ++++++++++ .../src/main/java/sca/HelloworldService.java | 28 +++ .../src/main/java/sca/HelloworldServiceImpl.java | 31 +++ .../main/java/stripes/action/BaseActionBean.java | 36 +++ .../main/java/stripes/action/HomeActionBean.java | 48 ++++ .../src/main/resources/StripesResources.properties | 77 +++++++ .../src/main/resources/log4j.properties | 51 +++++ .../src/main/webapp/WEB-INF/jsp/home.jsp | 29 +++ .../src/main/webapp/WEB-INF/jsp/layout.jsp | 42 ++++ .../src/main/webapp/WEB-INF/jsp/taglibs.jsp | 32 +++ .../src/main/webapp/WEB-INF/web.composite | 34 +++ .../src/main/webapp/WEB-INF/web.xml | 68 ++++++ .../archetype-resources/src/main/webapp/index.html | 27 +++ .../archetypes/quickstart/META-INF/MANIFEST.MF | 11 + .../maven/archetypes/quickstart/pom.xml | 51 +++++ .../META-INF/maven/archetype-metadata.xml | 42 ++++ .../main/resources/META-INF/maven/archetype.xml | 31 +++ .../src/main/resources/archetype-resources/pom.xml | 139 ++++++++++++ .../src/main/java/HelloworldImpl.java | 27 +++ .../src/main/java/HelloworldService.java | 25 ++ .../src/main/webapp/WEB-INF/web.composite | 34 +++ .../src/main/webapp/WEB-INF/web.xml | 43 ++++ .../archetype-resources/src/main/webapp/hello.jsp | 36 +++ .../maven/tuscany-maven-plugin/LICENSE | 205 +++++++++++++++++ .../maven/tuscany-maven-plugin/NOTICE | 6 + .../maven/tuscany-maven-plugin/README | 21 ++ .../maven/tuscany-maven-plugin/pom.xml | 109 +++++++++ .../tuscany/maven/plugin/TuscanyRunMojo.java | 251 +++++++++++++++++++++ .../tuscany/maven/plugin/TuscanyShellMojo.java | 76 +++++++ .../tuscany/maven/plugin/TuscanyStartMojo.java | 194 ++++++++++++++++ .../tuscany/maven/plugin/TuscanyStopMojo.java | 59 +++++ 139 files changed, 6805 insertions(+) create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/pom.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/META-INF/maven/archetype-metadata.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/META-INF/MANIFEST.MF create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/pom.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/__bindingName__Binding.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/__bindingName__BindingFactory.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__BindingProviderFactory.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ReferenceBindingProvider.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ReferenceInvoker.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ServiceBindingProvider.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ServiceInvoker.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__Stash.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/__package__.__bindingName__BindingFactory create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/binding-__artifactId__.xsd create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldClient.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldImpl.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldService.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/test/__bindingName__BindingTestCase.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/resources/helloworld.composite create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/test/resources/projects/basic/archetype.properties create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/test/resources/projects/basic/goal.txt create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/META-INF/MANIFEST.MF create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/pom.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype-metadata.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/Helloworld.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/META-INF/sca-contribution.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/helloworld.composite create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/test/java/HelloworldTestCase.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip-discriptor/pom.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip-discriptor/src/main/resources/assemblies/tuscany-zip-contribution.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/META-INF/MANIFEST.MF create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/pom.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/META-INF/maven/archetype-metadata.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/META-INF/maven/archetype.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/pom.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/java/AddImpl.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/java/AddService.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/resources/META-INF/sca-contribution.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/resources/add.composite create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/pom.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/META-INF/maven/archetype-metadata.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/META-INF/MANIFEST.MF create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/pom.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/__implementationName__Implementation.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/__implementationName__ImplementationFactory.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__BindingProviderFactory.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ReferenceBindingProvider.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ReferenceInvoker.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ServiceBindingProvider.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ServiceInvoker.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__Stash.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/__package__.__bindingName__BindingFactory create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/implementation-__artifactId__.xsd create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldClient.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldImpl.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldService.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/test/__bindingName__BindingTestCase.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/resources/helloworld.composite create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/test/resources/projects/basic/archetype.properties create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/test/resources/projects/basic/goal.txt create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/pom.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/META-INF/MANIFEST.MF create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/pom.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/META-INF/maven/archetype-metadata.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/META-INF/maven/archetype.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/pom.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/java/HelloworldService.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/resources/helloworld.bpel create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/resources/helloworld.wsdl create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/webapp/hello.jsp create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/pom.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype-metadata.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/pom.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/myfaces/HelloWorldController.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldService.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldServiceImpl.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/helloWorld.jsp create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/index.jsp create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/page2.jsp create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/META-INF/MANIFEST.MF create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/pom.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/META-INF/maven/archetype-metadata.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/META-INF/maven/archetype.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/pom.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/java/HelloworldService.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/webapp/hello.jsp create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/META-INF/MANIFEST.MF create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/pom.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/META-INF/maven/archetype-metadata.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/META-INF/maven/archetype.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/pom.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/sca/HelloworldService.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/sca/HelloworldServiceImpl.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/stripes/action/BaseActionBean.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/stripes/action/HomeActionBean.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/resources/StripesResources.properties create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/resources/log4j.properties create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jsp/home.jsp create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jsp/layout.jsp create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jsp/taglibs.jsp create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/index.html create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/META-INF/MANIFEST.MF create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/pom.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/META-INF/maven/archetype.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldService.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/hello.jsp create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/LICENSE create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/NOTICE create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/README create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/pom.xml create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyShellMojo.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyStartMojo.java create mode 100644 sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyStopMojo.java (limited to 'sca-java-2.x/tags/2.0-Beta3-RC2/maven') diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/pom.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/pom.xml new file mode 100644 index 0000000000..cb125fff4a --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/pom.xml @@ -0,0 +1,54 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0-Beta3 + ../../../pom.xml + + + tuscany-binding-archetype + maven-archetype + Create a Tuscany binding extension project + Create a Tuscany binding extension project + + + + + org.apache.maven.archetype + archetype-packaging + 2.0-alpha-5 + + + + + + + maven-archetype-plugin + 2.0-alpha-5 + true + + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/META-INF/maven/archetype-metadata.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000000..403803551b --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + src/main/java + + **/*.java + + + + src/main/resources + + **/*.* + + + + src/test/java + + **/*.java + + + + src/test/resources + + **/*.* + + + + META-INF + + MANIFEST.MF + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/META-INF/MANIFEST.MF b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..2985b8c822 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/META-INF/MANIFEST.MF @@ -0,0 +1,17 @@ +Manifest-Version: 1.0 +SCA-Version: 1.1 +Bundle-Name: Apache Tuscany SCA ${bindingName} Binding +Bundle-Vendor: The Apache Software Foundation +Bundle-Version: 2.0.0 +Bundle-ManifestVersion: 2 +Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt +Bundle-Description: Apache Tuscany SCA ${bindingName} Binding +Import-Package: org.apache.tuscany.sca.assembly;version="2.0.0", + org.apache.tuscany.sca.core;version="2.0.0", + org.apache.tuscany.sca.interfacedef;version="2.0.0", + org.apache.tuscany.sca.invocation;version="2.0.0", + org.apache.tuscany.sca.provider;version="2.0.0", + org.apache.tuscany.sca.runtime;version="2.0.0" +Bundle-SymbolicName: org.apache.tuscany.sca.binding.${artifactId} +Bundle-DocURL: http://www.apache.org/ +Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6 diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/pom.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000000..a3318b83f5 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,94 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-modules + 2.0-Beta3 + ../pom.xml + + + binding-${artifactId} + ${groupId} + ${version} + Apache Tuscany SCA ${bindingName} Binding Extension + + + + + org.apache.tuscany.sca + tuscany-assembly-xml + 2.0-Beta3 + provided + + + + org.apache.tuscany.sca + tuscany-host-http + 2.0-Beta3 + provided + + + + javax.servlet + servlet-api + 2.5 + provided + + + + org.apache.tuscany.sca + tuscany-host-jetty + 2.0-Beta3 + test + + + + org.apache.tuscany.sca + tuscany-node-impl + 2.0-Beta3 + test + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 2.0-Beta3 + test + + + + org.apache.tuscany.sca + tuscany-sca-api + 2.0-Beta3 + test + + + + junit + junit + 4.8.1 + test + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/__bindingName__Binding.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/__bindingName__Binding.java new file mode 100644 index 0000000000..d9cbdb954d --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/__bindingName__Binding.java @@ -0,0 +1,52 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 ${package}; + +import javax.xml.namespace.QName; + +import org.apache.tuscany.sca.provider.BaseBindingImpl; + +/** + * Represents a binding to a ${bindingName} service. + */ +public class ${bindingName}Binding extends BaseBindingImpl { + + public static final QName TYPE = new QName(SCA11_TUSCANY_NS, "binding.${artifactId}"); + + private String someAttr; + + public ${bindingName}Binding() { + } + + public QName getType() { + return TYPE; + } + + public String getSomeAttr() { + return someAttr; + } + + public void setSomeAttr(String someAttr) { + this.someAttr = someAttr; + } + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/__bindingName__BindingFactory.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/__bindingName__BindingFactory.java new file mode 100644 index 0000000000..ae1cd88745 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/__bindingName__BindingFactory.java @@ -0,0 +1,35 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 ${package}; + + +/** + * Factory implementation to create ${bindingName} Models + */ +public class ${bindingName}BindingFactory { + + public ${bindingName}Binding create${bindingName}Binding() { + return new ${bindingName}Binding(); + } + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__BindingProviderFactory.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__BindingProviderFactory.java new file mode 100644 index 0000000000..93c6bf3c04 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__BindingProviderFactory.java @@ -0,0 +1,50 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 ${package}.runtime; + +import ${package}.${bindingName}Binding; +import org.apache.tuscany.sca.core.ExtensionPointRegistry; +import org.apache.tuscany.sca.provider.BindingProviderFactory; +import org.apache.tuscany.sca.provider.ReferenceBindingProvider; +import org.apache.tuscany.sca.provider.ServiceBindingProvider; +import org.apache.tuscany.sca.runtime.RuntimeEndpoint; +import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; + +public class ${bindingName}BindingProviderFactory implements BindingProviderFactory<${bindingName}Binding> { + + public ${bindingName}BindingProviderFactory(ExtensionPointRegistry extensionPoints) { + } + + public Class<${bindingName}Binding> getModelType() { + return ${bindingName}Binding.class; + } + + public ReferenceBindingProvider createReferenceBindingProvider(RuntimeEndpointReference endpoint) { + return new ${bindingName}ReferenceBindingProvider(endpoint); + } + + public ServiceBindingProvider createServiceBindingProvider(RuntimeEndpoint endpoint) { + return new ${bindingName}ServiceBindingProvider(endpoint); + } + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ReferenceBindingProvider.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ReferenceBindingProvider.java new file mode 100644 index 0000000000..dc2991014e --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ReferenceBindingProvider.java @@ -0,0 +1,58 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 ${package}.runtime; + +import org.apache.tuscany.sca.assembly.EndpointReference; +import org.apache.tuscany.sca.interfacedef.InterfaceContract; +import org.apache.tuscany.sca.interfacedef.Operation; +import org.apache.tuscany.sca.invocation.Invoker; +import org.apache.tuscany.sca.provider.ReferenceBindingProvider; + +public class ${bindingName}ReferenceBindingProvider implements ReferenceBindingProvider { + + private EndpointReference endpoint; + private InterfaceContract contract; + + public ${bindingName}ReferenceBindingProvider(EndpointReference endpoint) { + this.endpoint = endpoint; + } + + public Invoker createInvoker(Operation operation) { + return new ${bindingName}ReferenceInvoker(operation, endpoint); + } + + public void start() { + } + + public void stop() { + } + + public InterfaceContract getBindingInterfaceContract() { + return contract; + } + + public boolean supportsOneWayInvocation() { + return false; + } + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ReferenceInvoker.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ReferenceInvoker.java new file mode 100644 index 0000000000..d3e2bd1812 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ReferenceInvoker.java @@ -0,0 +1,56 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 ${package}.runtime; + +import org.apache.tuscany.sca.assembly.EndpointReference; +import org.apache.tuscany.sca.interfacedef.Operation; +import org.apache.tuscany.sca.invocation.Invoker; +import org.apache.tuscany.sca.invocation.Message; + +public class ${bindingName}ReferenceInvoker implements Invoker { + + protected Operation operation; + protected EndpointReference endpoint; + + public ${bindingName}ReferenceInvoker(Operation operation, EndpointReference endpoint) { + this.operation = operation; + this.endpoint = endpoint; + } + + public Message invoke(Message msg) { + try { + + return doInvoke(msg); + + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + public Message doInvoke(Message msg) { + // Add some code here to make an invocation over the ${bindingName} binding protocol + // For this sample we'll just get it from the static stash + ${bindingName}ServiceInvoker fi = ${bindingName}Stash.getService(endpoint.getBinding().getURI()); + return fi.invokeService(msg); + } +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ServiceBindingProvider.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ServiceBindingProvider.java new file mode 100644 index 0000000000..59d41091d8 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ServiceBindingProvider.java @@ -0,0 +1,60 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 ${package}.runtime; + +import ${package}.${bindingName}Binding; +import org.apache.tuscany.sca.interfacedef.InterfaceContract; +import org.apache.tuscany.sca.provider.ServiceBindingProvider; +import org.apache.tuscany.sca.runtime.RuntimeEndpoint; + +public class ${bindingName}ServiceBindingProvider implements ServiceBindingProvider { + + private RuntimeEndpoint endpoint; + private InterfaceContract contract; + + public ${bindingName}ServiceBindingProvider(RuntimeEndpoint endpoint) { + this.endpoint = endpoint; + } + + public void start() { + // add some code here to start the service + + // For this sample we'll just share it in a static + ${bindingName}Stash.addService(endpoint.getBinding().getURI(), new ${bindingName}ServiceInvoker(endpoint)); + + System.out.println("someAttr=" + ((${bindingName}Binding)endpoint.getBinding()).getSomeAttr()); + } + + public void stop() { + ${bindingName}Stash.removeService(endpoint.getBinding().getURI()); + } + + public InterfaceContract getBindingInterfaceContract() { + return contract; + } + + public boolean supportsOneWayInvocation() { + return false; + } + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ServiceInvoker.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ServiceInvoker.java new file mode 100644 index 0000000000..8ea20d41ed --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__ServiceInvoker.java @@ -0,0 +1,43 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 ${package}.runtime; + +import org.apache.tuscany.sca.invocation.Message; +import org.apache.tuscany.sca.runtime.RuntimeEndpoint; + +public class ${bindingName}ServiceInvoker { + + private RuntimeEndpoint wire; + + public ${bindingName}ServiceInvoker(RuntimeEndpoint wire) { + this.wire = wire; + } + + /** + * Send the request down the wire to invoke the service + */ + public Message invokeService(Message msg) { + return wire.invoke(msg); + } + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__Stash.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__Stash.java new file mode 100644 index 0000000000..416a10e7b1 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/java/runtime/__bindingName__Stash.java @@ -0,0 +1,47 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 ${package}.runtime; + +import java.util.HashMap; +import java.util.Map; + +/** + * Simplistic static Map to share service endpoints with references + */ +public class ${bindingName}Stash { + + private static Map services = new HashMap(); + + public static void addService(String uri, ${bindingName}ServiceInvoker ${bindingName}ServiceInvoker) { + services.put(uri, ${bindingName}ServiceInvoker); + } + + public static ${bindingName}ServiceInvoker getService(String uri) { + return services.get(uri); + } + + public static void removeService(String uri) { + services.remove(uri); + } + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/__package__.__bindingName__BindingFactory b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/__package__.__bindingName__BindingFactory new file mode 100644 index 0000000000..3759b19fa0 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/__package__.__bindingName__BindingFactory @@ -0,0 +1,20 @@ +# 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. + +# Implementation class for model factory +${package}.${bindingName}BindingFactory + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor new file mode 100644 index 0000000000..eb49133022 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor @@ -0,0 +1,20 @@ +# 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. + +# Implementation class for the artifact processor extension +org.apache.tuscany.sca.assembly.xml.DefaultBeanModelProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.1#binding.${artifactId},model=${package}.${bindingName}Binding,factory=${package}.${bindingName}BindingFactory + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema new file mode 100644 index 0000000000..c33264f2a4 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema @@ -0,0 +1,19 @@ +# 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. +# +binding-${artifactId}.xsd + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory new file mode 100644 index 0000000000..3c0cfbc6d9 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory @@ -0,0 +1,20 @@ +# 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. + +# Implementation class for the binding extension +${package}.runtime.${bindingName}BindingProviderFactory;model=${package}.${bindingName}Binding + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/binding-__artifactId__.xsd b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/binding-__artifactId__.xsd new file mode 100644 index 0000000000..74f853e424 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/main/resources/binding-__artifactId__.xsd @@ -0,0 +1,37 @@ +#set( $bindingNameLC = ${bindingName} ) + + + + + + + + + + + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldClient.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldClient.java new file mode 100644 index 0000000000..de982cefc1 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldClient.java @@ -0,0 +1,36 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 helloworld; + +import org.oasisopen.sca.annotation.Reference; + +public class HelloWorldClient implements HelloWorldService { + + @Reference + public HelloWorldService ref; + + public String sayHello(String name) { + return ref.sayHello(name); + } + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldImpl.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldImpl.java new file mode 100644 index 0000000000..521f6828ce --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldImpl.java @@ -0,0 +1,31 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 helloworld; + + +public class HelloWorldImpl implements HelloWorldService { + + public String sayHello(String name) { + return "Hello " + name; + } + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldService.java new file mode 100644 index 0000000000..eca0df1543 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldService.java @@ -0,0 +1,31 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 helloworld; + +import org.oasisopen.sca.annotation.Remotable; + +@Remotable +public interface HelloWorldService { + + String sayHello(String name); + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/test/__bindingName__BindingTestCase.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/test/__bindingName__BindingTestCase.java new file mode 100644 index 0000000000..61847e5eda --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/java/test/__bindingName__BindingTestCase.java @@ -0,0 +1,55 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 test; + +import helloworld.HelloWorldService; +import junit.framework.Assert; + +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.Test; + +public class ${bindingName}BindingTestCase { + + private static Node node; + + @Test + public void testSayHello() { + HelloWorldService service = node.getService(HelloWorldService.class, "HelloWorldClient/HelloWorldService"); + Assert.assertEquals("Hello boo", service.sayHello("boo")); + } + + @BeforeClass + public static void init() throws Exception { + node = NodeFactory.newInstance().createNode("helloworld.composite").start(); + } + + @AfterClass + public static void destroy() throws Exception { + if (node != null) { + node.stop(); + } + } + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/resources/helloworld.composite b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/resources/helloworld.composite new file mode 100644 index 0000000000..f0e6150c10 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/main/resources/archetype-resources/src/test/resources/helloworld.composite @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/test/resources/projects/basic/archetype.properties b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/test/resources/projects/basic/archetype.properties new file mode 100644 index 0000000000..c15305edb4 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/test/resources/projects/basic/archetype.properties @@ -0,0 +1,23 @@ +# 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. +#Sat Sep 04 08:10:22 BST 2010 +version=0.1-SNAPSHOT +groupId=archetype.it +package=archetype.it.basic +artifactId=basic +bindingName=Basic + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/test/resources/projects/basic/goal.txt b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/binding/src/test/resources/projects/basic/goal.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/META-INF/MANIFEST.MF b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..1e2a0fbb4d --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/META-INF/MANIFEST.MF @@ -0,0 +1,11 @@ +Manifest-Version: 1.0 +Bundle-Name: Apache Tuscany SCA Contribution JAR +Created-By: 1.6.0_07 (Sun Microsystems Inc.) +Bundle-Vendor: The Apache Software Foundation +Bundle-Version: 2.0.0 +Bundle-ManifestVersion: 2 +Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt +Bundle-Description: Apache Tuscany SCA Quickstart Archetype +Bundle-SymbolicName: org.apache.tuscany.sca.archetype.contribution.jar +Bundle-DocURL: http://www.apache.org/ +Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6 diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/pom.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/pom.xml new file mode 100644 index 0000000000..3cfb62f921 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/pom.xml @@ -0,0 +1,51 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0-Beta3 + ../../../pom.xml + + + tuscany-contribution-jar + maven-archetype + Create an SCA JAR contribution project + Create an SCA JAR contribution project + + + + + org.apache.maven.archetype + archetype-packaging + 2.0-alpha-3 + + + + + maven-archetype-plugin + 2.0-alpha-3 + true + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype-metadata.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000000..1e1c124869 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,49 @@ + + + + + + src/main/java + + **/*.java + + + + src/test/java + + **/*.java + + + + src/main/resources + + **/*.xml + **/*.composite + + + + src/test/resources + + **/*.xml + **/*.composite + + + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype.xml new file mode 100644 index 0000000000..6e0591fbfe --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/META-INF/maven/archetype.xml @@ -0,0 +1,22 @@ + + + + tuscany-contribution-jar + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000000..2cbcbd1a38 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,87 @@ + + + + 4.0.0 + + ${groupId} + ${artifactId} + ${version} + jar + + ${artifactId} + + + 2.0-Beta3 + 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 + + + + + + install + ${artifactId} + + + + org.apache.tuscany.sca + tuscany-maven-plugin + ${tuscany.version} + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.6 + 1.6 + true + true + + + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/Helloworld.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/Helloworld.java new file mode 100644 index 0000000000..68f91f67cd --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/Helloworld.java @@ -0,0 +1,28 @@ +/* + * 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 ${package}; + +import org.oasisopen.sca.annotation.Remotable; + +@Remotable +public interface Helloworld { + + String sayHello(String name); + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java new file mode 100644 index 0000000000..f5af4c7366 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java @@ -0,0 +1,36 @@ +/* + * 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 ${package}; + +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-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..d2e633d3d8 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/META-INF/sca-contribution.xml @@ -0,0 +1,25 @@ + + + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/helloworld.composite b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/helloworld.composite new file mode 100644 index 0000000000..35970f63ca --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/main/resources/helloworld.composite @@ -0,0 +1,29 @@ + + + + + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/test/java/HelloworldTestCase.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/test/java/HelloworldTestCase.java new file mode 100644 index 0000000000..c98112cb93 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-jar/src/main/resources/archetype-resources/src/test/java/HelloworldTestCase.java @@ -0,0 +1,48 @@ +/* + * 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 ${package}; + +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-Beta3-RC2/maven/archetypes/contribution-zip-discriptor/pom.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip-discriptor/pom.xml new file mode 100644 index 0000000000..7f8d4e1c23 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip-discriptor/pom.xml @@ -0,0 +1,33 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0-Beta3 + ../../../pom.xml + + + tuscany-zip-contribution-descriptor + Tuscany SCA ZIP contribution Shared Assembly Descriptor + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip-discriptor/src/main/resources/assemblies/tuscany-zip-contribution.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip-discriptor/src/main/resources/assemblies/tuscany-zip-contribution.xml new file mode 100644 index 0000000000..a672d2920d --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip-discriptor/src/main/resources/assemblies/tuscany-zip-contribution.xml @@ -0,0 +1,40 @@ + + + + zip-contribution + + zip + + false + + + false + runtime + lib + false + + + + + ${project.build.outputDirectory} + / + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/META-INF/MANIFEST.MF b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..b5be2573dd --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/META-INF/MANIFEST.MF @@ -0,0 +1,11 @@ +Manifest-Version: 1.0 +Bundle-Name: Apache Tuscany SCA Contribution ZIP +Created-By: 1.6.0_07 (Sun Microsystems Inc.) +Bundle-Vendor: The Apache Software Foundation +Bundle-Version: 2.0.0 +Bundle-ManifestVersion: 2 +Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt +Bundle-Description: Apache Tuscany SCA ZIP Contribution Archetype +Bundle-SymbolicName: org.apache.tuscany.sca.archetype.contribution.zip +Bundle-DocURL: http://www.apache.org/ +Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6 diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/pom.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/pom.xml new file mode 100644 index 0000000000..9a21bf30f9 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/pom.xml @@ -0,0 +1,51 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0-Beta3 + ../../../pom.xml + + + tuscany-contribution-zip + maven-archetype + Create an SCA ZIP contribution project + Create an SCA ZIP contribution project + + + + + org.apache.maven.archetype + archetype-packaging + 2.0-alpha-3 + + + + + maven-archetype-plugin + 2.0-alpha-3 + true + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/META-INF/maven/archetype-metadata.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000000..46c5cd6dca --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,36 @@ + + + + + + src/main/java + + **/*.java + + + + src/main/resources + + **/*.xml + **/*.composite + + + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/META-INF/maven/archetype.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/META-INF/maven/archetype.xml new file mode 100644 index 0000000000..c17535e802 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/META-INF/maven/archetype.xml @@ -0,0 +1,30 @@ + + + + tuscany-contribution-zip + + src/main/java/AddImpl.java + src/main/java/AddService.java + + + src/main/resources/add.composite + src/main/resources/META-INF/sca-contribution.xml + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/pom.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000000..dd7eac939b --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,153 @@ + + + + + 4.0.0 + ${groupId} + ${project.artifactId} + jar + ${project.version} + #literal() + quickstart + + + + + + org.apache.tuscany.sca + tuscany-sca-api + ${tuscany.version} + provided + + + + + commons-io + commons-io + 1.4 + + + + commons-math + commons-math + 1.2 + + + + + junit + junit + 4.8.1 + test + + + + + install + ${project.artifactId} + + + false + src/main/resources + + + false + src/main/java + + ** + + + **/*.java + + + + + + false + src/test/java + + ** + + + **/*.java + + + + + + true + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + true + true + + + + org.apache.maven.plugins + maven-eclipse-plugin + + true + + + + maven-assembly-plugin + 2.2-beta-3 + + + org.apache.tuscany.sca + tuscany-zip-contribution-descriptor + ${tuscany.version} + + + + + make-assembly + package + + single + + + false + + + tuscany-zip-contribution.xml + + + + + + + + org.apache.tuscany.maven.plugins + maven-tuscany-plugin + + + + + 2.0-Beta3 + + #end + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/java/AddImpl.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/java/AddImpl.java new file mode 100644 index 0000000000..48b62dbb6f --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/java/AddImpl.java @@ -0,0 +1,38 @@ +/* + * 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 ${package}; + +import org.apache.commons.math.util.MathUtils; + +import org.oasisopen.sca.annotation.Init; +import org.oasisopen.sca.annotation.Scope; +import org.oasisopen.sca.annotation.EagerInit; + +@Scope("COMPOSITE") @EagerInit +public class AddImpl implements AddService { + + public int add(int x, int y) { + return MathUtils.addAndCheck(x, y); + } + + @Init + public void init() { + System.out.println("1 + 2 = " + add(1, 2)); + } +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/java/AddService.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/java/AddService.java new file mode 100644 index 0000000000..4b25553893 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/java/AddService.java @@ -0,0 +1,25 @@ +/* + * 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 ${package}; + +public interface AddService { + + int add(int x, int y); + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/resources/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..960d6a90ae --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/resources/META-INF/sca-contribution.xml @@ -0,0 +1,23 @@ + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/resources/add.composite b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/resources/add.composite new file mode 100644 index 0000000000..3dc8175bd7 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/contribution-zip/src/main/resources/archetype-resources/src/main/resources/add.composite @@ -0,0 +1,29 @@ + + + + + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/pom.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/pom.xml new file mode 100644 index 0000000000..bc124308a6 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/pom.xml @@ -0,0 +1,54 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0-Beta3 + ../../../pom.xml + + + tuscany-implementation-archetype + maven-archetype + Create a Tuscany implementation extension project + Create a Tuscany implementation extension project + + + + + org.apache.maven.archetype + archetype-packaging + 2.0-alpha-5 + + + + + + + maven-archetype-plugin + 2.0-alpha-5 + true + + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/META-INF/maven/archetype-metadata.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000000..8b1b08b4bb --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + src/main/java + + **/*.java + + + + src/main/resources + + **/*.* + + + + src/test/java + + **/*.java + + + + src/test/resources + + **/*.* + + + + META-INF + + MANIFEST.MF + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/META-INF/MANIFEST.MF b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..5880433840 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/META-INF/MANIFEST.MF @@ -0,0 +1,17 @@ +Manifest-Version: 1.0 +SCA-Version: 1.1 +Bundle-Name: Apache Tuscany SCA ${implementationName} Implementation +Bundle-Vendor: The Apache Software Foundation +Bundle-Version: 2.0.0 +Bundle-ManifestVersion: 2 +Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt +Bundle-Description: Apache Tuscany SCA ${implementationName} Binding +Import-Package: org.apache.tuscany.sca.assembly;version="2.0.0", + org.apache.tuscany.sca.core;version="2.0.0", + org.apache.tuscany.sca.interfacedef;version="2.0.0", + org.apache.tuscany.sca.invocation;version="2.0.0", + org.apache.tuscany.sca.provider;version="2.0.0", + org.apache.tuscany.sca.runtime;version="2.0.0" +Bundle-SymbolicName: org.apache.tuscany.sca.implementation.${artifactId} +Bundle-DocURL: http://www.apache.org/ +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/pom.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000000..1adc4eb49c --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,59 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-modules + 2.0-Beta3 + ../pom.xml + + + binding-${artifactId} + ${groupId} + ${version} + Apache Tuscany SCA ${implementationName} Implementation Extension + + + + + org.apache.tuscany.sca + tuscany-assembly-xml + 2.0-Beta3 + provided + + + + org.apache.tuscany.sca + tuscany-domain-node + 2.0-Beta3 + test + + + + junit + junit + 4.8.1 + test + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/__implementationName__Implementation.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/__implementationName__Implementation.java new file mode 100644 index 0000000000..d9cbdb954d --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/__implementationName__Implementation.java @@ -0,0 +1,52 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 ${package}; + +import javax.xml.namespace.QName; + +import org.apache.tuscany.sca.provider.BaseBindingImpl; + +/** + * Represents a binding to a ${bindingName} service. + */ +public class ${bindingName}Binding extends BaseBindingImpl { + + public static final QName TYPE = new QName(SCA11_TUSCANY_NS, "binding.${artifactId}"); + + private String someAttr; + + public ${bindingName}Binding() { + } + + public QName getType() { + return TYPE; + } + + public String getSomeAttr() { + return someAttr; + } + + public void setSomeAttr(String someAttr) { + this.someAttr = someAttr; + } + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/__implementationName__ImplementationFactory.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/__implementationName__ImplementationFactory.java new file mode 100644 index 0000000000..ae1cd88745 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/__implementationName__ImplementationFactory.java @@ -0,0 +1,35 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 ${package}; + + +/** + * Factory implementation to create ${bindingName} Models + */ +public class ${bindingName}BindingFactory { + + public ${bindingName}Binding create${bindingName}Binding() { + return new ${bindingName}Binding(); + } + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__BindingProviderFactory.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__BindingProviderFactory.java new file mode 100644 index 0000000000..93c6bf3c04 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__BindingProviderFactory.java @@ -0,0 +1,50 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 ${package}.runtime; + +import ${package}.${bindingName}Binding; +import org.apache.tuscany.sca.core.ExtensionPointRegistry; +import org.apache.tuscany.sca.provider.BindingProviderFactory; +import org.apache.tuscany.sca.provider.ReferenceBindingProvider; +import org.apache.tuscany.sca.provider.ServiceBindingProvider; +import org.apache.tuscany.sca.runtime.RuntimeEndpoint; +import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; + +public class ${bindingName}BindingProviderFactory implements BindingProviderFactory<${bindingName}Binding> { + + public ${bindingName}BindingProviderFactory(ExtensionPointRegistry extensionPoints) { + } + + public Class<${bindingName}Binding> getModelType() { + return ${bindingName}Binding.class; + } + + public ReferenceBindingProvider createReferenceBindingProvider(RuntimeEndpointReference endpoint) { + return new ${bindingName}ReferenceBindingProvider(endpoint); + } + + public ServiceBindingProvider createServiceBindingProvider(RuntimeEndpoint endpoint) { + return new ${bindingName}ServiceBindingProvider(endpoint); + } + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ReferenceBindingProvider.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ReferenceBindingProvider.java new file mode 100644 index 0000000000..dc2991014e --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ReferenceBindingProvider.java @@ -0,0 +1,58 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 ${package}.runtime; + +import org.apache.tuscany.sca.assembly.EndpointReference; +import org.apache.tuscany.sca.interfacedef.InterfaceContract; +import org.apache.tuscany.sca.interfacedef.Operation; +import org.apache.tuscany.sca.invocation.Invoker; +import org.apache.tuscany.sca.provider.ReferenceBindingProvider; + +public class ${bindingName}ReferenceBindingProvider implements ReferenceBindingProvider { + + private EndpointReference endpoint; + private InterfaceContract contract; + + public ${bindingName}ReferenceBindingProvider(EndpointReference endpoint) { + this.endpoint = endpoint; + } + + public Invoker createInvoker(Operation operation) { + return new ${bindingName}ReferenceInvoker(operation, endpoint); + } + + public void start() { + } + + public void stop() { + } + + public InterfaceContract getBindingInterfaceContract() { + return contract; + } + + public boolean supportsOneWayInvocation() { + return false; + } + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ReferenceInvoker.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ReferenceInvoker.java new file mode 100644 index 0000000000..d3e2bd1812 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ReferenceInvoker.java @@ -0,0 +1,56 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 ${package}.runtime; + +import org.apache.tuscany.sca.assembly.EndpointReference; +import org.apache.tuscany.sca.interfacedef.Operation; +import org.apache.tuscany.sca.invocation.Invoker; +import org.apache.tuscany.sca.invocation.Message; + +public class ${bindingName}ReferenceInvoker implements Invoker { + + protected Operation operation; + protected EndpointReference endpoint; + + public ${bindingName}ReferenceInvoker(Operation operation, EndpointReference endpoint) { + this.operation = operation; + this.endpoint = endpoint; + } + + public Message invoke(Message msg) { + try { + + return doInvoke(msg); + + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + public Message doInvoke(Message msg) { + // Add some code here to make an invocation over the ${bindingName} binding protocol + // For this sample we'll just get it from the static stash + ${bindingName}ServiceInvoker fi = ${bindingName}Stash.getService(endpoint.getBinding().getURI()); + return fi.invokeService(msg); + } +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ServiceBindingProvider.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ServiceBindingProvider.java new file mode 100644 index 0000000000..59d41091d8 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ServiceBindingProvider.java @@ -0,0 +1,60 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 ${package}.runtime; + +import ${package}.${bindingName}Binding; +import org.apache.tuscany.sca.interfacedef.InterfaceContract; +import org.apache.tuscany.sca.provider.ServiceBindingProvider; +import org.apache.tuscany.sca.runtime.RuntimeEndpoint; + +public class ${bindingName}ServiceBindingProvider implements ServiceBindingProvider { + + private RuntimeEndpoint endpoint; + private InterfaceContract contract; + + public ${bindingName}ServiceBindingProvider(RuntimeEndpoint endpoint) { + this.endpoint = endpoint; + } + + public void start() { + // add some code here to start the service + + // For this sample we'll just share it in a static + ${bindingName}Stash.addService(endpoint.getBinding().getURI(), new ${bindingName}ServiceInvoker(endpoint)); + + System.out.println("someAttr=" + ((${bindingName}Binding)endpoint.getBinding()).getSomeAttr()); + } + + public void stop() { + ${bindingName}Stash.removeService(endpoint.getBinding().getURI()); + } + + public InterfaceContract getBindingInterfaceContract() { + return contract; + } + + public boolean supportsOneWayInvocation() { + return false; + } + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ServiceInvoker.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ServiceInvoker.java new file mode 100644 index 0000000000..8ea20d41ed --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__ServiceInvoker.java @@ -0,0 +1,43 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 ${package}.runtime; + +import org.apache.tuscany.sca.invocation.Message; +import org.apache.tuscany.sca.runtime.RuntimeEndpoint; + +public class ${bindingName}ServiceInvoker { + + private RuntimeEndpoint wire; + + public ${bindingName}ServiceInvoker(RuntimeEndpoint wire) { + this.wire = wire; + } + + /** + * Send the request down the wire to invoke the service + */ + public Message invokeService(Message msg) { + return wire.invoke(msg); + } + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__Stash.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__Stash.java new file mode 100644 index 0000000000..416a10e7b1 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/java/runtime/__implementationName__Stash.java @@ -0,0 +1,47 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 ${package}.runtime; + +import java.util.HashMap; +import java.util.Map; + +/** + * Simplistic static Map to share service endpoints with references + */ +public class ${bindingName}Stash { + + private static Map services = new HashMap(); + + public static void addService(String uri, ${bindingName}ServiceInvoker ${bindingName}ServiceInvoker) { + services.put(uri, ${bindingName}ServiceInvoker); + } + + public static ${bindingName}ServiceInvoker getService(String uri) { + return services.get(uri); + } + + public static void removeService(String uri) { + services.remove(uri); + } + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/__package__.__bindingName__BindingFactory b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/__package__.__bindingName__BindingFactory new file mode 100644 index 0000000000..3759b19fa0 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/__package__.__bindingName__BindingFactory @@ -0,0 +1,20 @@ +# 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. + +# Implementation class for model factory +${package}.${bindingName}BindingFactory + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor new file mode 100644 index 0000000000..eb49133022 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor @@ -0,0 +1,20 @@ +# 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. + +# Implementation class for the artifact processor extension +org.apache.tuscany.sca.assembly.xml.DefaultBeanModelProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.1#binding.${artifactId},model=${package}.${bindingName}Binding,factory=${package}.${bindingName}BindingFactory + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema new file mode 100644 index 0000000000..c33264f2a4 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidationSchema @@ -0,0 +1,19 @@ +# 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. +# +binding-${artifactId}.xsd + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory new file mode 100644 index 0000000000..3c0cfbc6d9 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.BindingProviderFactory @@ -0,0 +1,20 @@ +# 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. + +# Implementation class for the binding extension +${package}.runtime.${bindingName}BindingProviderFactory;model=${package}.${bindingName}Binding + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/implementation-__artifactId__.xsd b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/implementation-__artifactId__.xsd new file mode 100644 index 0000000000..d0c6f62439 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/main/resources/implementation-__artifactId__.xsd @@ -0,0 +1,37 @@ +#set( $implementationNameLC = ${implementationName} ) + + + + + + + + + + + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldClient.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldClient.java new file mode 100644 index 0000000000..de982cefc1 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldClient.java @@ -0,0 +1,36 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 helloworld; + +import org.oasisopen.sca.annotation.Reference; + +public class HelloWorldClient implements HelloWorldService { + + @Reference + public HelloWorldService ref; + + public String sayHello(String name) { + return ref.sayHello(name); + } + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldImpl.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldImpl.java new file mode 100644 index 0000000000..521f6828ce --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldImpl.java @@ -0,0 +1,31 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 helloworld; + + +public class HelloWorldImpl implements HelloWorldService { + + public String sayHello(String name) { + return "Hello " + name; + } + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldService.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldService.java new file mode 100644 index 0000000000..eca0df1543 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/helloworld/HelloWorldService.java @@ -0,0 +1,31 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 helloworld; + +import org.oasisopen.sca.annotation.Remotable; + +@Remotable +public interface HelloWorldService { + + String sayHello(String name); + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/test/__bindingName__BindingTestCase.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/test/__bindingName__BindingTestCase.java new file mode 100644 index 0000000000..61847e5eda --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/java/test/__bindingName__BindingTestCase.java @@ -0,0 +1,55 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 test; + +import helloworld.HelloWorldService; +import junit.framework.Assert; + +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.Test; + +public class ${bindingName}BindingTestCase { + + private static Node node; + + @Test + public void testSayHello() { + HelloWorldService service = node.getService(HelloWorldService.class, "HelloWorldClient/HelloWorldService"); + Assert.assertEquals("Hello boo", service.sayHello("boo")); + } + + @BeforeClass + public static void init() throws Exception { + node = NodeFactory.newInstance().createNode("helloworld.composite").start(); + } + + @AfterClass + public static void destroy() throws Exception { + if (node != null) { + node.stop(); + } + } + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/resources/helloworld.composite b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/resources/helloworld.composite new file mode 100644 index 0000000000..f0e6150c10 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/main/resources/archetype-resources/src/test/resources/helloworld.composite @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/test/resources/projects/basic/archetype.properties b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/test/resources/projects/basic/archetype.properties new file mode 100644 index 0000000000..a5eb1dd3d1 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/test/resources/projects/basic/archetype.properties @@ -0,0 +1,23 @@ +# 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. +#Sat Sep 04 08:10:22 BST 2010 +version=0.1-SNAPSHOT +groupId=archetype.it +package=archetype.it.basic +artifactId=basic +implementationName=Basic + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/test/resources/projects/basic/goal.txt b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/implementation/src/test/resources/projects/basic/goal.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/pom.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/pom.xml new file mode 100644 index 0000000000..a6b5194cd3 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/pom.xml @@ -0,0 +1,52 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0-Beta3 + ../../pom.xml + + tuscany-archetype + pom + Apache Tuscany SCA Maven Archetypes + + + + default + + true + + + + contribution-jar + contribution-zip + contribution-zip-discriptor + quickstart + quickstart-jsf + quickstart-stripes + quickstart-bpel + binding + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/META-INF/MANIFEST.MF b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..29e03eb396 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/META-INF/MANIFEST.MF @@ -0,0 +1,11 @@ +Manifest-Version: 1.0 +Bundle-Name: Apache Tuscany SCA Quickstart Archetype +Created-By: 1.6.0_07 (Sun Microsystems Inc.) +Bundle-Vendor: The Apache Software Foundation +Bundle-Version: 2.0.0 +Bundle-ManifestVersion: 2 +Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt +Bundle-Description: Apache Tuscany SCA Quickstart Archetype +Bundle-SymbolicName: org.apache.tuscany.sca.archetype.quickstart +Bundle-DocURL: http://www.apache.org/ +Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6 diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/pom.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/pom.xml new file mode 100644 index 0000000000..845f261328 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/pom.xml @@ -0,0 +1,51 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0-Beta3 + ../../../pom.xml + + + tuscany-quickstart-bpel + maven-archetype + Create an SCA Webapp project using BPEL + Create an SCA Webapp project using BPEL + + + + + org.apache.maven.archetype + archetype-packaging + 2.0-alpha-3 + + + + + maven-archetype-plugin + 2.0-alpha-3 + true + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/META-INF/maven/archetype-metadata.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000000..47c2f5dc10 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,43 @@ + + + + + + src/main/java + + **/*.java + + + + src/main/resources + + **/* + + + + src/main/webapp + + **/*.jsp + **/*.xml + **/*.composite + + + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/META-INF/maven/archetype.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/META-INF/maven/archetype.xml new file mode 100644 index 0000000000..c466a1b3f5 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/META-INF/maven/archetype.xml @@ -0,0 +1,33 @@ + + + + tuscany-quickstart + + src/main/java/HelloworldImpl.java + src/main/java/HelloworldService.java + + + src/main/resources/helloworld.bpel + src/main/resources/helloworld.wsdl + src/main/webapp/hello.jsp + src/main/webapp/WEB-INF/web.composite + src/main/webapp/WEB-INF/web.xml + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/pom.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000000..ad3273431e --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,182 @@ + + + + + 4.0.0 + ${groupId} + ${project.artifactId} + war + ${project.version} + #literal() + quickstart + + + + + + org.apache.tuscany.sca + tuscany-sca-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-implementation-web-runtime + ${tuscany.version} + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-bpel-runtime + ${tuscany.version} + runtime + + + + + junit + junit + 4.8.1 + test + + + + + org.mortbay.jetty + jetty + ${jetty.version} + provided + + + org.mortbay.jetty + jetty-util + ${jetty.version} + provided + + + org.mortbay.jetty + jetty-management + ${jetty.version} + provided + + + + install + ${project.artifactId} + + + false + src/main/resources + + + false + src/main/java + + ** + + + **/*.java + + + + + + false + src/test/java + + ** + + + **/*.java + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack + compile + + unpack + + + + + org.apache.ode + ode-dao-jpa-ojpa-derby + 1.1.1 + zip + false + ${project.build.directory}/classes + **/* + + + + + + + + true + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + true + true + + + + org.mortbay.jetty + maven-jetty-plugin + ${jetty.version} + + + + + openjpa.QueryCompilationCache + false + + + + ${basedir}/src/main + ${basedir}/src/main/webapp/WEB-INF/web.xml + + + + org.apache.maven.plugins + maven-eclipse-plugin + + true + + + + + + 2.0-Beta3 + 6.1.18 + + #end + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/java/HelloworldService.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/java/HelloworldService.java new file mode 100644 index 0000000000..a99cc7b032 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/java/HelloworldService.java @@ -0,0 +1,28 @@ +/* + * 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 ${package}; + +import org.oasisopen.sca.annotation.Remotable; + +@Remotable +public interface HelloworldService { + + String hello(String name); + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/resources/helloworld.bpel b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/resources/helloworld.bpel new file mode 100644 index 0000000000..53e77c5be0 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/resources/helloworld.bpel @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + concat($tmpVar,' World') + + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/resources/helloworld.wsdl b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/resources/helloworld.wsdl new file mode 100644 index 0000000000..46cf381577 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/resources/helloworld.wsdl @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite new file mode 100644 index 0000000000..4d3d532184 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..922d275b17 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,41 @@ + + + + + ${artifactId} + + + tuscany.${artifactId} + org.apache.tuscany.sca.host.webapp.TuscanyServletFilter + + + + tuscany.${artifactId} + /* + + + + hello.jsp + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/webapp/hello.jsp b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/webapp/hello.jsp new file mode 100644 index 0000000000..7aeaf81b33 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-bpel/src/main/resources/archetype-resources/src/main/webapp/hello.jsp @@ -0,0 +1,36 @@ +<%-- + * 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. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ taglib uri="http://www.osoa.org/sca/sca_jsp.tld" prefix="sca" %> + + + + + + +

${artifactId}

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

+ + <%= service.hello("world") %> + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/pom.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/pom.xml new file mode 100644 index 0000000000..c43158fa13 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/pom.xml @@ -0,0 +1,51 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0-Beta3 + ../../../pom.xml + + + tuscany-quickstart-jsf + maven-archetype + Create a Tuscany SCA and JSF project + Create a Tuscany SCA and JSF project + + + + + org.apache.maven.archetype + archetype-packaging + 2.0-alpha-4 + + + + + maven-archetype-plugin + 2.0-alpha-4 + true + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype-metadata.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000000..f15a12fb88 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,44 @@ + + + + + + src/main/java + + **/*.java + + + + src/main/webapp + + **/*.jsp + **/*.xml + **/*.html + **/*.composite + + + + src/main/resources + + **/*.properties + + + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype.xml new file mode 100644 index 0000000000..b5295d8a73 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype.xml @@ -0,0 +1,38 @@ + + + + quickstart-stripes + + src/main/java/sample/stripes/action/BaseActionBean.java + src/main/java/sample/stripes/action/HomeActionBean.java + src/main/java/sample/sca/HelloworldService.java + src/main/java/sample/sca/HelloworldServiceImpl.java + + + src/main/resources/log4j.properties + src/main/resources/StripesResources.properties + src/main/webapp/index.html + src/main/webapp/WEB-INF/jsp/home.jsp + src/main/webapp/WEB-INF/jsp/layout.jsp + src/main/webapp/WEB-INF/jsp/taglibs.jsp + src/main/webapp/WEB-INF/web.composite + src/main/webapp/WEB-INF/web.xml + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/pom.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000000..4d794b83dd --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,154 @@ + + + + + 4.0.0 + ${groupId} + ${project.artifactId} + war + ${project.version} + #literal() + quickstart-jsf + + + + + + + org.apache.tuscany.sca + tuscany-sca-api + ${tuscany.version} + + + org.apache.tuscany.sca + tuscany-myfaces + ${tuscany.version} + + + + + org.apache.myfaces.core + myfaces-api + 1.2.2 + compile + + + + org.apache.myfaces.core + myfaces-impl + 1.2.2 + compile + + + + org.apache.myfaces.tomahawk + tomahawk + 1.1.6 + runtime + + + javax.servlet + jstl + + + + + + jstl + jstl + 1.2 + runtime + + + + junit + junit + 4.0 + test + + + + + + install + ${project.artifactId} + + + false + src/main/resources + + + false + src/main/java + + ** + + + **/*.java + + + + + + false + src/test/java + + ** + + + **/*.java + + + + + + true + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + true + true + + + + org.mortbay.jetty + maven-jetty-plugin + ${jetty.version} + + + org.apache.maven.plugins + maven-eclipse-plugin + + true + + + + + + 2.0-Beta3 + 1.5 + 6.1.4 + + #end + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/myfaces/HelloWorldController.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/myfaces/HelloWorldController.java new file mode 100644 index 0000000000..e38c84feda --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/myfaces/HelloWorldController.java @@ -0,0 +1,64 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 ${package}.myfaces; + +import org.oasisopen.sca.annotation.Reference; + +import ${package}.sca.HelloworldService; + +/** + * A typical simple backing bean, that is backed to helloworld.jsp + * + */ +public class HelloWorldController { + + //properties + private String name; + + @Reference + private HelloworldService service; + + /** + * default empty constructor + */ + public HelloWorldController(){ + } + + //-------------------getter & setter + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + + /** + * Method that is backed to a submit button of a form. + */ + public String send(){ + + // invoke the SCA reference + name = service.sayHello(name); + + return "success"; + } +} \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldService.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldService.java new file mode 100644 index 0000000000..d6cb7bbcf2 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldService.java @@ -0,0 +1,28 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 ${package}.sca; + +public interface HelloworldService { + + String sayHello(String name); + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldServiceImpl.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldServiceImpl.java new file mode 100644 index 0000000000..ec9bfd7221 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldServiceImpl.java @@ -0,0 +1,30 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 ${package}.sca; + +public class HelloworldServiceImpl implements HelloworldService { + + public String sayHello(String name) { + return "Hello " + name; + } + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml new file mode 100644 index 0000000000..3b732de8af --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml @@ -0,0 +1,53 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + + + + helloWorld + ${package}.myfaces.HelloWorldController + request + + + + + /helloWorld.jsp + + success + /page2.jsp + + + + + + /page2.jsp + + back + /helloWorld.jsp + + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite new file mode 100644 index 0000000000..7e18dc9308 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..48b73fe68a --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,230 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + + ${artifactId} + + + + org.apache.tuscany.sca.host.webapp.TuscanyContextListener + + + org.apache.myfaces.config.annotation.LifecycleProvider + org.apache.tuscany.sca.myfaces.TuscanyAnnotationLifecycleProvider + + + + + State saving method: "client" or "server" (= default) + See JSF Specification 2.5.3 + javax.faces.STATE_SAVING_METHOD + client + + + Only applicable if state saving method is "server" (= default). + Defines the amount (default = 20) of the latest views are stored in session. + org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION + 20 + + + Only applicable if state saving method is "server" (= default). + If true (default) the state will be serialized to a byte stream before it + is written to the session. + If false the state will not be serialized to a byte stream. + org.apache.myfaces.SERIALIZE_STATE_IN_SESSION + true + + + Only applicable if state saving method is "server" (= default) and if + org.apache.myfaces.SERIALIZE_STATE_IN_SESSION is true (= default) + If true (default) the serialized state will be compressed before it + is written to the session. If false the state will not be compressed. + org.apache.myfaces.COMPRESS_STATE_IN_SESSION + true + + + This parameter tells MyFaces if javascript code should be allowed in the + rendered HTML output. + If javascript is allowed, command_link anchors will have javascript code + that submits the corresponding form. + If javascript is not allowed, the state saving info and nested parameters + will be added as url parameters. + Default: "true" + org.apache.myfaces.ALLOW_JAVASCRIPT + true + + + org.apache.myfaces.DETECT_JAVASCRIPT + false + + + If true, rendered HTML code will be formatted, so that it is "human readable". + i.e. additional line separators and whitespace will be written, that do not + influence the HTML code. + Default: "true" + org.apache.myfaces.PRETTY_HTML + true + + + If true, a javascript function will be rendered that is able to restore the + former vertical scroll on every request. Convenient feature if you have pages + with long lists and you do not want the browser page to always jump to the top + if you trigger a link or button action that stays on the same page. + Default: "false" + org.apache.myfaces.AUTO_SCROLL + true + + + + Used for encrypting view state. Only relevant for client side + state saving. See MyFaces wiki/web site documentation for instructions + on how to configure an application for diffenent encryption strengths. + + org.apache.myfaces.SECRET + NzY1NDMyMTA= + + + + + Validate managed beans, navigation rules and ensure that forms are not nested. + + org.apache.myfaces.VALIDATE + true + + + + + Treat readonly same as if disabled attribute was set for select elements. + + org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS + true + + + + + Use the defined class as the class which will be called when a resource is added to the + ExtensionFilter handling. Using StreamingAddResource here helps with performance. If you want to add + custom components and want to use the ExtensionFilter, you need to provide your custom implementation here. + + org.apache.myfaces.ADD_RESOURCE_CLASS + org.apache.myfaces.renderkit.html.util.DefaultAddResource + + + + + Virtual path in the URL which triggers loading of resources for the MyFaces extended components + in the ExtensionFilter. + + org.apache.myfaces.RESOURCE_VIRTUAL_PATH + /faces/myFacesExtensionResource + + + + + Check if the extensions-filter has been properly configured. + + org.apache.myfaces.CHECK_EXTENSIONS_FILTER + true + + + + + Define partial state saving as true/false. + + javax.faces.PARTIAL_STATE_SAVING_METHOD + false + + + + + extensionsFilter + org.apache.myfaces.webapp.filter.ExtensionsFilter + + Set the size limit for uploaded files. + Format: 10 - 10 bytes + 10k - 10 KB + 10m - 10 MB + 1g - 1 GB + uploadMaxFileSize + 100m + + + Set the threshold size - files + below this limit are stored in memory, files above + this limit are stored on disk. + + Format: 10 - 10 bytes + 10k - 10 KB + 10m - 10 MB + 1g - 1 GB + uploadThresholdSize + 100k + + + + + extensionsFilter + *.jsf + + + extensionsFilter + /faces/* + + + + + org.apache.myfaces.webapp.StartupServletContextListener + + + + + Faces Servlet + javax.faces.webapp.FacesServlet + 1 + + + + + Faces Servlet + *.jsf + + + + + index.jsp + index.html + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/helloWorld.jsp b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/helloWorld.jsp new file mode 100644 index 0000000000..4a3197ec4f --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/helloWorld.jsp @@ -0,0 +1,37 @@ + +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> + + + Hello World + + + + + + + + + + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/index.jsp b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/index.jsp new file mode 100644 index 0000000000..768aa2408b --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/index.jsp @@ -0,0 +1,22 @@ + +<%@ page session="false"%> +<% +response.sendRedirect("helloWorld.jsf"); +%> \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/page2.jsp b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/page2.jsp new file mode 100644 index 0000000000..1c096f66c6 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/page2.jsp @@ -0,0 +1,35 @@ + +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> + + + Hello World + + + + +

+ + + + + + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/META-INF/MANIFEST.MF b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..29e03eb396 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/META-INF/MANIFEST.MF @@ -0,0 +1,11 @@ +Manifest-Version: 1.0 +Bundle-Name: Apache Tuscany SCA Quickstart Archetype +Created-By: 1.6.0_07 (Sun Microsystems Inc.) +Bundle-Vendor: The Apache Software Foundation +Bundle-Version: 2.0.0 +Bundle-ManifestVersion: 2 +Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt +Bundle-Description: Apache Tuscany SCA Quickstart Archetype +Bundle-SymbolicName: org.apache.tuscany.sca.archetype.quickstart +Bundle-DocURL: http://www.apache.org/ +Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6 diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/pom.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/pom.xml new file mode 100644 index 0000000000..a6658cf3dd --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/pom.xml @@ -0,0 +1,51 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0-Beta3 + ../../pom.xml + + + tuscany-quickstart-jsonp + maven-archetype + Create a Tuscany SCA webapp project using the JSONP binding + Create a Tuscany SCA webapp project using the JSONP binding + + + + + org.apache.maven.archetype + archetype-packaging + 2.0-alpha-4 + + + + + maven-archetype-plugin + 2.0-alpha-4 + true + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/META-INF/maven/archetype-metadata.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000000..450e33afd5 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,42 @@ + + + + + + Y + + + + + src/main/java + + **/*.java + + + + src/main/webapp + + **/*.jsp + **/*.xml + **/*.composite + + + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/META-INF/maven/archetype.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/META-INF/maven/archetype.xml new file mode 100644 index 0000000000..1bf4353502 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/META-INF/maven/archetype.xml @@ -0,0 +1,31 @@ + + + + tuscany-quickstart + + src/main/java/HelloworldImpl.java + src/main/java/HelloworldService.java + + + src/main/webapp/hello.jsp + src/main/webapp/WEB-INF/web.composite + src/main/webapp/WEB-INF/web.xml + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/pom.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000000..36a84e824c --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,154 @@ + + + + + 4.0.0 + ${groupId} + ${project.artifactId} + war + ${project.version} + quickstart-jsonp + + + + + org.apache.tuscany.sca + tuscany-sca-api + ${tuscany.version} +#if(${includeTuscanyRuntime} == "Y") + compile +#else + provided +#end + + + + org.apache.tuscany.sca + tuscany-implementation-web-runtime + ${tuscany.version} +#if( $includeTuscanyRuntime == "Y") + runtime +#else + provided +#end + + + + org.apache.tuscany.sca + tuscany-binding-jsonp-runtime + ${tuscany.version} +#if( $includeTuscanyRuntime == "Y") + runtime +#else + provided +#end + + + + + junit + junit + 4.8.1 + test + + + + + org.mortbay.jetty + jetty + ${jetty.version} + provided + + + org.mortbay.jetty + jetty-util + ${jetty.version} + provided + + + org.mortbay.jetty + jetty-management + ${jetty.version} + provided + + + + install + ${project.artifactId} + + + false + src/main/resources + + + false + src/main/java + + ** + + + **/*.java + + + + + + false + src/test/java + + ** + + + **/*.java + + + + + + true + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + true + true + + + + org.mortbay.jetty + maven-jetty-plugin + ${jetty.version} + + + org.apache.maven.plugins + maven-eclipse-plugin + + true + + + + + + 2.0-Beta3 + 6.1.18 + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java new file mode 100644 index 0000000000..2491816adc --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java @@ -0,0 +1,27 @@ +/* + * 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 ${package}; + +public class HelloworldImpl implements HelloworldService { + + public String sayHello(String name) { + return "Hello " + name; + } + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/java/HelloworldService.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/java/HelloworldService.java new file mode 100644 index 0000000000..3527edcd6f --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/java/HelloworldService.java @@ -0,0 +1,28 @@ +/* + * 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 ${package}; + +import org.oasisopen.sca.annotation.Remotable; + +@Remotable +public interface HelloworldService { + + String sayHello(String name); + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite new file mode 100644 index 0000000000..fa37fec88c --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite @@ -0,0 +1,32 @@ + + + + + + + + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..25d8d8184d --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,43 @@ + + + + + ${artifactId} + +#if($includeTuscanyRuntime == "Y") + + tuscany.${artifactId} + org.apache.tuscany.sca.host.webapp.TuscanyServletFilter + + + + tuscany.${artifactId} + /* + + +#end + + hello.jsp + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/webapp/hello.jsp b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/webapp/hello.jsp new file mode 100644 index 0000000000..9729ca6823 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-jsonp/src/main/resources/archetype-resources/src/main/webapp/hello.jsp @@ -0,0 +1,36 @@ +<%-- + * 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. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ taglib uri="http://www.osoa.org/sca/sca_jsp.tld" prefix="sca" %> + + + + + + +

${artifactId}

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

+ + <%= service.sayHello("world") %> + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/META-INF/MANIFEST.MF b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..ae84237c4a --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/META-INF/MANIFEST.MF @@ -0,0 +1,11 @@ +Manifest-Version: 1.0 +Bundle-Name: Apache Tuscany SCA Quickstart Stripes Archetype +Created-By: 1.6.0_07 (Sun Microsystems Inc.) +Bundle-Vendor: The Apache Software Foundation +Bundle-Version: 2.0.0 +Bundle-ManifestVersion: 2 +Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt +Bundle-Description: Apache Tuscany SCA Quickstart Stripes Archetype +Bundle-SymbolicName: org.apache.tuscany.sca.archetype.quickstart.stripes +Bundle-DocURL: http://www.apache.org/ +Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6 diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/pom.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/pom.xml new file mode 100644 index 0000000000..24b16c4bb1 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/pom.xml @@ -0,0 +1,51 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0-Beta3 + ../../../pom.xml + + + tuscany-quickstart-stripes + maven-archetype + Create a simple Apache Tuscany SCA webapp project using the Stripes Web Framework + Create a simple Apache Tuscany SCA webapp project using the Stripes Web Framework + + + + + org.apache.maven.archetype + archetype-packaging + 2.0-alpha-4 + + + + + maven-archetype-plugin + 2.0-alpha-4 + true + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/META-INF/maven/archetype-metadata.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000000..f15a12fb88 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,44 @@ + + + + + + src/main/java + + **/*.java + + + + src/main/webapp + + **/*.jsp + **/*.xml + **/*.html + **/*.composite + + + + src/main/resources + + **/*.properties + + + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/META-INF/maven/archetype.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/META-INF/maven/archetype.xml new file mode 100644 index 0000000000..b5295d8a73 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/META-INF/maven/archetype.xml @@ -0,0 +1,38 @@ + + + + quickstart-stripes + + src/main/java/sample/stripes/action/BaseActionBean.java + src/main/java/sample/stripes/action/HomeActionBean.java + src/main/java/sample/sca/HelloworldService.java + src/main/java/sample/sca/HelloworldServiceImpl.java + + + src/main/resources/log4j.properties + src/main/resources/StripesResources.properties + src/main/webapp/index.html + src/main/webapp/WEB-INF/jsp/home.jsp + src/main/webapp/WEB-INF/jsp/layout.jsp + src/main/webapp/WEB-INF/jsp/taglibs.jsp + src/main/webapp/WEB-INF/web.composite + src/main/webapp/WEB-INF/web.xml + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/pom.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000000..2fdff7a031 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,124 @@ + + + + + 4.0.0 + ${groupId} + ${project.artifactId} + war + ${project.version} + #literal() + quickstart-stripes + + + + + + + org.apache.tuscany.sca + tuscany-sca-api + ${tuscany.version} + + + org.apache.tuscany.sca + tuscany-stripes + ${tuscany.version} + + + + + net.sourceforge.stripes + stripes + ${stripes.version} + + + taglibs + standard + 1.1.2 + + + + + + install + ${project.artifactId} + + + false + src/main/resources + + + false + src/main/java + + ** + + + **/*.java + + + + + + false + src/test/java + + ** + + + **/*.java + + + + + + true + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + true + true + + + + org.mortbay.jetty + maven-jetty-plugin + ${jetty.version} + + + org.apache.maven.plugins + maven-eclipse-plugin + + true + + + + + + 2.0-Beta3 + 1.5.2 + 6.1.4 + + #end + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/sca/HelloworldService.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/sca/HelloworldService.java new file mode 100644 index 0000000000..d6cb7bbcf2 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/sca/HelloworldService.java @@ -0,0 +1,28 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 ${package}.sca; + +public interface HelloworldService { + + String sayHello(String name); + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/sca/HelloworldServiceImpl.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/sca/HelloworldServiceImpl.java new file mode 100644 index 0000000000..390b424d24 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/sca/HelloworldServiceImpl.java @@ -0,0 +1,31 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 ${package}.sca; + + +public class HelloworldServiceImpl implements HelloworldService { + + public String sayHello(String name) { + return "Hello " + name; + } + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/stripes/action/BaseActionBean.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/stripes/action/BaseActionBean.java new file mode 100644 index 0000000000..5bfa1c5d32 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/stripes/action/BaseActionBean.java @@ -0,0 +1,36 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 ${package}.stripes.action; + +import net.sourceforge.stripes.action.ActionBean; +import net.sourceforge.stripes.action.ActionBeanContext; + +public class BaseActionBean implements ActionBean { + private ActionBeanContext context; + + public ActionBeanContext getContext() { + return context; + } + public void setContext(ActionBeanContext context) { + this.context = context; + } +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/stripes/action/HomeActionBean.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/stripes/action/HomeActionBean.java new file mode 100644 index 0000000000..05fd743841 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/java/stripes/action/HomeActionBean.java @@ -0,0 +1,48 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +/* + * 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 ${package}.stripes.action; + +import net.sourceforge.stripes.action.DefaultHandler; +import net.sourceforge.stripes.action.ForwardResolution; +import net.sourceforge.stripes.action.Resolution; +import net.sourceforge.stripes.action.UrlBinding; + +import org.oasisopen.sca.annotation.Reference; + +import ${package}.sca.HelloworldService; + +@UrlBinding("/Home.htm") +public class HomeActionBean extends BaseActionBean { + + @Reference + HelloworldService service; + + @DefaultHandler + public Resolution view() { + return new ForwardResolution("/WEB-INF/jsp/home.jsp"); + } + + public String getHello() { + return service.sayHello("world"); + } + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/resources/StripesResources.properties b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/resources/StripesResources.properties new file mode 100644 index 0000000000..6567f21ce1 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/resources/StripesResources.properties @@ -0,0 +1,77 @@ +# +# 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. +# + +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + +${symbol_pound} Resource strings used by the tag when there are no nested tags +stripes.errors.header=

Please fix the following errors:
    +stripes.errors.beforeError=
  1. +stripes.errors.afterError=
  2. +stripes.errors.footer=
+ +${symbol_pound} Resource strings used by the tag when displaying errors for a +${symbol_pound} specific field (e.g. ). If not supplied the +${symbol_pound} values above will be used instead. +stripes.fieldErrors.header= +stripes.fieldErrors.beforeError= +stripes.fieldErrors.afterError=
+stripes.fieldErrors.footer= + +${symbol_pound} Resource strings used by the stripes:messages tag +stripes.messages.header=
    +stripes.messages.beforeMessage=
  • +stripes.messages.afterMessage=
  • +stripes.messages.footer=
+ +${symbol_pound} Validation error messages produced by Stripes' built-in converter classes. These +${symbol_pound} are default error messages and can be overridden on per-field and per-form levels. +${symbol_pound} Using the 'invalidNumber' error for a field 'age' of a form posting to +${symbol_pound} '/user/Profile.action', the keys looked for (in order) would be: +${symbol_pound} 1: /user/Profile.action.age.invalidNumber +${symbol_pound} 2: /user/Profile.action.age.errorMessage +${symbol_pound} 3: age.errorMessage +${symbol_pound} 4: /user/Profile.action.invalidNumber +${symbol_pound} 5: converter.number.invalidNumber +converter.number.invalidNumber=The value ({1}) entered in field {0} must be a valid number +converter.byte.outOfRange=The value ({1}) entered in field {0} was out of the range {2} to {3} +converter.short.outOfRange=The value ({1}) entered in field {0} was out of the range {2} to {3} +converter.integer.outOfRange=The value ({1}) entered in field {0} was out of the range {2} to {3} +converter.float.outOfRange=The value ({1}) entered in field {0} was out of the range {2} to {3} +converter.enum.notAnEnumeratedValue=The value "{1}" is not a valid value for field {0} +converter.date.invalidDate=The value ({1}) entered in field {0} must be a valid date +converter.email.invalidEmail=The value ({1}) entered is not a valid email address +converter.creditCard.invalidCreditCard=The value ({1}) entered is not a valid credit card number + +${symbol_pound} Validation error messages produced by Stripes' annotation based validations. These +${symbol_pound} are default error messages and can be overridden on per-field and per-form levels. +${symbol_pound} Using the 'valueNotPresent' required field error for a field 'username' of a form +${symbol_pound} posting to '/user/Register.action', the keys looked for (in order) would be: +${symbol_pound} 1: /user/Register.action.username.valueNotPresent +${symbol_pound} 2: /user/Register.action.username.errorMessage +${symbol_pound} 3: username.errorMessage +${symbol_pound} 4: /user/Register.action.valueNotPresent +${symbol_pound} 5: validation.required.valueNotPresent +validation.required.valueNotPresent={0} is a required field +validation.minlength.valueTooShort={0} must be at least {2} characters long +validation.maxlength.valueTooLong={0} must be no more than {2} characters long +validation.minvalue.valueBelowMinimum=The minimum allowed value for {0} is {2} +validation.maxvalue.valueAboveMaximum=The maximum allowed value for {0} is {2} +validation.mask.valueDoesNotMatch={1} is not a valid {0} +validation.expression.valueFailedExpression=The value supplied ({1}) for field {0} is invalid +validation.file.postBodyTooBig=Total upload size of {3} KB exceeds the maximum size of {2} KB diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/resources/log4j.properties b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/resources/log4j.properties new file mode 100644 index 0000000000..e2fd1997c8 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/resources/log4j.properties @@ -0,0 +1,51 @@ +# +# 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. +# + +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +${symbol_pound} log4j.properties + +${symbol_pound} Set up a logger to the console +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=[%d{HH:mm:ss}] %-5p %c %x - %m%n + +${symbol_pound} Use this to only see log messages beyond a certain threshold in the console +${symbol_pound}log4j.appender.stdout.Threshold=WARN + +${symbol_pound} Set up a logger to a log file +log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender +log4j.appender.logfile.layout=org.apache.log4j.PatternLayout +log4j.appender.logfile.layout.ConversionPattern=[%d{HH:mm:ss}] %-5p %c %x - %m%n +log4j.appender.logfile.File=${symbol_dollar}{user.home}/stripesquick.log +log4j.appender.logfile.DatePattern='.'yyyy-MM-dd + +${symbol_pound} Use this to only see log messages beyond a certain threshold in the log file +${symbol_pound}log4j.appender.logfile.Threshold=WARN + +${symbol_pound} Logger settings +log4j.rootLogger=INFO, stdout, logfile + +${symbol_pound} Valid levels are TRACE, DEBUG, INFO, WARN, ERROR, FATAL +${symbol_pound} Change to TRACE or DEBUG to see more log messages +log4j.logger.net.sourceforge.stripes=WARN +log4j.logger.org.stripesbook.quickstart=INFO +log4j.logger.org.mortbay.log=INFO +log4j.logger.org=WARN +log4j.logger.com=WARN +log4j.logger.net=WARN diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jsp/home.jsp b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jsp/home.jsp new file mode 100644 index 0000000000..59cdacfe23 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jsp/home.jsp @@ -0,0 +1,29 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +<%-- + * 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. +--%> +<%@ include file="/WEB-INF/jsp/taglibs.jsp" %> + + + +

sayHello returns: ${symbol_dollar}{actionBean.hello}

+

Congratulations, you've set up a Stripes SCA project!

+
+
diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jsp/layout.jsp b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jsp/layout.jsp new file mode 100644 index 0000000000..0964d2fb7b --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jsp/layout.jsp @@ -0,0 +1,42 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +<%-- + * 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. +--%> +<%@ include file="/WEB-INF/jsp/taglibs.jsp" %> + + + + + + + ${symbol_dollar}{title} + + + + + +
+ + +
+ + + +
\ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jsp/taglibs.jsp b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jsp/taglibs.jsp new file mode 100644 index 0000000000..6452b1bd9c --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/jsp/taglibs.jsp @@ -0,0 +1,32 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +<%-- + * 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. +--%> +<%-- Stripes TLD --%> +<%@ taglib prefix="s" uri="http://stripes.sourceforge.net/stripes.tld" %> +<%@ taglib prefix="sdyn" uri="http://stripes.sourceforge.net/stripes-dynattr.tld" %> + +<%-- JSTL TLDs --%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> + +<%-- This is so that you can conveniently refer to the context path with ${symbol_dollar}{contextPath} --%> + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite new file mode 100644 index 0000000000..f98b7f2721 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..d73e7311d6 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,68 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + + ${artifactId} + + + org.apache.tuscany.sca.host.webapp.TuscanyContextListener + + + + StripesFilter + net.sourceforge.stripes.controller.StripesFilter + + ActionResolver.Packages + ${package}.stripes.action + + + Extension.Packages + org.apache.tuscany.sca.stripes + + + + + DispatcherServlet + net.sourceforge.stripes.controller.DispatcherServlet + 1 + + + + StripesFilter + DispatcherServlet + REQUEST + FORWARD + + + + DispatcherServlet + *.htm + + + + index.html + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/index.html b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/index.html new file mode 100644 index 0000000000..a350f1e68a --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart-stripes/src/main/resources/archetype-resources/src/main/webapp/index.html @@ -0,0 +1,27 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) + + + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/META-INF/MANIFEST.MF b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..29e03eb396 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/META-INF/MANIFEST.MF @@ -0,0 +1,11 @@ +Manifest-Version: 1.0 +Bundle-Name: Apache Tuscany SCA Quickstart Archetype +Created-By: 1.6.0_07 (Sun Microsystems Inc.) +Bundle-Vendor: The Apache Software Foundation +Bundle-Version: 2.0.0 +Bundle-ManifestVersion: 2 +Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt +Bundle-Description: Apache Tuscany SCA Quickstart Archetype +Bundle-SymbolicName: org.apache.tuscany.sca.archetype.quickstart +Bundle-DocURL: http://www.apache.org/ +Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6 diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/pom.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/pom.xml new file mode 100644 index 0000000000..21a639d9bd --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/pom.xml @@ -0,0 +1,51 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0-Beta3 + ../../../pom.xml + + + tuscany-quickstart + maven-archetype + Create a simple Apache Tuscany SCA webapp project + Create a simple Apache Tuscany SCA webapp project + + + + + org.apache.maven.archetype + archetype-packaging + 2.0-alpha-4 + + + + + maven-archetype-plugin + 2.0-alpha-4 + true + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000000..c132fa0364 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,42 @@ + + + + + + Y + + + + + src/main/java + + **/*.java + + + + src/main/webapp + + **/*.jsp + **/*.xml + **/*.composite + + + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/META-INF/maven/archetype.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/META-INF/maven/archetype.xml new file mode 100644 index 0000000000..7794570626 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/META-INF/maven/archetype.xml @@ -0,0 +1,31 @@ + + + + tuscany-quickstart + + src/main/java/HelloworldImpl.java + src/main/java/HelloworldService.java + + + src/main/webapp/hello.jsp + src/main/webapp/WEB-INF/web.composite + src/main/webapp/WEB-INF/web.xml + + \ No newline at end of file diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000000..ff17d9baa5 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,139 @@ + + + + + 4.0.0 + ${groupId} + ${artifactId} + war + ${version} + quickstart + + + + + org.apache.tuscany.sca + tuscany-sca-api + ${tuscany.version} + provided + + + + org.apache.tuscany.sca + tuscany-base-runtime + ${tuscany.version} +#if( $includeTuscanyRuntime == "Y") + runtime +#else + provided +#end + + + + + junit + junit + 4.8.1 + test + + + + + org.mortbay.jetty + jetty + ${jetty.version} + provided + + + org.mortbay.jetty + jetty-util + ${jetty.version} + provided + + + org.mortbay.jetty + jetty-management + ${jetty.version} + provided + + + + install + ${project.artifactId} + + + false + src/main/resources + + + false + src/main/java + + ** + + + **/*.java + + + + + + false + src/test/java + + ** + + + **/*.java + + + + + + true + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + true + true + + + + org.mortbay.jetty + maven-jetty-plugin + ${jetty.version} + + + org.apache.maven.plugins + maven-eclipse-plugin + + true + + + + + + 2.0-Beta3 + 6.1.18 + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java new file mode 100644 index 0000000000..df80303778 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java @@ -0,0 +1,27 @@ +/* + * 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 ${package}; + +public class HelloworldImpl implements HelloworldService { + + public String sayHello(String name) { + return "Hello " + name; + } + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldService.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldService.java new file mode 100644 index 0000000000..47501efb9a --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldService.java @@ -0,0 +1,25 @@ +/* + * 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 ${package}; + +public interface HelloworldService { + + String sayHello(String name); + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite new file mode 100644 index 0000000000..8d840b7867 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..a7c7d2251e --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,43 @@ + + + + + ${artifactId} + +#if($includeTuscanyRuntime == "Y") + + tuscany.${artifactId} + org.apache.tuscany.sca.host.webapp.TuscanyServletFilter + + + + tuscany.${artifactId} + /* + + +#end + + hello.jsp + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/hello.jsp b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/hello.jsp new file mode 100644 index 0000000000..9729ca6823 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/hello.jsp @@ -0,0 +1,36 @@ +<%-- + * 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. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ taglib uri="http://www.osoa.org/sca/sca_jsp.tld" prefix="sca" %> + + + + + + +

${artifactId}

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

+ + <%= service.sayHello("world") %> + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/LICENSE b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/LICENSE new file mode 100644 index 0000000000..6e529a25c4 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/LICENSE @@ -0,0 +1,205 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed 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. + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/NOTICE b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/NOTICE new file mode 100644 index 0000000000..f6ce2542c3 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/NOTICE @@ -0,0 +1,6 @@ +${pom.name} +Copyright (c) 2005 - 2011 The Apache Software Foundation + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/README b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/README new file mode 100644 index 0000000000..c9c7c0ec85 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/README @@ -0,0 +1,21 @@ +This module is a Maven plugin for starting a Tuscany runtime which runs the project as an SCA contribution. + +To configure the project add the following to the SCA contribution's pom.xml: + + + ... + + + org.apache.tuscany.sca + tuscany-maven-plugin + + ... + + + +To run the contribution in Tuscany use "mvn tuscany:run" + +Optional parameters are: + config - uri string to configure the Tuscany runtime + contributions - additional SCA contributions to install along with the project contribution + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/pom.xml b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/pom.xml new file mode 100644 index 0000000000..e7f9231ef4 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/pom.xml @@ -0,0 +1,109 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + ../../pom.xml + 2.0-Beta3 + + + tuscany-maven-plugin + maven-plugin + Apache Tuscany Maven Tuscany Plugin + 2.0-Beta3 + + + + org.apache.maven + maven-project + 2.0.3 + + + org.apache.maven + maven-plugin-api + 2.0.3 + + + org.apache.maven + maven-artifact + 2.0.3 + + + org.apache.tuscany.sca + tuscany-base-runtime + 2.0-Beta3 + + + org.apache.tuscany.sca + tuscany-domain-hazelcast + 2.0-Beta3 + + + jline + jline + 0.9.95-huynhjl + + + org.mortbay.jetty + jetty + 6.1.19 + + + org.mortbay.jetty + servlet-api + + + + + org.apache.tomcat + tomcat-servlet-api + 7.0.8 + + + org.apache.tomcat.embed + tomcat-embed-core + 7.0.8 + + + org.apache.tomcat.embed + tomcat-embed-logging-juli + 7.0.8 + + + org.apache.tomcat.embed + tomcat-embed-jasper + 7.0.8 + + + org.apache.tomcat + tomcat-jasper-el + 7.0.8 + + + org.eclipse.jdt.core.compiler + ecj + 3.5.1 + + + + + diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java new file mode 100644 index 0000000000..1f4effcaf1 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyRunMojo.java @@ -0,0 +1,251 @@ +/* + * 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 org.apache.tuscany.maven.plugin; + +import java.io.File; +import java.lang.reflect.Method; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLClassLoader; +import java.util.ArrayList; +import java.util.List; + +import javax.servlet.ServletException; + +import org.apache.catalina.LifecycleException; +import org.apache.catalina.core.AprLifecycleListener; +import org.apache.catalina.core.StandardServer; +import org.apache.catalina.startup.Tomcat; +import org.apache.maven.artifact.Artifact; +import org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.project.MavenProject; +import org.apache.tuscany.sca.shell.Shell; + +/** + * Maven Mojo to run the Tuscany Shell and install the project as an SCA contribution. + * + * Invoked with "mvn tuscany:run" + * + * @goal run + * @requiresDependencyResolution runtime + * @execute phase="test-compile" + * @description Runs Tuscany directly from a SCA conribution maven project + */ +public class TuscanyRunMojo extends AbstractMojo { + + /** + * The maven project. + * + * @parameter expression="${project}" + * @required + * @readonly + */ + private MavenProject project; + + /** + * The project artifactId. + * + * @parameter expression="${project.artifactId}" + * @required + */ + protected String artifactId; + + /** + * The project packaging. + * + * @parameter expression=".${project.packaging}" + * @required + */ + protected String packaging; + + /** + * The project build output directory + * + * @parameter expression="${project.build.outputDirectory}" + * @required + */ + protected File buildDirectory; + + /** + * The project build output directory + * + * @parameter expression="${project.build.finalName}" + * @required + */ + protected File finalName; + + /** + * @parameter expression="${domainURI}" default-value="uri:default" + */ + private String domainURI; + + /** + * @parameter expression="${nodeConfig}" + */ + private String nodeConfig; + + /** + * @parameter expression="${contributions}" + */ + private String[] contributions; + + /** + * @parameter expression="${mainClass}" + */ + private String mainClass; + + /** + * @parameter expression="${arguments}" + */ + private String[] arguments; + + public void execute() throws MojoExecutionException, MojoFailureException { + if (mainClass != null) { + executeMainMethod(); + } else if (".war".equals(packaging)) { + try { + executeTomcat(); + } catch (Exception e) { + throw new MojoExecutionException("Exception running Tuscany/Tomcat", e); + } + } else { + executeShell(); + } + } + + private void executeTomcat() throws ServletException, LifecycleException, MalformedURLException { + getLog().info("Starting Tuscany/Tomcat..."); + + Tomcat tomcat = new Tomcat(); + tomcat.setPort(8080); + + tomcat.setBaseDir("target"); + String appBase = "../src/main/webapp"; + tomcat.getHost().setAppBase("."); + String contextPath = "/" + artifactId; + + StandardServer server = (StandardServer)tomcat.getServer(); + server.setParentClassLoader(getMainClassLoader()); + AprLifecycleListener listener = new AprLifecycleListener(); + server.addLifecycleListener(listener); + + tomcat.addWebapp(contextPath, appBase); + tomcat.start(); + tomcat.getServer().await(); + } + + private void executeShell() throws MojoExecutionException { + getLog().info("Starting Tuscany Shell..."); + + List contributionList = new ArrayList(); + + addProjectContribution(contributionList); + + addAdditionalContributions(contributionList); + + contributionList.add(0, "-help"); + contributionList.add(0, domainURI); + + try { + Shell.main(contributionList.toArray(new String[contributionList.size()])); + } catch (Exception e) { + throw new MojoExecutionException("Exception in Shell", e); + } + + getLog().info("Tuscany Shell stopped."); + } + + private void addAdditionalContributions(List contributionList) throws MojoExecutionException { + if (contributions != null) { + for (String s : contributions) { + if (new File(s).exists()) { + contributionList.add(s); + } else { + boolean found = false; + for (Object o : project.getDependencyArtifacts()) { + Artifact a = (Artifact) o; + if (a.getId().startsWith(s)) { + try { + contributionList.add(a.getFile().toURI().toURL().toString()); + } catch (MalformedURLException e) { + throw new MojoExecutionException("", e); + } + found = true; + break; + } + } + if (!found) { + throw new IllegalArgumentException("Contribution not found as file or dependency: " + s); + } + } + } + } + } + + protected void addProjectContribution(List cs) throws MojoExecutionException { + try { + + File contributionFile = new File(buildDirectory.getParent(), finalName.getName()); + if (!contributionFile.exists()) { + contributionFile = new File(buildDirectory.getParent(), "classes"); + } + if (!contributionFile.exists()) { + contributionFile = new File(buildDirectory.getParent(), finalName.getName() + packaging); + } + + String contribution = contributionFile.toURI().toURL().toString(); + getLog().info("Project contribution: " + contribution); + cs.add(contribution); + + } catch (MalformedURLException e) { + throw new MojoExecutionException("", e); + } + } + + public void executeMainMethod() throws MojoExecutionException, MojoFailureException { + getLog().info("Invoking " + mainClass + " class main method..."); + + if (arguments == null) { + arguments = new String[0]; + } + + try { + Method main = getMainClassLoader().loadClass(mainClass).getMethod("main", new Class[] {String[].class}); + main.invoke(main, new Object[] {arguments}); + } catch (NoSuchMethodException e) { + throw new MojoExecutionException("The specified mainClass doesn't contain a main method with appropriate signature", e); + } catch (Exception e) { + throw new MojoExecutionException("exception invoking main method", e); + } + } + + private ClassLoader getMainClassLoader() throws MalformedURLException { + ClassLoader parent = Thread.currentThread().getContextClassLoader(); + List classPathEntries = new ArrayList(); + classPathEntries.add(new File(project.getBuild().getOutputDirectory()).toURI().toURL()); + for (Object o : project.getRuntimeArtifacts()) { + Artifact a = (Artifact) o; + classPathEntries.add( a.getFile().toURI().toURL() ); + } + return new URLClassLoader((URL[])classPathEntries.toArray(new URL[]{}), parent ); + } + +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyShellMojo.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyShellMojo.java new file mode 100644 index 0000000000..6d7c4f656a --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyShellMojo.java @@ -0,0 +1,76 @@ +/* + * 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 org.apache.tuscany.maven.plugin; + +import java.util.ArrayList; +import java.util.List; +import java.util.StringTokenizer; + +import org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugin.MojoFailureException; +import org.apache.tuscany.sca.shell.Shell; + +/** + * Maven Mojo to run the Tuscany Shell + * + * Invoked with mvn org.apache.tuscany.maven.plugin:maven-tuscany-plugins:shell [-DdomainURI=uri:myDomain] [-Dcontributions=path\to\scacontribution,...] + * + * @goal shell + * @requiresProject false + * @requiresDependencyResolution runtime + */ +public class TuscanyShellMojo extends AbstractMojo { + + /** + * @parameter expression="${domainURI}" default-value="uri:default" + */ + private String domainURI; + + /** + * @parameter expression="${contributions}" + */ + private String contributions; + + public void execute() throws MojoExecutionException, MojoFailureException { + getLog().info("Starting Tuscany Shell..."); + + String[] args; + if (contributions != null) { + List cs = new ArrayList(); + StringTokenizer st = new StringTokenizer(contributions, ","); + while (st.hasMoreTokens()) { + cs.add(st.nextToken()); + } + cs.add(0, "-help"); + cs.add(0, domainURI); + args = cs.toArray(new String[cs.size()]); + } else { + args = new String[]{domainURI}; + } + + try { + Shell.main(args); + } catch (Exception e) { + throw new MojoExecutionException("Exception in Shell", e); + } + + getLog().info("Tuscany Shell stopped."); + } +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyStartMojo.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyStartMojo.java new file mode 100644 index 0000000000..49857a8eb6 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyStartMojo.java @@ -0,0 +1,194 @@ +/* + * 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 org.apache.tuscany.maven.plugin; + +import java.io.File; +import java.net.MalformedURLException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.maven.artifact.Artifact; +import org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.project.MavenProject; +import org.apache.tuscany.sca.Node; +import org.apache.tuscany.sca.TuscanyRuntime; + +/** + * Maven Mojo to start a Tuscany runtime and install the project as an SCA + * contribution. Invoked with "mvn tuscany:start" usually from configuration in + * a module pom.xml + * + * @goal start + * @requiresDependencyResolution runtime + * @execute phase="test-compile" + * @description Start a Tuscany directly and run composites from a SCA + * conribution maven project + */ +public class TuscanyStartMojo extends AbstractMojo { + + public static Map runtimes = new HashMap(); + + /** + * The maven project. + * + * @parameter expression="${project}" + * @required + * @readonly + */ + private MavenProject project; + + /** + * The project artifactId. + * + * @parameter expression="${project.artifactId}" + * @required + */ + protected String artifactId; + + /** + * The project packaging. + * + * @parameter expression=".${project.packaging}" + * @required + */ + protected String packaging; + + /** + * The project build output directory + * + * @parameter expression="${project.build.outputDirectory}" + * @required + */ + protected File buildDirectory; + + /** + * The project build output directory + * + * @parameter expression="${project.build.finalName}" + * @required + */ + protected File finalName; + + /** + * @parameter expression="${id}" default-value="defaultId" + */ + private String id; + + /** + * @parameter expression="${domainURI}" default-value="uri:default" + */ + private String domainURI; + + /** + * @parameter expression="${nodeConfig}" + */ + private String nodeConfig; + + /** + * @parameter expression="${contributions}" + */ + private String[] contributions; + + public void execute() throws MojoExecutionException, MojoFailureException { + getLog().info("Starting Tuscany Runtime..."); + + TuscanyRuntime runtime = TuscanyRuntime.newInstance(); + runtimes.put(id, runtime); + + if (nodeConfig != null && nodeConfig.length() > 0) { + try { + runtime.createNodeFromXML(nodeConfig); + } catch (Exception e) { + throw new MojoExecutionException("Exception creating node", e); + } + } else { + List contributionList = new ArrayList(); + + addProjectContribution(contributionList); + + addAdditionalContributions(contributionList); + + Node node = runtime.createNode(domainURI); + for (String c : contributionList) { + String curi; + try { + curi = node.installContribution(null, c, null, null); + } catch (Exception e) { + throw new MojoExecutionException("Exception installing contribution", e); + } + try { + node.startDeployables(curi); + } catch (Exception e) { + throw new MojoExecutionException("Exception starting deployables for contribution " + curi, e); + } + } + } + } + + private void addAdditionalContributions(List contributionList) throws MojoExecutionException { + if (contributions != null) { + for (String s : contributions) { + if (new File(s).exists()) { + contributionList.add(s); + } else { + boolean found = false; + for (Object o : project.getDependencyArtifacts()) { + Artifact a = (Artifact)o; + if (a.getId().startsWith(s)) { + try { + contributionList.add(a.getFile().toURI().toURL().toString()); + } catch (MalformedURLException e) { + throw new MojoExecutionException("", e); + } + found = true; + break; + } + } + if (!found) { + throw new IllegalArgumentException("Contribution not found as file or dependency: " + s); + } + } + } + } + } + + protected void addProjectContribution(List cs) throws MojoExecutionException { + try { + + File contributionFile = new File(buildDirectory.getParent(), finalName.getName()); + if (!contributionFile.exists()) { + contributionFile = new File(buildDirectory.getParent(), "classes"); + } + if (!contributionFile.exists()) { + contributionFile = new File(buildDirectory.getParent(), finalName.getName() + packaging); + } + + String contribution = contributionFile.toURI().toURL().toString(); + getLog().info("Project contribution: " + contribution); + cs.add(contribution); + + } catch (MalformedURLException e) { + throw new MojoExecutionException("", e); + } + } +} diff --git a/sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyStopMojo.java b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyStopMojo.java new file mode 100644 index 0000000000..02f464619d --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta3-RC2/maven/tuscany-maven-plugin/src/main/java/org/apache/tuscany/maven/plugin/TuscanyStopMojo.java @@ -0,0 +1,59 @@ +/* + * 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 org.apache.tuscany.maven.plugin; + +import org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugin.MojoFailureException; +import org.apache.tuscany.sca.TuscanyRuntime; + +/** + * Maven Mojo to stop a Tuscany runtime that was started with the start mojo. + * + * @goal stop + * @execute phase="test-compile" + * @description Stop a Tuscany runtime that was started with the start mojo + */ +public class TuscanyStopMojo extends AbstractMojo { + + /** + * @parameter expression="${id}" default-value="defaultId" + */ + private String id; + + public void execute() throws MojoExecutionException, MojoFailureException { + if (id.length() < 1) { + // if id is set to "" then stop all runtimes + for (String id : TuscanyStartMojo.runtimes.keySet()) { + TuscanyRuntime runtime = TuscanyStartMojo.runtimes.get(id); + runtime.stop(); + getLog().info("stopped Tuscany runtime " + id); + } + TuscanyStartMojo.runtimes.clear(); + } else { + TuscanyRuntime runtime = TuscanyStartMojo.runtimes.remove(id); + if (runtime == null) { + getLog().info("No started runtime found for ID " + id); + } else { + runtime.stop(); + getLog().info("stopped Tuscany runtime " + id); + } + } + } +} -- cgit v1.2.3