]> source.dussan.org Git - vaadin-framework.git/commitdiff
Server integration fix 3 (#8442)
authorIlia Motornyi <elmot@vaadin.com>
Thu, 9 Feb 2017 07:26:19 +0000 (09:26 +0200)
committerHenri Sara <henri.sara@gmail.com>
Thu, 9 Feb 2017 07:26:19 +0000 (09:26 +0200)
* Fix JBoss 6 integration test
* Fixes for Karaf (build self-contained WAB)

test/servlet-containers/generic/pom.xml
test/servlet-containers/generic/src/main/java/com/vaadin/tests/IntegrationTestUIProvider.java
test/servlet-containers/generic/src/main/java/com/vaadin/tests/JSR356Servlet.java [new file with mode: 0644]
test/servlet-containers/generic/src/main/java/com/vaadin/tests/ServerIntegrationTestServlet.java [new file with mode: 0644]
tests/screenshots

index 8ff752483c611ffb37f84ca5559859ab984901e9..4c1c9b829247f2010c603b9ca4b784674d74556d 100644 (file)
@@ -11,6 +11,9 @@
     <artifactId>vaadin-test-generic-integration</artifactId>
     <name>vaadin-test-generic-integration</name>
     <packaging>war</packaging>
+    <properties>
+        <osgi.bundle.version>8.0.0</osgi.bundle.version>
+    </properties>
 
     <dependencies>
 
         </dependency>
         <dependency>
             <groupId>com.vaadin</groupId>
-            <artifactId>vaadin-push</artifactId>
+            <artifactId>vaadin-compatibility-themes</artifactId>
         </dependency>
         <dependency>
             <groupId>com.vaadin</groupId>
             <artifactId>vaadin-client-compiled</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.vaadin</groupId>
+            <artifactId>vaadin-push</artifactId>
+        </dependency>
         <dependency>
             <groupId>com.vaadin</groupId>
             <artifactId>vaadin-uitest-common</artifactId>
             </plugin>
             <plugin>
                 <artifactId>maven-war-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
+                    </archive>
+                </configuration>
                 <!-- This execution builds an additional .war file with JBoss 6 specific descriptor -->
                 <executions>
                     <execution>
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <version>3.0.1</version>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
+                        <Bundle-Name>${project.name}</Bundle-Name>
+                        <Bundle-Version>${osgi.bundle.version}</Bundle-Version>
+                        <Import-Package>javax.servlet,javax.servlet.http,javax.websocket,javax.websocket.server,!com.vaadin.*,*</Import-Package>
+                        <Web-ContextPath>run</Web-ContextPath>
+                    </instructions>
+                    <supportedProjectTypes>
+                        <supportedProjectType>war</supportedProjectType>
+                    </supportedProjectTypes>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>osgi-manifest</id>
+                        <phase>process-classes</phase>
+                        <goals>
+                            <goal>manifest</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
-
 </project>
index ce64c225770ed2aa7c0f31f3cbd4a733826cffc2..6f265b10f7de0d25b1569a7a873cc85baf86ecad 100644 (file)
@@ -1,14 +1,7 @@
 package com.vaadin.tests;
 
-import javax.servlet.annotation.WebInitParam;
-import javax.servlet.annotation.WebServlet;
-
-import com.vaadin.annotations.VaadinServletConfiguration;
 import com.vaadin.server.UIClassSelectionEvent;
 import com.vaadin.server.UIProvider;
-import com.vaadin.server.VaadinServlet;
-import com.vaadin.tests.integration.ServletIntegrationUI;
-import com.vaadin.tests.integration.ServletIntegrationWebsocketUI;
 import com.vaadin.tests.integration.push.BasicPush;
 import com.vaadin.ui.UI;
 
@@ -62,16 +55,4 @@ public class IntegrationTestUIProvider extends UIProvider {
         }
     }
 
-    @WebServlet(urlPatterns = "/*", name = "IntegrationTestUIProvider", asyncSupported = true, initParams = {
-            @WebInitParam(name = "UIProvider", value = "com.vaadin.tests.IntegrationTestUIProvider") })
-    @VaadinServletConfiguration(ui = ServletIntegrationUI.class, productionMode = false)
-    public static class MyServlet extends VaadinServlet {
-    }
-
-    @WebServlet(urlPatterns = "/run-jsr356/*", name = "IntegrationUIProvider-Jsr356", asyncSupported = false, initParams = {
-            @WebInitParam(name = "org.atmosphere.cpr.asyncSupport", value = "org.atmosphere.container.JSR356AsyncSupport") })
-    @VaadinServletConfiguration(ui = ServletIntegrationWebsocketUI.class, productionMode = false)
-    public static class JSR356Servlet extends VaadinServlet {
-
-    }
 }
diff --git a/test/servlet-containers/generic/src/main/java/com/vaadin/tests/JSR356Servlet.java b/test/servlet-containers/generic/src/main/java/com/vaadin/tests/JSR356Servlet.java
new file mode 100644 (file)
index 0000000..1a6c138
--- /dev/null
@@ -0,0 +1,18 @@
+package com.vaadin.tests;
+
+import com.vaadin.annotations.VaadinServletConfiguration;
+import com.vaadin.server.VaadinServlet;
+import com.vaadin.tests.integration.ServletIntegrationWebsocketUI;
+
+import javax.servlet.annotation.WebInitParam;
+import javax.servlet.annotation.WebServlet;
+
+/**
+ * Created by elmot on 06-02-2017.
+ */
+@WebServlet(urlPatterns = "/run-jsr356/*", name = "IntegrationUIProvider-Jsr356", asyncSupported = false, initParams = {
+        @WebInitParam(name = "org.atmosphere.cpr.asyncSupport", value = "org.atmosphere.container.JSR356AsyncSupport")})
+@VaadinServletConfiguration(ui = ServletIntegrationWebsocketUI.class, productionMode = false)
+public class JSR356Servlet extends VaadinServlet {
+
+}
diff --git a/test/servlet-containers/generic/src/main/java/com/vaadin/tests/ServerIntegrationTestServlet.java b/test/servlet-containers/generic/src/main/java/com/vaadin/tests/ServerIntegrationTestServlet.java
new file mode 100644 (file)
index 0000000..9ca79b3
--- /dev/null
@@ -0,0 +1,14 @@
+package com.vaadin.tests;
+
+import com.vaadin.annotations.VaadinServletConfiguration;
+import com.vaadin.server.VaadinServlet;
+import com.vaadin.tests.integration.ServletIntegrationUI;
+
+import javax.servlet.annotation.WebInitParam;
+import javax.servlet.annotation.WebServlet;
+
+@WebServlet(urlPatterns = "/*" ,name = "IntegrationTestUIProvider", asyncSupported = true, initParams = {
+        @WebInitParam(name = "UIProvider", value = "com.vaadin.tests.IntegrationTestUIProvider")})
+@VaadinServletConfiguration(ui = ServletIntegrationUI.class, productionMode = false)
+public class ServerIntegrationTestServlet extends VaadinServlet {
+}
index 6c55a431f54574a8df254f8ac7003cf498c91d27..80b5030c7b7e395d7a421dcd238df670f02b41a7 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 6c55a431f54574a8df254f8ac7003cf498c91d27
+Subproject commit 80b5030c7b7e395d7a421dcd238df670f02b41a7