From 304329b6b06a92236d3912f2e5dbc18f6ce8aa6a Mon Sep 17 00:00:00 2001 From: antelder Date: Fri, 27 Feb 2009 13:01:17 +0000 Subject: Add the start of a Tuscany quickstart maven archetype git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@748500 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/archetypes/quickstart/META-INF/MANIFEST.MF | 11 ++ java/sca/archetypes/quickstart/pom.xml | 45 ++++++++ .../src/main/resources/META-INF/archetype.xml | 16 +++ .../src/main/resources/archetype-resources/pom.xml | 115 +++++++++++++++++++++ .../src/main/java/HelloworldImpl.java | 9 ++ .../src/main/java/HelloworldService.java | 7 ++ .../src/main/webapp/WEB-INF/web.composite | 16 +++ .../src/main/webapp/WEB-INF/web.xml | 41 ++++++++ .../archetype-resources/src/main/webapp/hello.jsp | 18 ++++ 9 files changed, 278 insertions(+) create mode 100644 java/sca/archetypes/quickstart/META-INF/MANIFEST.MF create mode 100644 java/sca/archetypes/quickstart/pom.xml create mode 100644 java/sca/archetypes/quickstart/src/main/resources/META-INF/archetype.xml create mode 100644 java/sca/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml create mode 100644 java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java create mode 100644 java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldService.java create mode 100644 java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite create mode 100644 java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml create mode 100644 java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/hello.jsp (limited to 'java/sca') diff --git a/java/sca/archetypes/quickstart/META-INF/MANIFEST.MF b/java/sca/archetypes/quickstart/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..aa9b613341 --- /dev/null +++ b/java/sca/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/ + diff --git a/java/sca/archetypes/quickstart/pom.xml b/java/sca/archetypes/quickstart/pom.xml new file mode 100644 index 0000000000..2676490854 --- /dev/null +++ b/java/sca/archetypes/quickstart/pom.xml @@ -0,0 +1,45 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-modules + 2.0-SNAPSHOT + ../../pom.xml + + + tuscany-archetype-quickstart + maven-plugin + Apache Tuscany Quickstart Archetype + + + + + false + ${basedir}/src/main/resources + + **/* + + + + + + diff --git a/java/sca/archetypes/quickstart/src/main/resources/META-INF/archetype.xml b/java/sca/archetypes/quickstart/src/main/resources/META-INF/archetype.xml new file mode 100644 index 0000000000..6ca47d2e71 --- /dev/null +++ b/java/sca/archetypes/quickstart/src/main/resources/META-INF/archetype.xml @@ -0,0 +1,16 @@ + + tuscany + + src/main/java/HelloworldImpl.java + src/main/java/HelloworldService.java + + + + src/main/webapp/hello.jsp + src/main/webapp/WEB-INF/web.xml + src/main/webapp/WEB-INF/web.composite + + \ No newline at end of file diff --git a/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml b/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000000..4a4466ac13 --- /dev/null +++ b/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,115 @@ + + + 4.0.0 + ${groupId} + ${artifactId} + war + ${version} + #literal() + quickstart + + + + + + org.apache.tuscany.sca + tuscany-sca-api + ${tuscany.version} + + + + org.apache.tuscany.sca + tuscany-implementation-web-runtime + ${tuscany.version} + runtime + + + + + junit + junit + 3.8.2 + test + + + + + org.mortbay.jetty + jetty + ${jetty.version} + provided + + + org.mortbay.jetty + jetty-util + ${jetty.version} + provided + + + org.mortbay.jetty + jetty-management + ${jetty.version} + provided + + + + + + 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 + + + org.apache.maven.plugins + maven-eclipse-plugin + + true + + + + + + 2.0-SNAPSHOT + 6.1.4 + + #end + \ No newline at end of file diff --git a/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java b/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java new file mode 100644 index 0000000000..31ae3b713a --- /dev/null +++ b/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldImpl.java @@ -0,0 +1,9 @@ +package ${packageName}; + +public class HelloworldImpl implements HelloworldService { + + public String sayHello(String name) { + return "Hello " + name; + } + +} diff --git a/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldService.java b/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldService.java new file mode 100644 index 0000000000..0540106802 --- /dev/null +++ b/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/java/HelloworldService.java @@ -0,0 +1,7 @@ +package ${packageName}; + +public interface HelloworldService { + + String sayHello(String name); + +} diff --git a/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite b/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite new file mode 100644 index 0000000000..cf877edb4f --- /dev/null +++ b/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite @@ -0,0 +1,16 @@ + + + + ${artifactId}.web"> + + + + + + + + + diff --git a/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml b/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..f2bdfe3362 --- /dev/null +++ b/java/sca/archetypes/quickstart/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/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/hello.jsp b/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/hello.jsp new file mode 100644 index 0000000000..c3ebb4386d --- /dev/null +++ b/java/sca/archetypes/quickstart/src/main/resources/archetype-resources/src/main/webapp/hello.jsp @@ -0,0 +1,18 @@ +<%@ 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") %> + + + -- cgit v1.2.3