aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/servlet-containers/karaf/karaf-run/pom.xml9
-rw-r--r--test/servlet-containers/karaf/vaadin-karaf-bundle1/src/main/java/com/vaadin/test/osgi/myapplication1/MyUI.java14
2 files changed, 16 insertions, 7 deletions
diff --git a/test/servlet-containers/karaf/karaf-run/pom.xml b/test/servlet-containers/karaf/karaf-run/pom.xml
index ca4e7dcd96..38fa9558aa 100644
--- a/test/servlet-containers/karaf/karaf-run/pom.xml
+++ b/test/servlet-containers/karaf/karaf-run/pom.xml
@@ -66,13 +66,8 @@
<command>shutdown -f +10</command>
<command>feature:install http</command>
<command>feature:install http-whiteboard</command>
- <command>bundle:install -s mvn:org.jsoup/jsoup/1.8.3</command>
- <command>bundle:install -s mvn:com.vaadin.external/gentyref/1.2.0.vaadin1</command>
- <command>bundle:install -s mvn:com.vaadin/vaadin-shared/${vaadin.version}</command>
- <command>bundle:install -s mvn:com.vaadin/vaadin-server/${vaadin.version}</command>
- <command>bundle:install -s mvn:com.vaadin/vaadin-osgi-integration/${vaadin.version}</command>
- <command>bundle:install -s mvn:com.vaadin/vaadin-client-compiled/${vaadin.version}</command>
- <command>bundle:install -s mvn:com.vaadin/vaadin-themes/${vaadin.version}</command>
+ <command>feature:repo-add file:C:/work/framework/vaadin-feature.xml</command>
+ <command>feature:install vaadin-osgi-core</command>
<command>
<![CDATA[bundle:install -s file:./../vaadin-karaf-bundle1/target/vaadin-karaf-bundle1-${project.version}.jar]]></command>
<command>
diff --git a/test/servlet-containers/karaf/vaadin-karaf-bundle1/src/main/java/com/vaadin/test/osgi/myapplication1/MyUI.java b/test/servlet-containers/karaf/vaadin-karaf-bundle1/src/main/java/com/vaadin/test/osgi/myapplication1/MyUI.java
index 26cf31628a..f9c90481c9 100644
--- a/test/servlet-containers/karaf/vaadin-karaf-bundle1/src/main/java/com/vaadin/test/osgi/myapplication1/MyUI.java
+++ b/test/servlet-containers/karaf/vaadin-karaf-bundle1/src/main/java/com/vaadin/test/osgi/myapplication1/MyUI.java
@@ -2,6 +2,7 @@ package com.vaadin.test.osgi.myapplication1;
import javax.servlet.annotation.WebServlet;
+import com.vaadin.annotations.Push;
import org.osgi.service.component.annotations.Component;
import com.vaadin.annotations.Theme;
@@ -17,6 +18,7 @@ import com.vaadin.ui.VerticalLayout;
@Theme("karaftesttheme")
@Widgetset("com.vaadin.test.osgi.widgetset.CustomWidgetSet")
+@Push
public class MyUI extends UI {
@Override
@@ -33,6 +35,18 @@ public class MyUI extends UI {
layout.addComponents(name, button);
setContent(layout);
+ Thread thread = new Thread(() -> {
+ while (true) {
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException ignored) {
+ }
+ button.setCaption(button.getCaption()+".");
+ push();
+ }
+ });
+ thread.setDaemon(true);
+ thread.start();
}
@Component(service = VaadinServlet.class)