pom.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Copyright 2018-2024 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>2.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. <karaf-feature-name>${project.artifactId}</karaf-feature-name>
  23. <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
  24. <maven.bundle.plugin.version>5.1.9</maven.bundle.plugin.version>
  25. <karaf.version>4.4.6</karaf.version>
  26. <osgi-service-adaptors.version>1.2.0</osgi-service-adaptors.version>
  27. <jersey-feature.version>1.9.8</jersey-feature.version>
  28. <bang-servlet.version>1.7.0</bang-servlet.version>
  29. <junit.jupiter.version>5.10.2</junit.jupiter.version>
  30. <assertj.version>3.26.0</assertj.version>
  31. <mockito.version>5.12.0</mockito.version>
  32. <mockrunner.version>2.0.7</mockrunner.version>
  33. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  34. <sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/../jacoco-coverage-report/target/site/jacoco-aggregate/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
  35. <sonar.issue.ignore.multicriteria>e1</sonar.issue.ignore.multicriteria>
  36. <sonar.issue.ignore.multicriteria.e1.ruleKey>java:S6813</sonar.issue.ignore.multicriteria.e1.ruleKey>
  37. <sonar.issue.ignore.multicriteria.e1.resourceKey>**/jerseyinkaraf.webapi/src/main/java/**/resources/*.java</sonar.issue.ignore.multicriteria.e1.resourceKey>
  38. </properties>
  39. <modules>
  40. <module>jerseyinkaraf.servicedef</module>
  41. <module>jerseyinkaraf.services</module>
  42. <module>jerseyinkaraf.webcontext</module>
  43. <module>jerseyinkaraf.webgui</module>
  44. <module>jerseyinkaraf.webapi</module>
  45. <module>jacoco-coverage-report</module>
  46. </modules>
  47. <dependencyManagement>
  48. <dependencies>
  49. <dependency>
  50. <groupId>org.apache.karaf</groupId>
  51. <artifactId>karaf-bom</artifactId>
  52. <version>${karaf.version}</version>
  53. <type>pom</type>
  54. <scope>import</scope>
  55. </dependency>
  56. <dependency>
  57. <groupId>no.priv.bang.osgi.service.adapters</groupId>
  58. <artifactId>adapters-bom</artifactId>
  59. <version>${osgi-service-adaptors.version}</version>
  60. <type>pom</type>
  61. <scope>import</scope>
  62. </dependency>
  63. <dependency>
  64. <groupId>no.priv.bang.karaf</groupId>
  65. <artifactId>jersey-feature-bom</artifactId>
  66. <version>${jersey-feature.version}</version>
  67. <type>pom</type>
  68. <scope>import</scope>
  69. </dependency>
  70. <dependency>
  71. <groupId>no.priv.bang.servlet</groupId>
  72. <artifactId>servlet-bom</artifactId>
  73. <version>${bang-servlet.version}</version>
  74. <type>pom</type>
  75. <scope>import</scope>
  76. </dependency>
  77. <dependency>
  78. <groupId>org.junit</groupId>
  79. <artifactId>junit-bom</artifactId>
  80. <version>${junit.jupiter.version}</version>
  81. <type>pom</type>
  82. <scope>import</scope>
  83. </dependency>
  84. <dependency>
  85. <groupId>org.assertj</groupId>
  86. <artifactId>assertj-core</artifactId>
  87. <version>${assertj.version}</version>
  88. </dependency>
  89. <dependency>
  90. <groupId>org.mockito</groupId>
  91. <artifactId>mockito-core</artifactId>
  92. <version>${mockito.version}</version>
  93. </dependency>
  94. <dependency>
  95. <groupId>com.mockrunner</groupId>
  96. <artifactId>mockrunner-servlet</artifactId>
  97. <version>${mockrunner.version}</version>
  98. </dependency>
  99. </dependencies>
  100. </dependencyManagement>
  101. <build>
  102. <pluginManagement>
  103. <plugins>
  104. <plugin>
  105. <groupId>org.apache.felix</groupId>
  106. <artifactId>maven-bundle-plugin</artifactId>
  107. <version>${maven.bundle.plugin.version}</version>
  108. <configuration>
  109. <supportedProjectTypes>
  110. <supportedProjectType>jar</supportedProjectType>
  111. <supportedProjectType>bundle</supportedProjectType>
  112. <supportedProjectType>war</supportedProjectType>
  113. </supportedProjectTypes>
  114. <instructions>
  115. <Bundle-SymbolicName>${Bundle-SymbolicName}</Bundle-SymbolicName>
  116. <Import-Package>*</Import-Package>
  117. <Export-Package>!*</Export-Package>
  118. <_removeheaders>
  119. Private-Package,
  120. Include-Resource,
  121. Embed-Dependency,
  122. Embed-Transitive
  123. </_removeheaders>
  124. <!-- Enable processing of OSGI DS component annotations -->
  125. <_dsannotations>*</_dsannotations>
  126. <!-- Enable processing of OSGI metatype annotations -->
  127. <_metatypeannotations>*</_metatypeannotations>
  128. </instructions>
  129. </configuration>
  130. <executions>
  131. <execution>
  132. <id>manifest</id>
  133. <goals>
  134. <goal>manifest</goal>
  135. </goals>
  136. <configuration>
  137. <supportIncrementalBuild>true</supportIncrementalBuild>
  138. </configuration>
  139. </execution>
  140. <execution>
  141. <id>bundle</id>
  142. <goals>
  143. <goal>bundle</goal>
  144. </goals>
  145. </execution>
  146. </executions>
  147. </plugin>
  148. <plugin>
  149. <groupId>org.apache.karaf.tooling</groupId>
  150. <artifactId>karaf-maven-plugin</artifactId>
  151. <version>${karaf.version}</version>
  152. <extensions>true</extensions>
  153. <configuration>
  154. <startLevel>80</startLevel>
  155. <aggregateFeatures>false</aggregateFeatures>
  156. <includeProjectArtifact>true</includeProjectArtifact>
  157. <primaryFeatureName>${karaf-feature-name}</primaryFeatureName>
  158. </configuration>
  159. <executions>
  160. <execution>
  161. <id>generate-features-file</id>
  162. <phase>package</phase>
  163. <goals>
  164. <goal>features-generate-descriptor</goal>
  165. </goals>
  166. </execution>
  167. </executions>
  168. </plugin>
  169. <plugin>
  170. <groupId>org.sonarsource.scanner.maven</groupId>
  171. <artifactId>sonar-maven-plugin</artifactId>
  172. <version>3.6.0.1398</version>
  173. </plugin>
  174. <plugin>
  175. <groupId>org.apache.maven.plugins</groupId>
  176. <artifactId>maven-surefire-plugin</artifactId>
  177. <version>2.22.2</version>
  178. <configuration>
  179. <useSystemClassLoader>false</useSystemClassLoader>
  180. </configuration>
  181. </plugin>
  182. <plugin>
  183. <groupId>org.jacoco</groupId>
  184. <artifactId>jacoco-maven-plugin</artifactId>
  185. <version>0.8.11</version>
  186. </plugin>
  187. </plugins>
  188. </pluginManagement>
  189. <plugins>
  190. <plugin>
  191. <artifactId>maven-resources-plugin</artifactId>
  192. <version>3.1.0</version>
  193. <executions>
  194. <execution>
  195. <id>filter-resources</id>
  196. <phase>validate</phase>
  197. <goals>
  198. <goal>resources</goal>
  199. </goals>
  200. <configuration>
  201. <resources>
  202. <resource>
  203. <directory>src/main/filtered-resources</directory>
  204. <filtering>true</filtering>
  205. </resource>
  206. </resources>
  207. </configuration>
  208. </execution>
  209. </executions>
  210. </plugin>
  211. <plugin>
  212. <groupId>org.codehaus.mojo</groupId>
  213. <artifactId>build-helper-maven-plugin</artifactId>
  214. <version>3.0.0</version>
  215. <inherited>false</inherited>
  216. <executions>
  217. <execution>
  218. <id>attach-karaf-feature</id>
  219. <phase>package</phase>
  220. <goals>
  221. <goal>attach-artifact</goal>
  222. </goals>
  223. <configuration>
  224. <artifacts>
  225. <artifact>
  226. <file>target/classes/feature.xml</file>
  227. <type>xml</type>
  228. <classifier>features</classifier>
  229. </artifact>
  230. </artifacts>
  231. </configuration>
  232. </execution>
  233. </executions>
  234. </plugin>
  235. <plugin>
  236. <groupId>org.apache.maven.plugins</groupId>
  237. <artifactId>maven-compiler-plugin</artifactId>
  238. <version>3.12.1</version>
  239. <configuration>
  240. <release>17</release>
  241. </configuration>
  242. </plugin>
  243. <plugin>
  244. <groupId>org.apache.maven.plugins</groupId>
  245. <artifactId>maven-source-plugin</artifactId>
  246. <version>2.4</version>
  247. <executions>
  248. <execution>
  249. <id>attach-sources</id>
  250. <goals>
  251. <goal>jar</goal>
  252. </goals>
  253. </execution>
  254. </executions>
  255. </plugin>
  256. <plugin>
  257. <groupId>org.apache.maven.plugins</groupId>
  258. <artifactId>maven-javadoc-plugin</artifactId>
  259. <version>3.6.3</version>
  260. <configuration>
  261. <show>private</show>
  262. </configuration>
  263. <executions>
  264. <execution>
  265. <id>attach-javadocs</id>
  266. <goals>
  267. <goal>jar</goal>
  268. </goals>
  269. </execution>
  270. </executions>
  271. </plugin>
  272. <plugin>
  273. <groupId>org.eluder.coveralls</groupId>
  274. <artifactId>coveralls-maven-plugin</artifactId>
  275. <version>4.3.0</version>
  276. <dependencies>
  277. <dependency>
  278. <groupId>jakarta.xml.bind</groupId>
  279. <artifactId>jakarta.xml.bind-api</artifactId>
  280. <version>2.3.3</version>
  281. </dependency>
  282. </dependencies>
  283. <configuration>
  284. <jacocoReports>
  285. <jacocoReport>${project.basedir}/jacoco-coverage-report/target/site/jacoco-aggregate/jacoco.xml</jacocoReport>
  286. </jacocoReports>
  287. </configuration>
  288. </plugin>
  289. <plugin>
  290. <groupId>org.apache.maven.plugins</groupId>
  291. <artifactId>maven-release-plugin</artifactId>
  292. <version>2.5.3</version>
  293. <configuration>
  294. <releaseProfiles>release-extras</releaseProfiles>
  295. </configuration>
  296. </plugin>
  297. </plugins>
  298. </build>
  299. <licenses>
  300. <license>
  301. <name>Apache License version 2</name>
  302. <url>http://www.apache.org/licenses/LICENSE-2.0</url>
  303. </license>
  304. </licenses>
  305. <developers>
  306. <developer>
  307. <name>Steinar Bang</name>
  308. <email>sb@dod.no</email>
  309. <url>https://steinar.bang.priv.no/</url>
  310. <organization>steinarb-github</organization>
  311. <organizationUrl>https://github.com/steinarb</organizationUrl>
  312. </developer>
  313. </developers>
  314. <scm>
  315. <url>https://github.com/steinarb/post-body-capture</url>
  316. <connection>scm:git:https://github.com/steinarb/post-body-capture.git</connection>
  317. <tag>HEAD</tag>
  318. </scm>
  319. <issueManagement>
  320. <url>https://github.com/steinarb/post-body-capture/issues</url>
  321. <system>Github issue tracker</system>
  322. </issueManagement>
  323. <ciManagement>
  324. <url>https://travis-ci.org/steinarb/post-body-capture</url>
  325. <system>travis-ci</system>
  326. </ciManagement>
  327. <distributionManagement>
  328. <snapshotRepository>
  329. <id>ossrh</id>
  330. <url>https://oss.sonatype.org/content/repositories/snapshots</url>
  331. </snapshotRepository>
  332. <repository>
  333. <id>ossrh</id>
  334. <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
  335. </repository>
  336. </distributionManagement>
  337. <url>http://github.com/steinarb/jersey-demo/</url>
  338. <profiles>
  339. <profile>
  340. <id>release-extras</id>
  341. <build>
  342. <plugins>
  343. <plugin>
  344. <groupId>org.apache.maven.plugins</groupId>
  345. <artifactId>maven-gpg-plugin</artifactId>
  346. <version>1.6</version>
  347. <executions>
  348. <execution>
  349. <id>sign-artifacts</id>
  350. <phase>verify</phase>
  351. <goals>
  352. <goal>sign</goal>
  353. </goals>
  354. <configuration>
  355. <gpgArguments>
  356. <arg>--pinentry-mode</arg>
  357. <arg>loopback</arg>
  358. </gpgArguments>
  359. </configuration>
  360. </execution>
  361. </executions>
  362. </plugin>
  363. <plugin>
  364. <groupId>org.sonatype.plugins</groupId>
  365. <artifactId>nexus-staging-maven-plugin</artifactId>
  366. <version>1.6.8</version>
  367. <extensions>true</extensions>
  368. <configuration>
  369. <serverId>ossrh</serverId>
  370. <nexusUrl>https://oss.sonatype.org/</nexusUrl>
  371. <skipStaging>true</skipStaging>
  372. </configuration>
  373. <executions>
  374. <execution>
  375. <id>default-deploy</id>
  376. <phase>deploy</phase>
  377. <goals>
  378. <goal>deploy</goal>
  379. </goals>
  380. </execution>
  381. </executions>
  382. </plugin>
  383. </plugins>
  384. </build>
  385. </profile>
  386. </profiles>
  387. </project>