You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by GitBox <gi...@apache.org> on 2018/06/29 11:09:18 UTC

[GitHub] struberg closed pull request #1: added vaadin examples, extended pom.xml files..

struberg closed pull request #1: added vaadin examples, extended pom.xml files..
URL: https://github.com/apache/openwebbeans-meecrowave-examples/pull/1
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/pom.xml b/pom.xml
index 152d160..a75f354 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,6 +29,8 @@
 
     <groupId>org.apache.meecrowave</groupId>
     <artifactId>meecrowave-examples</artifactId>
+    <version>1.2.2-SNAPSHOT</version>
+
     <packaging>pom</packaging>
     <name>Apache Meecrowave Examples</name>
     <description>A project showing some of the Apache Meecrowave features.</description>
@@ -36,10 +38,30 @@
     <modules>
         <module>rest-trivial</module>
         <module>rest</module>
+        <module>servlet-trivial</module>
+        <module>servlet-vaadin-v08</module>
+        <module>servlet-vaadin-v10</module>
     </modules>
 
     <properties>
         <meecrowave.version>1.2.2-SNAPSHOT</meecrowave.version>
+
+        <maven.compiler.target>1.8</maven.compiler.target>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+
+        <slf4j.version>1.7.25</slf4j.version>
+        <log4j-api.version>2.11.0</log4j-api.version>
+
+        <jacoco.version>0.8.1</jacoco.version>
+        <pitest.version>1.4.0</pitest.version>
+        <pitest-junit5-plugin.version>0.5</pitest-junit5-plugin.version>
+
+        <junit.version>4.12</junit.version>
+        <junit.jupiter.version>5.1.1</junit.jupiter.version>
+        <junit.platform.version>1.1.1</junit.platform.version>
+
     </properties>
 
     <dependencies>
@@ -49,18 +71,70 @@
             <version>${meecrowave.version}</version>
         </dependency>
 
+        <!--jUnit5-->
+
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-api</artifactId>
+            <version>${junit.jupiter.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-params</artifactId>
+            <version>${junit.jupiter.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.junit.platform</groupId>
+            <artifactId>junit-platform-launcher</artifactId>
+            <version>${junit.platform.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <!-- Only required to run tests in an IDE that bundles an older version -->
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-engine</artifactId>
+            <version>${junit.jupiter.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <!-- Only required to run tests in an IDE that bundles an older version -->
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.12</version>
+            <groupId>org.junit.vintage</groupId>
+            <artifactId>junit-vintage-engine</artifactId>
+            <version>${junit.jupiter.version}</version>
             <scope>test</scope>
         </dependency>
+
+        <!--Meecrowave-->
         <dependency>
             <groupId>org.apache.meecrowave</groupId>
             <artifactId>meecrowave-junit</artifactId>
             <version>${meecrowave.version}</version>
             <scope>test</scope>
         </dependency>
+
+        <!--Logger-->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>1.7.25</version>
+            <!--<scope>test</scope>-->
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+            <version>1.7.25</version>
+            <!--<scope>test</scope>-->
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-web</artifactId>
+            <version>2.11.0</version>
+        </dependency>
+
     </dependencies>
 
     <build>
diff --git a/rest-trivial/pom.xml b/rest-trivial/pom.xml
index addad78..296d21f 100644
--- a/rest-trivial/pom.xml
+++ b/rest-trivial/pom.xml
@@ -3,13 +3,13 @@
          xmlns="http://maven.apache.org/POM/4.0.0"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
-        <artifactId>samples</artifactId>
         <groupId>org.apache.meecrowave</groupId>
+        <artifactId>meecrowave-examples</artifactId>
         <version>1.2.2-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>samples-rest-trivial</artifactId>
-    <name>Meecrowave Samples - REST (trivial)</name>
+    <name>REST (trivial)</name>
 
 </project>
\ No newline at end of file
diff --git a/rest/pom.xml b/rest/pom.xml
index 0d27b79..6bf61b2 100644
--- a/rest/pom.xml
+++ b/rest/pom.xml
@@ -3,13 +3,13 @@
          xmlns="http://maven.apache.org/POM/4.0.0"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
-        <artifactId>samples</artifactId>
         <groupId>org.apache.meecrowave</groupId>
+        <artifactId>meecrowave-examples</artifactId>
         <version>1.2.2-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>samples-rest</artifactId>
-    <name>Meecrowave Samples - REST</name>
+    <name>REST</name>
 
 </project>
\ No newline at end of file
diff --git a/servlet-trivial/pom.xml b/servlet-trivial/pom.xml
new file mode 100644
index 0000000..faec477
--- /dev/null
+++ b/servlet-trivial/pom.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://maven.apache.org/POM/4.0.0"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <groupId>org.apache.meecrowave</groupId>
+        <artifactId>meecrowave-examples</artifactId>
+        <version>1.2.2-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>samples-servlet-trivial</artifactId>
+    <name>Servlet (trivial)</name>
+
+
+</project>
\ No newline at end of file
diff --git a/servlet-trivial/src/main/java/com/superbiz/servlet/HelloWorldServlet.java b/servlet-trivial/src/main/java/com/superbiz/servlet/HelloWorldServlet.java
new file mode 100644
index 0000000..4598bca
--- /dev/null
+++ b/servlet-trivial/src/main/java/com/superbiz/servlet/HelloWorldServlet.java
@@ -0,0 +1,49 @@
+/*
+ * 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 com.superbiz.servlet;
+
+import javax.inject.Inject;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+
+/**
+ * request with curl would look like
+ * <p>
+ * http://localhost:8080/?value=HalloNase
+ */
+@WebServlet("/*")
+public class HelloWorldServlet extends HttpServlet {
+
+
+    @Inject private UpperCaseService service;
+
+    public void doGet(HttpServletRequest request,
+                      HttpServletResponse response)
+        throws IOException {
+        response.setContentType("text/plain; charset=utf-8");
+
+        String value = request.getParameter("value");
+
+        response.getWriter().println(service.upperCase(value));
+    }
+}
diff --git a/servlet-trivial/src/main/java/com/superbiz/servlet/UpperCaseService.java b/servlet-trivial/src/main/java/com/superbiz/servlet/UpperCaseService.java
new file mode 100644
index 0000000..e4e00e5
--- /dev/null
+++ b/servlet-trivial/src/main/java/com/superbiz/servlet/UpperCaseService.java
@@ -0,0 +1,29 @@
+/*
+ * 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 com.superbiz.servlet;
+
+import javax.enterprise.context.Dependent;
+
+@Dependent
+public class UpperCaseService {
+
+    public String upperCase(String txt) {
+        return txt.toUpperCase();
+    }
+}
diff --git a/servlet-trivial/src/main/resources/WEB-INF/beans.xml b/servlet-trivial/src/main/resources/WEB-INF/beans.xml
new file mode 100644
index 0000000..bc3bf81
--- /dev/null
+++ b/servlet-trivial/src/main/resources/WEB-INF/beans.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+<beans
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+                      http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
+    bean-discovery-mode="all">
+
+</beans>
\ No newline at end of file
diff --git a/servlet-trivial/src/test/java/junit/com/superbiz/servlet/HelloWorldServletTest.java b/servlet-trivial/src/test/java/junit/com/superbiz/servlet/HelloWorldServletTest.java
new file mode 100644
index 0000000..b5e61e5
--- /dev/null
+++ b/servlet-trivial/src/test/java/junit/com/superbiz/servlet/HelloWorldServletTest.java
@@ -0,0 +1,53 @@
+/*
+ * 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 junit.com.superbiz.servlet;
+
+import org.apache.meecrowave.junit.MeecrowaveRule;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.ClientBuilder;
+
+import static javax.ws.rs.core.MediaType.APPLICATION_JSON_TYPE;
+import static org.junit.Assert.assertEquals;
+
+
+public class HelloWorldServletTest {
+
+    @Rule // started once for the class, @Rule would be per method
+    public final MeecrowaveRule rule = new MeecrowaveRule();
+
+    @Test
+    public void test001() {
+        final Client client = ClientBuilder.newClient();
+        try {
+            assertEquals("HALLONASE", client.target("http://127.0.0.1:" + rule.getConfiguration().getHttpPort())
+                                            .queryParam("value", "HalloNase")
+                                            .request(APPLICATION_JSON_TYPE)
+                                            .get(String.class)
+                                            .trim());
+        } catch (Exception e) {
+            Assert.fail(e.getMessage());
+        } finally {
+            client.close();
+        }
+    }
+}
diff --git a/servlet-trivial/src/test/java/junit/com/superbiz/servlet/UpperCaseServiceTest.java b/servlet-trivial/src/test/java/junit/com/superbiz/servlet/UpperCaseServiceTest.java
new file mode 100644
index 0000000..1dd1677
--- /dev/null
+++ b/servlet-trivial/src/test/java/junit/com/superbiz/servlet/UpperCaseServiceTest.java
@@ -0,0 +1,32 @@
+/*
+ * 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 junit.com.superbiz.servlet;
+
+
+import com.superbiz.servlet.UpperCaseService;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class UpperCaseServiceTest {
+
+    @Test
+    public void test001() {
+        Assert.assertEquals("HALLO", new UpperCaseService().upperCase("hallo"));
+    }
+}
diff --git a/servlet-vaadin-v08/pom.xml b/servlet-vaadin-v08/pom.xml
new file mode 100644
index 0000000..cec6067
--- /dev/null
+++ b/servlet-vaadin-v08/pom.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://maven.apache.org/POM/4.0.0"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <groupId>org.apache.meecrowave</groupId>
+        <artifactId>meecrowave-examples</artifactId>
+        <version>1.2.2-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>samples-servlet-vaadin-v08</artifactId>
+    <name>Servlet (Vaadin - V08)</name>
+
+    <dependencyManagement>
+        <dependencies>
+            <!--Vaadin -->
+            <dependency>
+                <groupId>com.vaadin</groupId>
+                <artifactId>vaadin-bom</artifactId>
+                <version>8.4.2</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+
+        <!--Vaadin -->
+        <dependency>
+            <groupId>com.vaadin</groupId>
+            <artifactId>vaadin-server</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.vaadin</groupId>
+            <artifactId>vaadin-themes</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.vaadin</groupId>
+            <artifactId>vaadin-client-compiled</artifactId>
+        </dependency>
+
+    </dependencies>
+
+</project>
\ No newline at end of file
diff --git a/servlet-vaadin-v08/src/main/java/com/superbiz/servlet/vaadin/HelloVaadin.java b/servlet-vaadin-v08/src/main/java/com/superbiz/servlet/vaadin/HelloVaadin.java
new file mode 100644
index 0000000..e364576
--- /dev/null
+++ b/servlet-vaadin-v08/src/main/java/com/superbiz/servlet/vaadin/HelloVaadin.java
@@ -0,0 +1,61 @@
+/*
+ * 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 com.superbiz.servlet.vaadin;
+
+import com.vaadin.annotations.VaadinServletConfiguration;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.server.VaadinServlet;
+import com.vaadin.ui.*;
+
+import javax.servlet.annotation.WebServlet;
+
+
+public class HelloVaadin {
+
+    public static class MyUI extends UI {
+
+        /**
+         * Start editing here to create your
+         * POC based on a Vaadin App.
+         * To start the app, -> start the main Method.
+         * <p>
+         * You will see in the logĀ“s the randomly used port.
+         *
+         * @param request that is created by the first request to init the app
+         */
+        @Override
+        protected void init(VaadinRequest request) {
+
+            //create the components you want to use
+            // and set the main component with setContent(..)
+            final Layout layout = new VerticalLayout();
+            layout
+                .addComponent(new Button("click me",
+                                         event -> layout.addComponents(new Label("clicked again"))
+                ));
+
+            //set the main Component
+            setContent(layout);
+        }
+
+        @WebServlet("/*")
+        @VaadinServletConfiguration(productionMode = false, ui = MyUI.class)
+        public static class MyProjectServlet extends VaadinServlet { }
+    }
+}
diff --git a/servlet-vaadin-v08/src/main/resources/WEB-INF/beans.xml b/servlet-vaadin-v08/src/main/resources/WEB-INF/beans.xml
new file mode 100644
index 0000000..bc3bf81
--- /dev/null
+++ b/servlet-vaadin-v08/src/main/resources/WEB-INF/beans.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+<beans
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+                      http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
+    bean-discovery-mode="all">
+
+</beans>
\ No newline at end of file
diff --git a/servlet-vaadin-v10/pom.xml b/servlet-vaadin-v10/pom.xml
new file mode 100644
index 0000000..552b02a
--- /dev/null
+++ b/servlet-vaadin-v10/pom.xml
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://maven.apache.org/POM/4.0.0"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <groupId>org.apache.meecrowave</groupId>
+        <artifactId>meecrowave-examples</artifactId>
+        <version>1.2.2-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>samples-servlet-vaadin-v10</artifactId>
+    <name>Servlet (Vaadin - V10)</name>
+
+
+    <properties>
+        <transpilation.output>${project.build.directory}/build</transpilation.output>
+        <vaadin.version>10.0.1</vaadin.version>
+    </properties>
+
+    <pluginRepositories>
+        <pluginRepository>
+            <id>vaadin-prereleases</id>
+            <url>https://maven.vaadin.com/vaadin-prereleases</url>
+        </pluginRepository>
+    </pluginRepositories>
+
+    <repositories>
+        <!--Releases-->
+        <repository>
+            <id>vaadin-addons</id>
+            <url>http://maven.vaadin.com/vaadin-addons</url>
+        </repository>
+
+        <!--Pre-Releases-->
+        <repository>
+            <id>vaadin-prereleases</id>
+            <url>http://maven.vaadin.com/vaadin-prereleases</url>
+        </repository>
+    </repositories>
+
+
+    <dependencyManagement>
+        <dependencies>
+            <!--Vaadin -->
+            <dependency>
+                <groupId>com.vaadin</groupId>
+                <artifactId>vaadin-bom</artifactId>
+                <version>${vaadin.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <!--Vaadin -->
+        <dependency>
+            <groupId>com.vaadin</groupId>
+            <artifactId>vaadin-core</artifactId>
+        </dependency>
+    </dependencies>
+
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>com.vaadin</groupId>
+                <artifactId>vaadin-maven-plugin</artifactId>
+                <version>${vaadin.version}</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>copy-production-files</goal>
+                            <goal>package-for-production</goal>
+                        </goals>
+                        <configuration>
+                            <transpileOutputDirectory>${transpilation.output}</transpileOutputDirectory>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <version>3.1.0</version>
+                <configuration>
+                    <webResources>
+                        <resource>
+                            <directory>${transpilation.output}</directory>
+                        </resource>
+                    </webResources>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/servlet-vaadin-v10/src/main/java/com/superbiz/servlet/vaadin/HelloVaadinV10.java b/servlet-vaadin-v10/src/main/java/com/superbiz/servlet/vaadin/HelloVaadinV10.java
new file mode 100644
index 0000000..1c38be8
--- /dev/null
+++ b/servlet-vaadin-v10/src/main/java/com/superbiz/servlet/vaadin/HelloVaadinV10.java
@@ -0,0 +1,41 @@
+/*
+ * 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 com.superbiz.servlet.vaadin;
+
+import com.vaadin.flow.component.Composite;
+import com.vaadin.flow.component.button.Button;
+import com.vaadin.flow.component.html.Div;
+import com.vaadin.flow.component.html.Label;
+import com.vaadin.flow.component.orderedlayout.VerticalLayout;
+import com.vaadin.flow.router.Route;
+
+@Route("")
+public class HelloVaadinV10 extends Composite<Div> {
+
+    public HelloVaadinV10() {
+        final VerticalLayout layout = new VerticalLayout();
+        layout
+            .add(new Button("click me",
+                            event -> layout.add(new Label("clicked again"))
+            ));
+        //set the main Component
+        getContent().add(layout);
+
+    }
+}


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services