pom.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. <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" xml:space="preserve">
  2. <modelVersion>4.0.0</modelVersion>
  3. <groupId>no.priv.bang.demos</groupId>
  4. <artifactId>frontend-karaf-demo</artifactId>
  5. <version>1.1.0-SNAPSHOT</version>
  6. <name>React app test</name>
  7. <properties>
  8. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  9. <karaf-feature-name>${project.artifactId}</karaf-feature-name>
  10. <Bundle-SymbolicName>no.priv.bang.demos.${project.artifactId}</Bundle-SymbolicName>
  11. <maven.bundle.plugin.version>2.5.3</maven.bundle.plugin.version>
  12. <karaf.version>4.2.11</karaf.version>
  13. <osgi.version>6.0.0</osgi.version>
  14. <osgi.service>1.3.0</osgi.service>
  15. <pax.web.version>6.0.3</pax.web.version>
  16. <frontend-servlet.version>1.1.2</frontend-servlet.version>
  17. <osgi-service-adaptors.version>1.0.1</osgi-service-adaptors.version>
  18. <jackson.version>2.10.3</jackson.version>
  19. <jackson.databind.version>${jackson.version}</jackson.databind.version>
  20. </properties>
  21. <dependencyManagement>
  22. <dependencies>
  23. <dependency>
  24. <groupId>org.junit</groupId>
  25. <artifactId>junit-bom</artifactId>
  26. <version>5.7.1</version>
  27. <type>pom</type>
  28. <scope>import</scope>
  29. </dependency>
  30. <dependency>
  31. <groupId>org.apache.karaf</groupId>
  32. <artifactId>karaf-bom</artifactId>
  33. <version>${karaf.version}</version>
  34. <type>pom</type>
  35. <scope>import</scope>
  36. </dependency>
  37. </dependencies>
  38. </dependencyManagement>
  39. <dependencies>
  40. <dependency>
  41. <groupId>org.junit.jupiter</groupId>
  42. <artifactId>junit-jupiter-api</artifactId>
  43. <scope>test</scope>
  44. </dependency>
  45. <dependency>
  46. <groupId>org.junit.jupiter</groupId>
  47. <artifactId>junit-jupiter-engine</artifactId>
  48. <scope>test</scope>
  49. </dependency>
  50. <dependency>
  51. <groupId>org.assertj</groupId>
  52. <artifactId>assertj-core</artifactId>
  53. <version>3.19.0</version>
  54. <scope>test</scope>
  55. </dependency>
  56. <dependency>
  57. <groupId>org.mockito</groupId>
  58. <artifactId>mockito-core</artifactId>
  59. <version>3.8.0</version>
  60. <scope>test</scope>
  61. </dependency>
  62. <dependency>
  63. <groupId>com.mockrunner</groupId>
  64. <artifactId>mockrunner-servlet</artifactId>
  65. <version>2.0.6</version>
  66. <scope>test</scope>
  67. </dependency>
  68. <dependency>
  69. <groupId>org.osgi</groupId>
  70. <artifactId>org.osgi.core</artifactId>
  71. <version>${osgi.version}</version>
  72. <scope>provided</scope>
  73. </dependency>
  74. <dependency>
  75. <groupId>org.osgi</groupId>
  76. <artifactId>org.osgi.service.component.annotations</artifactId>
  77. <version>${osgi.service}</version>
  78. <scope>provided</scope>
  79. </dependency>
  80. <dependency>
  81. <groupId>org.osgi</groupId>
  82. <artifactId>org.osgi.service.log</artifactId>
  83. <version>${osgi.service}</version>
  84. <scope>provided</scope>
  85. </dependency>
  86. <dependency>
  87. <groupId>no.priv.bang.osgi.service.adapters</groupId>
  88. <artifactId>logservice</artifactId>
  89. <version>${osgi-service-adaptors.version}</version>
  90. <scope>provided</scope>
  91. </dependency>
  92. <dependency>
  93. <groupId>no.priv.bang.osgi.service.adapters</groupId>
  94. <artifactId>service-mocks</artifactId>
  95. <version>${osgi-service-adaptors.version}</version>
  96. <scope>test</scope>
  97. </dependency>
  98. <dependency>
  99. <groupId>org.ops4j.pax.web</groupId>
  100. <artifactId>pax-web-api</artifactId>
  101. <scope>provided</scope>
  102. </dependency>
  103. <dependency>
  104. <groupId>org.ops4j.pax.web</groupId>
  105. <artifactId>pax-web-extender-whiteboard</artifactId>
  106. <scope>provided</scope>
  107. </dependency>
  108. <dependency>
  109. <groupId>javax.servlet</groupId>
  110. <artifactId>javax.servlet-api</artifactId>
  111. <scope>provided</scope>
  112. </dependency>
  113. <dependency>
  114. <groupId>no.priv.bang.servlet</groupId>
  115. <artifactId>servlet.frontend</artifactId>
  116. <version>${frontend-servlet.version}</version>
  117. <scope>provided</scope>
  118. </dependency>
  119. <dependency>
  120. <groupId>com.fasterxml.jackson.core</groupId>
  121. <artifactId>jackson-core</artifactId>
  122. <version>${jackson.version}</version>
  123. </dependency>
  124. <dependency>
  125. <groupId>com.fasterxml.jackson.core</groupId>
  126. <artifactId>jackson-databind</artifactId>
  127. <version>${jackson.databind.version}</version>
  128. </dependency>
  129. </dependencies>
  130. <build>
  131. <plugins>
  132. <plugin>
  133. <groupId>com.github.eirslett</groupId>
  134. <artifactId>frontend-maven-plugin</artifactId>
  135. <version>1.11.3</version>
  136. <configuration>
  137. <nodeVersion>v14.16.1</nodeVersion>
  138. <workingDirectory>src/main/frontend</workingDirectory>
  139. <installDirectory>target</installDirectory>
  140. </configuration>
  141. <executions>
  142. <execution>
  143. <id>install node and npm</id>
  144. <goals>
  145. <goal>install-node-and-npm</goal>
  146. </goals>
  147. </execution>
  148. <execution>
  149. <id>npm install</id>
  150. <goals>
  151. <goal>npm</goal>
  152. </goals>
  153. </execution>
  154. <execution>
  155. <id>webpack build</id>
  156. <goals>
  157. <goal>webpack</goal>
  158. </goals>
  159. </execution>
  160. </executions>
  161. </plugin>
  162. <plugin>
  163. <artifactId>maven-clean-plugin</artifactId>
  164. <version>3.1.0</version>
  165. <configuration>
  166. <filesets>
  167. <fileset>
  168. <directory>src/main/frontend</directory>
  169. <includes>
  170. <include>**/*.log</include>
  171. </includes>
  172. <followSymlinks>false</followSymlinks>
  173. </fileset>
  174. </filesets>
  175. </configuration>
  176. </plugin>
  177. <plugin>
  178. <groupId>org.apache.maven.plugins</groupId>
  179. <artifactId>maven-compiler-plugin</artifactId>
  180. <version>3.5.1</version>
  181. <configuration>
  182. <source>1.8</source>
  183. <target>1.8</target>
  184. </configuration>
  185. </plugin>
  186. <plugin>
  187. <groupId>org.apache.maven.plugins</groupId>
  188. <artifactId>maven-source-plugin</artifactId>
  189. <version>2.4</version>
  190. <executions>
  191. <execution>
  192. <id>attach-sources</id>
  193. <goals>
  194. <goal>jar</goal>
  195. </goals>
  196. </execution>
  197. </executions>
  198. </plugin>
  199. <plugin>
  200. <groupId>org.apache.maven.plugins</groupId>
  201. <artifactId>maven-javadoc-plugin</artifactId>
  202. <version>2.10.2</version>
  203. <configuration>
  204. <show>private</show>
  205. <source>8</source>
  206. </configuration>
  207. <executions>
  208. <execution>
  209. <id>attach-javadocs</id>
  210. <goals>
  211. <goal>jar</goal>
  212. </goals>
  213. </execution>
  214. </executions>
  215. </plugin>
  216. <plugin>
  217. <groupId>org.apache.maven.plugins</groupId>
  218. <artifactId>maven-surefire-plugin</artifactId>
  219. <version>2.22.2</version>
  220. <configuration>
  221. <useSystemClassLoader>false</useSystemClassLoader>
  222. </configuration>
  223. </plugin>
  224. <plugin>
  225. <groupId>org.sonarsource.scanner.maven</groupId>
  226. <artifactId>sonar-maven-plugin</artifactId>
  227. <version>3.9.0.2155</version>
  228. </plugin>
  229. <plugin>
  230. <groupId>org.jacoco</groupId>
  231. <artifactId>jacoco-maven-plugin</artifactId>
  232. <version>0.8.5</version>
  233. <executions>
  234. <execution>
  235. <id>report</id>
  236. <goals>
  237. <goal>report</goal>
  238. </goals>
  239. <phase>verify</phase>
  240. </execution>
  241. </executions>
  242. </plugin>
  243. <plugin>
  244. <groupId>org.eluder.coveralls</groupId>
  245. <artifactId>coveralls-maven-plugin</artifactId>
  246. <version>4.3.0</version>
  247. <dependencies>
  248. <dependency>
  249. <groupId>jakarta.xml.bind</groupId>
  250. <artifactId>jakarta.xml.bind-api</artifactId>
  251. <version>2.3.3</version>
  252. </dependency>
  253. </dependencies>
  254. <configuration>
  255. <jacocoReports>
  256. <jacocoReport>${project.basedir}/target/site/jacoco/jacoco.xml</jacocoReport>
  257. </jacocoReports>
  258. </configuration>
  259. </plugin>
  260. <plugin>
  261. <groupId>org.apache.felix</groupId>
  262. <artifactId>maven-bundle-plugin</artifactId>
  263. <version>${maven.bundle.plugin.version}</version>
  264. <configuration>
  265. <supportedProjectTypes>
  266. <supportedProjectType>jar</supportedProjectType>
  267. <supportedProjectType>bundle</supportedProjectType>
  268. <supportedProjectType>war</supportedProjectType>
  269. </supportedProjectTypes>
  270. <instructions>
  271. <Bundle-SymbolicName>${Bundle-SymbolicName}</Bundle-SymbolicName>
  272. <Import-Package>*</Import-Package>
  273. <Export-Package>!*</Export-Package>
  274. <Include-Resource>/=target/classes/</Include-Resource>
  275. <_removeheaders>
  276. Private-Package,
  277. Include-Resource,
  278. Embed-Dependency,
  279. Embed-Transitive
  280. </_removeheaders>
  281. <!-- Enable processing of OSGI DS component annotations -->
  282. <_dsannotations>*</_dsannotations>
  283. <!-- Enable processing of OSGI metatype annotations -->
  284. <_metatypeannotations>*</_metatypeannotations>
  285. </instructions>
  286. </configuration>
  287. <executions>
  288. <execution>
  289. <id>bundle</id>
  290. <goals>
  291. <goal>bundle</goal>
  292. </goals>
  293. </execution>
  294. </executions>
  295. </plugin>
  296. <plugin>
  297. <groupId>org.apache.karaf.tooling</groupId>
  298. <artifactId>karaf-maven-plugin</artifactId>
  299. <version>${karaf.version}</version>
  300. <extensions>true</extensions>
  301. <configuration>
  302. <startLevel>80</startLevel>
  303. <includeTransitiveDependency>true</includeTransitiveDependency>
  304. <aggregateFeatures>false</aggregateFeatures>
  305. <includeProjectArtifact>true</includeProjectArtifact>
  306. <primaryFeatureName>${karaf-feature-name}</primaryFeatureName>
  307. </configuration>
  308. <executions>
  309. <execution>
  310. <id>generate-features-file</id>
  311. <phase>package</phase>
  312. <goals>
  313. <goal>features-generate-descriptor</goal>
  314. </goals>
  315. </execution>
  316. </executions>
  317. </plugin>
  318. </plugins>
  319. </build>
  320. </project>