From 6f41ef61af2268d5576448974ca447b597387e88 Mon Sep 17 00:00:00 2001 From: antelder Date: Tue, 16 Jun 2009 06:48:13 +0000 Subject: Create 2.0 M3 release branch git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@785089 13f79535-47bb-0310-9956-ffa450edef68 --- .../archetypes/quickstart-jsf/pom.xml | 50 +++++ .../META-INF/maven/archetype-metadata.xml | 44 ++++ .../main/resources/META-INF/maven/archetype.xml | 38 ++++ .../src/main/resources/archetype-resources/pom.xml | 153 ++++++++++++++ .../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 ++++ 13 files changed, 819 insertions(+) create mode 100644 branches/sca-java-2.0-M3/archetypes/quickstart-jsf/pom.xml create mode 100644 branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype-metadata.xml create mode 100644 branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype.xml create mode 100644 branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/pom.xml create mode 100644 branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/myfaces/HelloWorldController.java create mode 100644 branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldService.java create mode 100644 branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldServiceImpl.java create mode 100644 branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml create mode 100644 branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite create mode 100644 branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml create mode 100644 branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/helloWorld.jsp create mode 100644 branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/index.jsp create mode 100644 branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/page2.jsp (limited to 'branches/sca-java-2.0-M3/archetypes/quickstart-jsf') diff --git a/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/pom.xml b/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/pom.xml new file mode 100644 index 0000000000..32a21180a7 --- /dev/null +++ b/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/pom.xml @@ -0,0 +1,50 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0-M3-SNAPSHOT + ../../pom.xml + + + tuscany-quickstart-jsf + maven-archetype + 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/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype-metadata.xml b/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000000..01bb835c40 --- /dev/null +++ b/branches/sca-java-2.0-M3/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/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype.xml b/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/META-INF/maven/archetype.xml new file mode 100644 index 0000000000..5dd8cb4ad4 --- /dev/null +++ b/branches/sca-java-2.0-M3/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/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/pom.xml b/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000000..b378ac6b0b --- /dev/null +++ b/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,153 @@ + + + + + 4.0.0 + ${groupId} + ${artifactId} + war + ${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 + ${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-M3-SNAPSHOT + 1.5 + + #end + + diff --git a/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/myfaces/HelloWorldController.java b/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/myfaces/HelloWorldController.java new file mode 100644 index 0000000000..cea27930f7 --- /dev/null +++ b/branches/sca-java-2.0-M3/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/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldService.java b/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldService.java new file mode 100644 index 0000000000..fb7a3ecdcf --- /dev/null +++ b/branches/sca-java-2.0-M3/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/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldServiceImpl.java b/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/java/sca/HelloworldServiceImpl.java new file mode 100644 index 0000000000..c4c97dd933 --- /dev/null +++ b/branches/sca-java-2.0-M3/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/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml b/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/faces-config.xml new file mode 100644 index 0000000000..50753bc0ba --- /dev/null +++ b/branches/sca-java-2.0-M3/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/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite b/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite new file mode 100644 index 0000000000..18245e9a3f --- /dev/null +++ b/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.composite @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + diff --git a/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml b/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..b34eb6ce80 --- /dev/null +++ b/branches/sca-java-2.0-M3/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.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/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/helloWorld.jsp b/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/helloWorld.jsp new file mode 100644 index 0000000000..4a3197ec4f --- /dev/null +++ b/branches/sca-java-2.0-M3/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/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/index.jsp b/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/index.jsp new file mode 100644 index 0000000000..768aa2408b --- /dev/null +++ b/branches/sca-java-2.0-M3/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/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/page2.jsp b/branches/sca-java-2.0-M3/archetypes/quickstart-jsf/src/main/resources/archetype-resources/src/main/webapp/page2.jsp new file mode 100644 index 0000000000..1c096f66c6 --- /dev/null +++ b/branches/sca-java-2.0-M3/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 -- cgit v1.2.3