pom.xml 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License. See accompanying LICENSE file.
  12. -->
  13. <project xmlns="http://maven.apache.org/POM/4.0.0"
  14. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  15. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
  16. http://maven.apache.org/xsd/maven-4.0.0.xsd">
  17. <modelVersion>4.0.0</modelVersion>
  18. <parent>
  19. <groupId>org.apache.hadoop</groupId>
  20. <artifactId>hadoop-hdds</artifactId>
  21. <version>0.4.0-SNAPSHOT</version>
  22. </parent>
  23. <artifactId>hadoop-hdds-common</artifactId>
  24. <version>0.4.0-SNAPSHOT</version>
  25. <description>Apache Hadoop Distributed Data Store Common</description>
  26. <name>Apache Hadoop HDDS Common</name>
  27. <packaging>jar</packaging>
  28. <properties>
  29. <hdds.version>0.4.0-SNAPSHOT</hdds.version>
  30. <log4j2.version>2.11.0</log4j2.version>
  31. <disruptor.version>3.4.2</disruptor.version>
  32. <declared.hdds.version>${hdds.version}</declared.hdds.version>
  33. </properties>
  34. <dependencies>
  35. <dependency>
  36. <groupId>javax.annotation</groupId>
  37. <artifactId>javax.annotation-api</artifactId>
  38. <version>1.2</version>
  39. </dependency>
  40. <dependency>
  41. <groupId>org.fusesource.leveldbjni</groupId>
  42. <artifactId>leveldbjni-all</artifactId>
  43. </dependency>
  44. <dependency>
  45. <artifactId>ratis-server</artifactId>
  46. <groupId>org.apache.ratis</groupId>
  47. <exclusions>
  48. <exclusion>
  49. <groupId>org.slf4j</groupId>
  50. <artifactId>slf4j-log4j12</artifactId>
  51. </exclusion>
  52. <exclusion>
  53. <groupId>io.dropwizard.metrics</groupId>
  54. <artifactId>metrics-core</artifactId>
  55. </exclusion>
  56. </exclusions>
  57. </dependency>
  58. <dependency>
  59. <artifactId>ratis-netty</artifactId>
  60. <groupId>org.apache.ratis</groupId>
  61. </dependency>
  62. <dependency>
  63. <artifactId>ratis-grpc</artifactId>
  64. <groupId>org.apache.ratis</groupId>
  65. </dependency>
  66. <dependency>
  67. <groupId>com.google.errorprone</groupId>
  68. <artifactId>error_prone_annotations</artifactId>
  69. <version>2.2.0</version>
  70. <optional>true</optional>
  71. </dependency>
  72. <dependency>
  73. <groupId>org.rocksdb</groupId>
  74. <artifactId>rocksdbjni</artifactId>
  75. <version>5.14.2</version>
  76. </dependency>
  77. <dependency>
  78. <groupId>org.apache.hadoop</groupId>
  79. <artifactId>hadoop-common</artifactId>
  80. <scope>test</scope>
  81. <type>test-jar</type>
  82. </dependency>
  83. <dependency>
  84. <groupId>org.apache.logging.log4j</groupId>
  85. <artifactId>log4j-api</artifactId>
  86. <version>${log4j2.version}</version>
  87. </dependency>
  88. <dependency>
  89. <groupId>org.apache.logging.log4j</groupId>
  90. <artifactId>log4j-core</artifactId>
  91. <version>${log4j2.version}</version>
  92. </dependency>
  93. <dependency>
  94. <groupId>com.lmax</groupId>
  95. <artifactId>disruptor</artifactId>
  96. <version>${disruptor.version}</version>
  97. </dependency>
  98. <dependency>
  99. <groupId>org.apache.commons</groupId>
  100. <artifactId>commons-pool2</artifactId>
  101. <version>2.6.0</version>
  102. </dependency>
  103. <dependency>
  104. <groupId>org.bouncycastle</groupId>
  105. <artifactId>bcprov-jdk15on</artifactId>
  106. <version>1.49</version>
  107. </dependency>
  108. </dependencies>
  109. <build>
  110. <resources>
  111. <resource>
  112. <directory>${basedir}/src/main/resources</directory>
  113. <excludes>
  114. <exclude>hdds-version-info.properties</exclude>
  115. </excludes>
  116. <filtering>false</filtering>
  117. </resource>
  118. <resource>
  119. <directory>${basedir}/src/main/resources</directory>
  120. <includes>
  121. <include>hdds-version-info.properties</include>
  122. </includes>
  123. <filtering>true</filtering>
  124. </resource>
  125. </resources>
  126. <extensions>
  127. <extension>
  128. <groupId>kr.motd.maven</groupId>
  129. <artifactId>os-maven-plugin</artifactId>
  130. <version>${os-maven-plugin.version}</version>
  131. </extension>
  132. </extensions>
  133. <plugins>
  134. <plugin>
  135. <groupId>org.xolstice.maven.plugins</groupId>
  136. <artifactId>protobuf-maven-plugin</artifactId>
  137. <version>${protobuf-maven-plugin.version}</version>
  138. <extensions>true</extensions>
  139. <configuration>
  140. <protocArtifact>
  141. com.google.protobuf:protoc:${protobuf-compile.version}:exe:${os.detected.classifier}
  142. </protocArtifact>
  143. <protoSourceRoot>${basedir}/src/main/proto/</protoSourceRoot>
  144. <includes>
  145. <include>DatanodeContainerProtocol.proto</include>
  146. </includes>
  147. <outputDirectory>target/generated-sources/java</outputDirectory>
  148. <clearOutputDirectory>false</clearOutputDirectory>
  149. </configuration>
  150. <executions>
  151. <execution>
  152. <id>compile-protoc</id>
  153. <goals>
  154. <goal>compile</goal>
  155. <goal>test-compile</goal>
  156. <goal>compile-custom</goal>
  157. <goal>test-compile-custom</goal>
  158. </goals>
  159. <configuration>
  160. <pluginId>grpc-java</pluginId>
  161. <pluginArtifact>
  162. io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}
  163. </pluginArtifact>
  164. </configuration>
  165. </execution>
  166. </executions>
  167. </plugin>
  168. <plugin>
  169. <artifactId>maven-antrun-plugin</artifactId>
  170. <executions>
  171. <execution>
  172. <phase>generate-sources</phase>
  173. <configuration>
  174. <tasks>
  175. <replace token="com.google.protobuf" value="org.apache.ratis.thirdparty.com.google.protobuf"
  176. dir="target/generated-sources/java/org/apache/hadoop/hdds/protocol/datanode/proto">
  177. </replace>
  178. <replace token="io.grpc" value="org.apache.ratis.thirdparty.io.grpc"
  179. dir="target/generated-sources/java/org/apache/hadoop/hdds/protocol/datanode/proto">
  180. </replace>
  181. </tasks>
  182. </configuration>
  183. <goals>
  184. <goal>run</goal>
  185. </goals>
  186. </execution>
  187. </executions>
  188. </plugin>
  189. <plugin>
  190. <groupId>org.apache.hadoop</groupId>
  191. <artifactId>hadoop-maven-plugins</artifactId>
  192. <executions>
  193. <execution>
  194. <id>version-info</id>
  195. <phase>generate-resources</phase>
  196. <goals>
  197. <goal>version-info</goal>
  198. </goals>
  199. <configuration>
  200. <source>
  201. <directory>${basedir}/../</directory>
  202. <includes>
  203. <include>*/src/main/java/**/*.java</include>
  204. <include>*/src/main/proto/*.proto</include>
  205. </includes>
  206. </source>
  207. </configuration>
  208. </execution>
  209. <execution>
  210. <id>compile-protoc</id>
  211. <goals>
  212. <goal>protoc</goal>
  213. </goals>
  214. <configuration>
  215. <protocVersion>${protobuf.version}</protocVersion>
  216. <protocCommand>${protoc.path}</protocCommand>
  217. <imports>
  218. <param>
  219. ${basedir}/../../hadoop-common-project/hadoop-common/src/main/proto
  220. </param>
  221. <param>${basedir}/src/main/proto</param>
  222. </imports>
  223. <source>
  224. <directory>${basedir}/src/main/proto</directory>
  225. <includes>
  226. <include>StorageContainerLocationProtocol.proto</include>
  227. <include>hdds.proto</include>
  228. <include>ScmBlockLocationProtocol.proto</include>
  229. </includes>
  230. </source>
  231. </configuration>
  232. </execution>
  233. </executions>
  234. </plugin>
  235. <plugin>
  236. <groupId>org.codehaus.mojo</groupId>
  237. <artifactId>findbugs-maven-plugin</artifactId>
  238. <configuration>
  239. <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
  240. </configuration>
  241. </plugin>
  242. </plugins>
  243. </build>
  244. </project>