pom.xml.template 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  3. <modelVersion>4.0.0</modelVersion>
  4. <groupId>org.rocksdb</groupId>
  5. <artifactId>rocksdbjni</artifactId>
  6. <version>${ROCKSDB_JAVA_VERSION}</version> <!-- this will be replaced by the Makefile's rocksdbjavageneratepom target -->
  7. <name>RocksDB JNI</name>
  8. <description>RocksDB fat jar that contains .so files for linux32 and linux64 (glibc and musl-libc), jnilib files
  9. for Mac OSX, and a .dll for Windows x64.
  10. </description>
  11. <url>https://rocksdb.org</url>
  12. <inceptionYear>2012</inceptionYear>
  13. <licenses>
  14. <license>
  15. <name>Apache License 2.0</name>
  16. <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
  17. <distribution>repo</distribution>
  18. </license>
  19. <license>
  20. <name>GNU General Public License, version 2</name>
  21. <url>http://www.gnu.org/licenses/gpl-2.0.html</url>
  22. <distribution>repo</distribution>
  23. </license>
  24. </licenses>
  25. <scm>
  26. <connection>scm:git:https://github.com/facebook/rocksdb.git</connection>
  27. <developerConnection>scm:git:https://github.com/facebook/rocksdb.git</developerConnection>
  28. <url>scm:git:https://github.com/facebook/rocksdb.git</url>
  29. </scm>
  30. <organization>
  31. <name>Facebook</name>
  32. <url>https://www.facebook.com</url>
  33. </organization>
  34. <developers>
  35. <developer>
  36. <name>Facebook</name>
  37. <email>help@facebook.com</email>
  38. <timezone>America/New_York</timezone>
  39. <roles>
  40. <role>architect</role>
  41. </roles>
  42. </developer>
  43. </developers>
  44. <mailingLists>
  45. <mailingList>
  46. <name>rocksdb - Google Groups</name>
  47. <subscribe>rocksdb-subscribe@googlegroups.com</subscribe>
  48. <unsubscribe>rocksdb-unsubscribe@googlegroups.com</unsubscribe>
  49. <post>rocksdb@googlegroups.com</post>
  50. <archive>https://groups.google.com/forum/#!forum/rocksdb</archive>
  51. </mailingList>
  52. </mailingLists>
  53. <properties>
  54. <project.build.source>1.8</project.build.source>
  55. <project.build.target>1.8</project.build.target>
  56. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  57. </properties>
  58. <build>
  59. <plugins>
  60. <plugin>
  61. <groupId>org.apache.maven.plugins</groupId>
  62. <artifactId>maven-compiler-plugin</artifactId>
  63. <version>3.2</version>
  64. <configuration>
  65. <source>${project.build.source}</source>
  66. <target>${project.build.target}</target>
  67. <encoding>${project.build.sourceEncoding}</encoding>
  68. </configuration>
  69. </plugin>
  70. <plugin>
  71. <groupId>org.apache.maven.plugins</groupId>
  72. <artifactId>maven-surefire-plugin</artifactId>
  73. <version>2.18.1</version>
  74. <configuration>
  75. <argLine>${argLine} -ea -Xcheck:jni -Djava.library.path=${project.build.directory}</argLine>
  76. <useManifestOnlyJar>false</useManifestOnlyJar>
  77. <useSystemClassLoader>false</useSystemClassLoader>
  78. <additionalClasspathElements>
  79. <additionalClasspathElement>${project.build.directory}/*</additionalClasspathElement>
  80. </additionalClasspathElements>
  81. </configuration>
  82. </plugin>
  83. <plugin>
  84. <groupId>org.jacoco</groupId>
  85. <artifactId>jacoco-maven-plugin</artifactId>
  86. <version>0.7.2.201409121644</version>
  87. <executions>
  88. <execution>
  89. <goals>
  90. <goal>prepare-agent</goal>
  91. </goals>
  92. </execution>
  93. <execution>
  94. <id>report</id>
  95. <phase>prepare-package</phase>
  96. <goals>
  97. <goal>report</goal>
  98. </goals>
  99. </execution>
  100. </executions>
  101. </plugin>
  102. <plugin>
  103. <groupId>org.codehaus.gmaven</groupId>
  104. <artifactId>groovy-maven-plugin</artifactId>
  105. <version>2.0</version>
  106. <executions>
  107. <execution>
  108. <phase>process-classes</phase>
  109. <goals>
  110. <goal>execute</goal>
  111. </goals>
  112. <configuration>
  113. <defaults>
  114. <name>Xenu</name>
  115. </defaults>
  116. <source>
  117. String fileContents = new File(project.basedir.absolutePath + '/../include/rocksdb/version.h').getText('UTF-8')
  118. matcher = (fileContents =~ /(?s).*ROCKSDB_MAJOR ([0-9]+).*?/)
  119. String major_version = matcher.getAt(0).getAt(1)
  120. matcher = (fileContents =~ /(?s).*ROCKSDB_MINOR ([0-9]+).*?/)
  121. String minor_version = matcher.getAt(0).getAt(1)
  122. matcher = (fileContents =~ /(?s).*ROCKSDB_PATCH ([0-9]+).*?/)
  123. String patch_version = matcher.getAt(0).getAt(1)
  124. String version = String.format('%s.%s.%s', major_version, minor_version, patch_version)
  125. // Set version to be used in pom.properties
  126. project.version = version
  127. // Set version to be set as jar name
  128. project.build.finalName = project.artifactId + "-" + version
  129. </source>
  130. </configuration>
  131. </execution>
  132. </executions>
  133. </plugin>
  134. <plugin>
  135. <groupId>com.github.spotbugs</groupId>
  136. <artifactId>spotbugs-maven-plugin</artifactId>
  137. <version>4.7.2.1</version>
  138. <configuration>
  139. <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
  140. </configuration>
  141. <dependencies>
  142. <!-- overwrite dependency on spotbugs if you want to specify the version of spotbugs -->
  143. <dependency>
  144. <groupId>com.github.spotbugs</groupId>
  145. <artifactId>spotbugs</artifactId>
  146. <version>4.7.3</version>
  147. </dependency>
  148. </dependencies>
  149. </plugin>
  150. <plugin>
  151. <groupId>org.apache.maven.plugins</groupId>
  152. <artifactId>maven-pmd-plugin</artifactId>
  153. <version>3.20.0</version>
  154. <executions>
  155. <execution>
  156. <goals>
  157. <goal>check</goal>
  158. <goal>cpd-check</goal>
  159. </goals>
  160. </execution>
  161. </executions>
  162. <configuration>
  163. <rulesets>
  164. <!-- A rule set, that comes bundled with PMD -->
  165. <ruleset>/pmd-rules.xml</ruleset>
  166. <!-- A rule set, that comes bundled with PMD -->
  167. <!-- <ruleset>/category/java/errorprone.xml</ruleset> -->
  168. </rulesets>
  169. </configuration>
  170. </plugin>
  171. </plugins>
  172. </build>
  173. <dependencies>
  174. <dependency>
  175. <groupId>junit</groupId>
  176. <artifactId>junit</artifactId>
  177. <version>4.13.1</version>
  178. <scope>test</scope>
  179. </dependency>
  180. <dependency>
  181. <groupId>org.hamcrest</groupId>
  182. <artifactId>hamcrest</artifactId>
  183. <version>2.2</version>
  184. <scope>test</scope>
  185. </dependency>
  186. <dependency>
  187. <groupId>cglib</groupId>
  188. <artifactId>cglib</artifactId>
  189. <version>3.3.0</version>
  190. <scope>test</scope>
  191. </dependency>
  192. <dependency>
  193. <groupId>org.assertj</groupId>
  194. <artifactId>assertj-core</artifactId>
  195. <version>2.9.0</version>
  196. <scope>test</scope>
  197. </dependency>
  198. <dependency>
  199. <groupId>org.mockito</groupId>
  200. <artifactId>mockito-all</artifactId>
  201. <version>1.10.19</version>
  202. <scope>test</scope>
  203. </dependency>
  204. </dependencies>
  205. <reporting>
  206. <plugins>
  207. <plugin>
  208. <groupId>org.apache.maven.plugins</groupId>
  209. <artifactId>maven-jxr-plugin</artifactId>
  210. <version>3.3.0</version>
  211. </plugin>
  212. </plugins>
  213. </reporting>
  214. </project>