You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pom.xml 8.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <parent>
  6. <artifactId>vaadin-test-karaf</artifactId>
  7. <groupId>com.vaadin</groupId>
  8. <version>8.12-SNAPSHOT</version>
  9. </parent>
  10. <modelVersion>4.0.0</modelVersion>
  11. <artifactId>karaf-run</artifactId>
  12. <packaging>pom</packaging>
  13. <name>Vaadin Karaf Test Runner</name>
  14. <dependencies>
  15. <!--Vaadin dependencies should not be in a classpath-->
  16. <dependency>
  17. <groupId>com.vaadin</groupId>
  18. <artifactId>vaadin-server</artifactId>
  19. <scope>provided</scope>
  20. </dependency>
  21. <dependency>
  22. <groupId>com.vaadin</groupId>
  23. <artifactId>vaadin-themes</artifactId>
  24. <scope>provided</scope>
  25. </dependency>
  26. <dependency>
  27. <groupId>com.vaadin</groupId>
  28. <artifactId>vaadin-karaf-bundle1</artifactId>
  29. <version>${project.version}</version>
  30. <scope>runtime</scope>
  31. </dependency>
  32. <dependency>
  33. <groupId>com.vaadin</groupId>
  34. <artifactId>vaadin-karaf-bundle2</artifactId>
  35. <version>${project.version}</version>
  36. <scope>runtime</scope>
  37. </dependency>
  38. </dependencies>
  39. <profiles>
  40. <profile>
  41. <id>windows</id>
  42. <activation>
  43. <os>
  44. <family>Windows</family>
  45. </os>
  46. </activation>
  47. <properties>
  48. <karaf.script>karaf.bat</karaf.script>
  49. </properties>
  50. </profile>
  51. </profiles>
  52. <properties>
  53. <karaf.script>karaf</karaf.script>
  54. <karaf.home>${project.basedir}/apache-karaf-${karaf.plugin.version}-minimal</karaf.home>
  55. </properties>
  56. <build>
  57. <plugins>
  58. <plugin>
  59. <artifactId>maven-clean-plugin</artifactId>
  60. <executions>
  61. <execution><id>clean-karaf</id>
  62. <phase>pre-integration-test</phase>
  63. <goals><goal>clean</goal></goals>
  64. <configuration>
  65. <failOnError>false</failOnError>
  66. <excludeDefaultDirectories>true</excludeDefaultDirectories>
  67. <filesets>
  68. <fileset>
  69. <directory>${karaf.home}</directory>
  70. <includes>
  71. <include>lock</include>
  72. <include>karaf.pid</include>
  73. <include>instances/*</include>
  74. <include>data/*</include>
  75. <include>data/*</include>
  76. <include>data/*/**</include>
  77. </includes>
  78. </fileset>
  79. </filesets>
  80. </configuration>
  81. </execution>
  82. </executions>
  83. </plugin>
  84. <plugin>
  85. <groupId>org.codehaus.mojo</groupId>
  86. <artifactId>exec-maven-plugin</artifactId>
  87. <version>1.6.0</version>
  88. <executions>
  89. <execution>
  90. <id>start-karaf-background</id>
  91. <phase>pre-integration-test</phase>
  92. <goals>
  93. <goal>exec</goal>
  94. </goals>
  95. <configuration>
  96. <executable>${karaf.home}/bin/${karaf.script}
  97. </executable>
  98. <async>true</async>
  99. <asyncDestroyOnShutdown>true</asyncDestroyOnShutdown>
  100. <commandlineArgs>server</commandlineArgs>
  101. <workingDirectory>${project.build.directory}</workingDirectory>
  102. </configuration>
  103. </execution>
  104. </executions>
  105. </plugin>
  106. <plugin>
  107. <groupId>org.apache.karaf.tooling</groupId>
  108. <artifactId>karaf-maven-plugin</artifactId>
  109. <version>4.2.1</version>
  110. <executions>
  111. <execution>
  112. <id>karaf-client-ctrl</id>
  113. <phase>pre-integration-test</phase>
  114. <goals>
  115. <goal>client</goal>
  116. </goals>
  117. <configuration>
  118. <delay>5</delay>
  119. <attempts>150</attempts>
  120. <commands>
  121. <!--Scheduled shutdown in 15 minutes-->
  122. <command>shutdown -f +10</command>
  123. <command>feature:install http</command>
  124. <command>feature:install http-whiteboard</command>
  125. <command>bundle:install -s mvn:org.jsoup/jsoup/1.11.2</command>
  126. <command>bundle:install -s mvn:com.vaadin.external/gentyref/1.2.0.vaadin1</command>
  127. <command>bundle:install -s mvn:com.vaadin/vaadin-shared/${vaadin.version}</command>
  128. <command>bundle:install -s mvn:com.vaadin/vaadin-server/${vaadin.version}</command>
  129. <command>bundle:install -s mvn:com.vaadin/vaadin-osgi-integration/${vaadin.version}
  130. </command>
  131. <command>bundle:install -s mvn:com.vaadin/vaadin-client-compiled/${vaadin.version}
  132. </command>
  133. <command>bundle:install -s mvn:com.vaadin/vaadin-themes/${vaadin.version}</command>
  134. <command>
  135. <![CDATA[bundle:install -s file:./../../vaadin-karaf-bundle1/target/vaadin-karaf-bundle1-${project.version}.jar]]></command>
  136. <command>
  137. <![CDATA[bundle:install -s file:./../../vaadin-karaf-bundle2/target/vaadin-karaf-bundle2-${project.version}.jar]]></command>
  138. </commands>
  139. </configuration>
  140. </execution>
  141. <execution>
  142. <id>karaf-client-shutdown</id>
  143. <phase>post-integration-test</phase>
  144. <goals>
  145. <goal>client</goal>
  146. </goals>
  147. <configuration>
  148. <delay>5</delay>
  149. <attempts>10</attempts>
  150. <commands>
  151. <command>system:shutdown -f</command>
  152. </commands>
  153. </configuration>
  154. </execution>
  155. </executions>
  156. </plugin>
  157. <plugin>
  158. <groupId>org.apache.maven.plugins</groupId>
  159. <artifactId>maven-failsafe-plugin</artifactId>
  160. <version>2.19.1</version>
  161. <executions>
  162. <execution>
  163. <goals>
  164. <goal>integration-test</goal>
  165. <goal>verify</goal>
  166. </goals>
  167. </execution>
  168. </executions>
  169. <configuration>
  170. <environmentVariables>
  171. <vaadin.version>${vaadin.version}</vaadin.version>
  172. </environmentVariables>
  173. </configuration>
  174. </plugin>
  175. </plugins>
  176. </build>
  177. </project>