pom.xml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Copyright 2018 Steinar Bang -->
  3. <!-- -->
  4. <!-- Licensed under the Apache License, Version 2.0 (the "License"); -->
  5. <!-- you may not use this file except in compliance with the License. -->
  6. <!-- You may obtain a copy of the License at -->
  7. <!-- http://www.apache.org/licenses/LICENSE-2.0 -->
  8. <!-- Unless required by applicable law or agreed to in writing, -->
  9. <!-- software distributed under the License is distributed on an "AS IS" BASIS, -->
  10. <!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -->
  11. <!-- See the License for the specific language governing permissions and limitations -->
  12. <!-- under the License. -->
  13. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  14. <modelVersion>4.0.0</modelVersion>
  15. <groupId>no.priv.bang.demos.jerseyinkaraf</groupId>
  16. <artifactId>jerseyinkaraf</artifactId>
  17. <version>1.0.0-SNAPSHOT</version>
  18. <packaging>pom</packaging>
  19. <name>Jersey in Karaf demo</name>
  20. <description>A demonstration of how to use Jersey to provide a REST API in Karaf, and injecting OSGi services into the Jersey resources.</description>
  21. <properties>
  22. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  23. <sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/../jacoco-coverage-report/target/site/jacoco-aggregate/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
  24. <karaf-feature-name>${project.artifactId}</karaf-feature-name>
  25. <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
  26. <maven.bundle.plugin.version>4.2.0</maven.bundle.plugin.version>
  27. <karaf.version>4.2.5</karaf.version>
  28. <osgi.version>6.0.0</osgi.version>
  29. <osgi.service>1.3.0</osgi.service>
  30. <pax.web.version>6.0.3</pax.web.version>
  31. <osgi-service-adaptors.version>1.0.1</osgi-service-adaptors.version>
  32. <jackson.version>2.9.10</jackson.version>
  33. <jackson.databind.version>2.9.10.3</jackson.databind.version>
  34. <jersey.version>2.30</jersey.version>
  35. <jersey.karaf.feature.version>1.5.0</jersey.karaf.feature.version>
  36. <servlet.jersey.version>1.1.1</servlet.jersey.version>
  37. </properties>
  38. <modules>
  39. <module>jerseyinkaraf.servicedef</module>
  40. <module>jerseyinkaraf.services</module>
  41. <module>jerseyinkaraf.webgui</module>
  42. <module>jerseyinkaraf.webapi</module>
  43. <module>jacoco-coverage-report</module>
  44. </modules>
  45. <dependencies>
  46. <dependency>
  47. <groupId>junit</groupId>
  48. <artifactId>junit</artifactId>
  49. <version>4.12</version>
  50. <scope>test</scope>
  51. </dependency>
  52. <dependency>
  53. <groupId>org.assertj</groupId>
  54. <artifactId>assertj-core</artifactId>
  55. <version>3.9.0</version>
  56. <scope>test</scope>
  57. </dependency>
  58. <dependency>
  59. <groupId>org.mockito</groupId>
  60. <artifactId>mockito-core</artifactId>
  61. <version>1.10.19</version>
  62. <scope>test</scope>
  63. </dependency>
  64. <dependency>
  65. <groupId>org.osgi</groupId>
  66. <artifactId>org.osgi.core</artifactId>
  67. <version>${osgi.version}</version>
  68. <scope>provided</scope>
  69. </dependency>
  70. <dependency>
  71. <groupId>org.osgi</groupId>
  72. <artifactId>org.osgi.service.component.annotations</artifactId>
  73. <version>${osgi.service}</version>
  74. <scope>provided</scope>
  75. </dependency>
  76. <dependency>
  77. <groupId>org.osgi</groupId>
  78. <artifactId>org.osgi.service.log</artifactId>
  79. <version>${osgi.service}</version>
  80. <scope>provided</scope>
  81. </dependency>
  82. <dependency>
  83. <groupId>no.priv.bang.osgi.service.adapters</groupId>
  84. <artifactId>logservice</artifactId>
  85. <version>${osgi-service-adaptors.version}</version>
  86. <scope>provided</scope>
  87. </dependency>
  88. <dependency>
  89. <groupId>org.ops4j.pax.web</groupId>
  90. <artifactId>pax-web-api</artifactId>
  91. <version>${pax.web.version}</version>
  92. <scope>provided</scope>
  93. </dependency>
  94. <dependency>
  95. <groupId>org.ops4j.pax.web</groupId>
  96. <artifactId>pax-web-extender-whiteboard</artifactId>
  97. <version>${pax.web.version}</version>
  98. <scope>provided</scope>
  99. </dependency>
  100. <dependency>
  101. <groupId>javax.servlet</groupId>
  102. <artifactId>javax.servlet-api</artifactId>
  103. <version>3.1.0</version>
  104. <scope>provided</scope>
  105. </dependency>
  106. </dependencies>
  107. <dependencyManagement>
  108. <dependencies>
  109. <dependency>
  110. <groupId>com.fasterxml.jackson.core</groupId>
  111. <artifactId>jackson-core</artifactId>
  112. <version>${jackson.version}</version>
  113. <scope>provided</scope>
  114. </dependency>
  115. <dependency>
  116. <groupId>com.fasterxml.jackson.core</groupId>
  117. <artifactId>jackson-databind</artifactId>
  118. <version>${jackson.databind.version}</version>
  119. <scope>provided</scope>
  120. </dependency>
  121. <dependency>
  122. <groupId>com.fasterxml.jackson.core</groupId>
  123. <artifactId>jackson-annotations</artifactId>
  124. <version>${jackson.version}</version>
  125. <scope>provided</scope>
  126. </dependency>
  127. <dependency>
  128. <groupId>org.glassfish.jersey.containers</groupId>
  129. <artifactId>jersey-container-servlet</artifactId>
  130. <version>${jersey.version}</version>
  131. <scope>provided</scope>
  132. </dependency>
  133. <dependency>
  134. <groupId>org.glassfish.jersey.inject</groupId>
  135. <artifactId>jersey-hk2</artifactId>
  136. <version>${jersey.version}</version>
  137. <scope>provided</scope>
  138. </dependency>
  139. <dependency>
  140. <groupId>org.glassfish.jersey.media</groupId>
  141. <artifactId>jersey-media-json-jackson</artifactId>
  142. <version>${jersey.version}</version>
  143. <scope>provided</scope>
  144. </dependency>
  145. <dependency>
  146. <groupId>no.priv.bang.servlet</groupId>
  147. <artifactId>servlet.jersey</artifactId>
  148. <version>${servlet.jersey.version}</version>
  149. <scope>provided</scope>
  150. </dependency>
  151. <dependency>
  152. <groupId>javax.xml.bind</groupId>
  153. <artifactId>jaxb-api</artifactId>
  154. <version>2.2.11</version>
  155. </dependency>
  156. <dependency>
  157. <groupId>com.sun.xml.bind</groupId>
  158. <artifactId>jaxb-core</artifactId>
  159. <version>2.2.11</version>
  160. </dependency>
  161. <dependency>
  162. <groupId>com.sun.xml.bind</groupId>
  163. <artifactId>jaxb-impl</artifactId>
  164. <version>2.2.11</version>
  165. </dependency>
  166. <dependency>
  167. <groupId>javax.activation</groupId>
  168. <artifactId>activation</artifactId>
  169. <version>1.1.1</version>
  170. </dependency>
  171. </dependencies>
  172. </dependencyManagement>
  173. <build>
  174. <pluginManagement>
  175. <plugins>
  176. <plugin>
  177. <groupId>org.apache.felix</groupId>
  178. <artifactId>maven-bundle-plugin</artifactId>
  179. <version>${maven.bundle.plugin.version}</version>
  180. <configuration>
  181. <supportedProjectTypes>
  182. <supportedProjectType>jar</supportedProjectType>
  183. <supportedProjectType>bundle</supportedProjectType>
  184. <supportedProjectType>war</supportedProjectType>
  185. </supportedProjectTypes>
  186. <instructions>
  187. <Bundle-SymbolicName>${Bundle-SymbolicName}</Bundle-SymbolicName>
  188. <Import-Package>*</Import-Package>
  189. <Export-Package>!*</Export-Package>
  190. <_removeheaders>
  191. Private-Package,
  192. Include-Resource,
  193. Embed-Dependency,
  194. Embed-Transitive
  195. </_removeheaders>
  196. <!-- Enable processing of OSGI DS component annotations -->
  197. <_dsannotations>*</_dsannotations>
  198. <!-- Enable processing of OSGI metatype annotations -->
  199. <_metatypeannotations>*</_metatypeannotations>
  200. </instructions>
  201. </configuration>
  202. <executions>
  203. <execution>
  204. <id>bundle</id>
  205. <goals>
  206. <goal>bundle</goal>
  207. </goals>
  208. </execution>
  209. </executions>
  210. </plugin>
  211. <plugin>
  212. <groupId>org.apache.karaf.tooling</groupId>
  213. <artifactId>karaf-maven-plugin</artifactId>
  214. <version>${karaf.version}</version>
  215. <extensions>true</extensions>
  216. <configuration>
  217. <startLevel>80</startLevel>
  218. <aggregateFeatures>false</aggregateFeatures>
  219. <includeProjectArtifact>true</includeProjectArtifact>
  220. <primaryFeatureName>${karaf-feature-name}</primaryFeatureName>
  221. </configuration>
  222. <executions>
  223. <execution>
  224. <id>generate-features-file</id>
  225. <phase>package</phase>
  226. <goals>
  227. <goal>features-generate-descriptor</goal>
  228. </goals>
  229. </execution>
  230. </executions>
  231. </plugin>
  232. <plugin>
  233. <groupId>org.sonarsource.scanner.maven</groupId>
  234. <artifactId>sonar-maven-plugin</artifactId>
  235. <version>3.6.0.1398</version>
  236. </plugin>
  237. <plugin>
  238. <groupId>org.jacoco</groupId>
  239. <artifactId>jacoco-maven-plugin</artifactId>
  240. <version>0.8.5</version>
  241. </plugin>
  242. </plugins>
  243. </pluginManagement>
  244. <plugins>
  245. <plugin>
  246. <artifactId>maven-resources-plugin</artifactId>
  247. <version>3.1.0</version>
  248. <executions>
  249. <execution>
  250. <id>filter-resources</id>
  251. <phase>validate</phase>
  252. <goals>
  253. <goal>resources</goal>
  254. </goals>
  255. <configuration>
  256. <resources>
  257. <resource>
  258. <directory>src/main/filtered-resources</directory>
  259. <filtering>true</filtering>
  260. </resource>
  261. </resources>
  262. </configuration>
  263. </execution>
  264. </executions>
  265. </plugin>
  266. <plugin>
  267. <groupId>org.codehaus.mojo</groupId>
  268. <artifactId>build-helper-maven-plugin</artifactId>
  269. <version>3.0.0</version>
  270. <inherited>false</inherited>
  271. <executions>
  272. <execution>
  273. <id>attach-karaf-feature</id>
  274. <phase>package</phase>
  275. <goals>
  276. <goal>attach-artifact</goal>
  277. </goals>
  278. <configuration>
  279. <artifacts>
  280. <artifact>
  281. <file>target/classes/feature.xml</file>
  282. <type>xml</type>
  283. <classifier>features</classifier>
  284. </artifact>
  285. </artifacts>
  286. </configuration>
  287. </execution>
  288. </executions>
  289. </plugin>
  290. <plugin>
  291. <groupId>org.apache.maven.plugins</groupId>
  292. <artifactId>maven-compiler-plugin</artifactId>
  293. <version>3.5.1</version>
  294. <configuration>
  295. <source>1.8</source>
  296. <target>1.8</target>
  297. </configuration>
  298. </plugin>
  299. <plugin>
  300. <groupId>org.apache.maven.plugins</groupId>
  301. <artifactId>maven-source-plugin</artifactId>
  302. <version>2.4</version>
  303. <executions>
  304. <execution>
  305. <id>attach-sources</id>
  306. <goals>
  307. <goal>jar</goal>
  308. </goals>
  309. </execution>
  310. </executions>
  311. </plugin>
  312. <plugin>
  313. <groupId>org.apache.maven.plugins</groupId>
  314. <artifactId>maven-javadoc-plugin</artifactId>
  315. <version>2.10.2</version>
  316. <configuration>
  317. <show>private</show>
  318. <source>8</source>
  319. </configuration>
  320. <executions>
  321. <execution>
  322. <id>attach-javadocs</id>
  323. <goals>
  324. <goal>jar</goal>
  325. </goals>
  326. </execution>
  327. </executions>
  328. </plugin>
  329. <plugin>
  330. <groupId>org.codehaus.mojo</groupId>
  331. <artifactId>cobertura-maven-plugin</artifactId>
  332. <version>2.7</version>
  333. <configuration>
  334. <outputDirectory>${basedir}/target</outputDirectory>
  335. <formats>
  336. <format>html</format>
  337. <format>xml</format>
  338. </formats>
  339. <aggregate>true</aggregate>
  340. </configuration>
  341. </plugin>
  342. <plugin>
  343. <groupId>org.eluder.coveralls</groupId>
  344. <artifactId>coveralls-maven-plugin</artifactId>
  345. <version>4.3.0</version>
  346. <configuration>
  347. <coberturaReports>
  348. <coberturaReport>${basedir}/target/coverage.xml</coberturaReport>
  349. </coberturaReports>
  350. </configuration>
  351. </plugin>
  352. <plugin>
  353. <groupId>org.apache.maven.plugins</groupId>
  354. <artifactId>maven-release-plugin</artifactId>
  355. <version>2.5.3</version>
  356. <configuration>
  357. <releaseProfiles>release-extras</releaseProfiles>
  358. </configuration>
  359. </plugin>
  360. </plugins>
  361. </build>
  362. <licenses>
  363. <license>
  364. <name>Apache License version 2</name>
  365. <url>http://www.apache.org/licenses/LICENSE-2.0</url>
  366. </license>
  367. </licenses>
  368. <developers>
  369. <developer>
  370. <name>Steinar Bang</name>
  371. <email>sb@dod.no</email>
  372. <url>https://steinar.bang.priv.no/</url>
  373. <organization>steinarb-github</organization>
  374. <organizationUrl>https://github.com/steinarb</organizationUrl>
  375. </developer>
  376. </developers>
  377. <scm>
  378. <url>https://github.com/steinarb/post-body-capture</url>
  379. <connection>scm:git:https://github.com/steinarb/post-body-capture.git</connection>
  380. <tag>HEAD</tag>
  381. </scm>
  382. <issueManagement>
  383. <url>https://github.com/steinarb/post-body-capture/issues</url>
  384. <system>Github issue tracker</system>
  385. </issueManagement>
  386. <ciManagement>
  387. <url>https://travis-ci.org/steinarb/post-body-capture</url>
  388. <system>travis-ci</system>
  389. </ciManagement>
  390. <distributionManagement>
  391. <snapshotRepository>
  392. <id>ossrh</id>
  393. <url>https://oss.sonatype.org/content/repositories/snapshots</url>
  394. </snapshotRepository>
  395. <repository>
  396. <id>ossrh</id>
  397. <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
  398. </repository>
  399. </distributionManagement>
  400. <url>http://github.com/steinarb/jersey-demo/</url>
  401. <profiles>
  402. <profile>
  403. <id>release-extras</id>
  404. <build>
  405. <plugins>
  406. <plugin>
  407. <groupId>org.apache.maven.plugins</groupId>
  408. <artifactId>maven-gpg-plugin</artifactId>
  409. <version>1.6</version>
  410. <executions>
  411. <execution>
  412. <id>sign-artifacts</id>
  413. <phase>verify</phase>
  414. <goals>
  415. <goal>sign</goal>
  416. </goals>
  417. <configuration>
  418. <gpgArguments>
  419. <arg>--pinentry-mode</arg>
  420. <arg>loopback</arg>
  421. </gpgArguments>
  422. </configuration>
  423. </execution>
  424. </executions>
  425. </plugin>
  426. <plugin>
  427. <groupId>org.sonatype.plugins</groupId>
  428. <artifactId>nexus-staging-maven-plugin</artifactId>
  429. <version>1.6.8</version>
  430. <extensions>true</extensions>
  431. <configuration>
  432. <serverId>ossrh</serverId>
  433. <nexusUrl>https://oss.sonatype.org/</nexusUrl>
  434. <skipStaging>true</skipStaging>
  435. </configuration>
  436. <executions>
  437. <execution>
  438. <id>default-deploy</id>
  439. <phase>deploy</phase>
  440. <goals>
  441. <goal>deploy</goal>
  442. </goals>
  443. </execution>
  444. </executions>
  445. </plugin>
  446. </plugins>
  447. </build>
  448. </profile>
  449. </profiles>
  450. </project>