rocksjni.pom 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project
  3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
  4. xmlns="http://maven.apache.org/POM/4.0.0"
  5. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  6. <modelVersion>4.0.0</modelVersion>
  7. <name>RocksDB JNI</name>
  8. <url>http://rocksdb.org/</url>
  9. <groupId>org.rocksdb</groupId>
  10. <artifactId>rocksdbjni</artifactId>
  11. <!-- Version will be automatically replaced -->
  12. <version>-</version>
  13. <description>RocksDB fat jar that contains .so files for linux32 and linux64 (glibc and musl-libc), jnilib files
  14. for Mac OSX, and a .dll for Windows x64.
  15. </description>
  16. <licenses>
  17. <license>
  18. <name>Apache License 2.0</name>
  19. <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
  20. <distribution>repo</distribution>
  21. </license>
  22. <license>
  23. <name>GNU General Public License, version 2</name>
  24. <url>http://www.gnu.org/licenses/gpl-2.0.html</url>
  25. <distribution>repo</distribution>
  26. </license>
  27. </licenses>
  28. <scm>
  29. <connection>scm:git:git://github.com/dropwizard/metrics.git</connection>
  30. <developerConnection>scm:git:git@github.com:dropwizard/metrics.git</developerConnection>
  31. <url>http://github.com/dropwizard/metrics/</url>
  32. <tag>HEAD</tag>
  33. </scm>
  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. <properties>
  45. <project.build.source>1.7</project.build.source>
  46. <project.build.target>1.7</project.build.target>
  47. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  48. </properties>
  49. <build>
  50. <plugins>
  51. <plugin>
  52. <groupId>org.apache.maven.plugins</groupId>
  53. <artifactId>maven-compiler-plugin</artifactId>
  54. <version>3.2</version>
  55. <configuration>
  56. <source>${project.build.source}</source>
  57. <target>${project.build.target}</target>
  58. <encoding>${project.build.sourceEncoding}</encoding>
  59. </configuration>
  60. </plugin>
  61. <plugin>
  62. <groupId>org.apache.maven.plugins</groupId>
  63. <artifactId>maven-surefire-plugin</artifactId>
  64. <version>2.18.1</version>
  65. <configuration>
  66. <argLine>${argLine} -ea -Xcheck:jni -Djava.library.path=${project.build.directory}</argLine>
  67. <useManifestOnlyJar>false</useManifestOnlyJar>
  68. <useSystemClassLoader>false</useSystemClassLoader>
  69. <additionalClasspathElements>
  70. <additionalClasspathElement>${project.build.directory}/*</additionalClasspathElement>
  71. </additionalClasspathElements>
  72. </configuration>
  73. </plugin>
  74. <plugin>
  75. <groupId>org.jacoco</groupId>
  76. <artifactId>jacoco-maven-plugin</artifactId>
  77. <version>0.7.2.201409121644</version>
  78. <executions>
  79. <execution>
  80. <goals>
  81. <goal>prepare-agent</goal>
  82. </goals>
  83. </execution>
  84. <execution>
  85. <id>report</id>
  86. <phase>prepare-package</phase>
  87. <goals>
  88. <goal>report</goal>
  89. </goals>
  90. </execution>
  91. </executions>
  92. </plugin>
  93. <plugin>
  94. <groupId>org.codehaus.gmaven</groupId>
  95. <artifactId>groovy-maven-plugin</artifactId>
  96. <version>2.0</version>
  97. <executions>
  98. <execution>
  99. <phase>process-classes</phase>
  100. <goals>
  101. <goal>execute</goal>
  102. </goals>
  103. <configuration>
  104. <defaults>
  105. <name>Xenu</name>
  106. </defaults>
  107. <source>
  108. String fileContents = new File(project.basedir.absolutePath + '/../include/rocksdb/version.h').getText('UTF-8')
  109. matcher = (fileContents =~ /(?s).*ROCKSDB_MAJOR ([0-9]+).*?/)
  110. String major_version = matcher.getAt(0).getAt(1)
  111. matcher = (fileContents =~ /(?s).*ROCKSDB_MINOR ([0-9]+).*?/)
  112. String minor_version = matcher.getAt(0).getAt(1)
  113. matcher = (fileContents =~ /(?s).*ROCKSDB_PATCH ([0-9]+).*?/)
  114. String patch_version = matcher.getAt(0).getAt(1)
  115. String version = String.format('%s.%s.%s', major_version, minor_version, patch_version)
  116. // Set version to be used in pom.properties
  117. project.version = version
  118. // Set version to be set as jar name
  119. project.build.finalName = project.artifactId + "-" + version
  120. </source>
  121. </configuration>
  122. </execution>
  123. </executions>
  124. </plugin>
  125. </plugins>
  126. </build>
  127. <dependencies>
  128. <dependency>
  129. <groupId>junit</groupId>
  130. <artifactId>junit</artifactId>
  131. <version>4.12</version>
  132. <scope>test</scope>
  133. </dependency>
  134. <dependency>
  135. <groupId>org.assertj</groupId>
  136. <artifactId>assertj-core</artifactId>
  137. <version>1.7.1</version>
  138. <scope>test</scope>
  139. </dependency>
  140. <dependency>
  141. <groupId>org.mockito</groupId>
  142. <artifactId>mockito-all</artifactId>
  143. <version>1.10.19</version>
  144. <scope>test</scope>
  145. </dependency>
  146. </dependencies>
  147. </project>