pom.xml 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  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. <exclusion>
  57. <groupId>org.bouncycastle</groupId>
  58. <artifactId>bcprov-jdk15on</artifactId>
  59. </exclusion>
  60. </exclusions>
  61. </dependency>
  62. <dependency>
  63. <artifactId>ratis-netty</artifactId>
  64. <groupId>org.apache.ratis</groupId>
  65. </dependency>
  66. <dependency>
  67. <artifactId>ratis-grpc</artifactId>
  68. <groupId>org.apache.ratis</groupId>
  69. </dependency>
  70. <dependency>
  71. <groupId>com.google.errorprone</groupId>
  72. <artifactId>error_prone_annotations</artifactId>
  73. <version>2.2.0</version>
  74. <optional>true</optional>
  75. </dependency>
  76. <dependency>
  77. <groupId>org.rocksdb</groupId>
  78. <artifactId>rocksdbjni</artifactId>
  79. <version>5.14.2</version>
  80. </dependency>
  81. <dependency>
  82. <groupId>org.apache.hadoop</groupId>
  83. <artifactId>hadoop-common</artifactId>
  84. <scope>test</scope>
  85. <type>test-jar</type>
  86. </dependency>
  87. <dependency>
  88. <groupId>org.apache.logging.log4j</groupId>
  89. <artifactId>log4j-api</artifactId>
  90. <version>${log4j2.version}</version>
  91. </dependency>
  92. <dependency>
  93. <groupId>org.apache.logging.log4j</groupId>
  94. <artifactId>log4j-core</artifactId>
  95. <version>${log4j2.version}</version>
  96. </dependency>
  97. <dependency>
  98. <groupId>com.lmax</groupId>
  99. <artifactId>disruptor</artifactId>
  100. <version>${disruptor.version}</version>
  101. </dependency>
  102. <dependency>
  103. <groupId>org.apache.commons</groupId>
  104. <artifactId>commons-pool2</artifactId>
  105. <version>2.6.0</version>
  106. </dependency>
  107. <dependency>
  108. <groupId>org.bouncycastle</groupId>
  109. <artifactId>bcpkix-jdk15on</artifactId>
  110. <version>1.54</version>
  111. </dependency>
  112. </dependencies>
  113. <build>
  114. <resources>
  115. <resource>
  116. <directory>${basedir}/src/main/resources</directory>
  117. <excludes>
  118. <exclude>hdds-version-info.properties</exclude>
  119. </excludes>
  120. <filtering>false</filtering>
  121. </resource>
  122. <resource>
  123. <directory>${basedir}/src/main/resources</directory>
  124. <includes>
  125. <include>hdds-version-info.properties</include>
  126. </includes>
  127. <filtering>true</filtering>
  128. </resource>
  129. </resources>
  130. <extensions>
  131. <extension>
  132. <groupId>kr.motd.maven</groupId>
  133. <artifactId>os-maven-plugin</artifactId>
  134. <version>${os-maven-plugin.version}</version>
  135. </extension>
  136. </extensions>
  137. <plugins>
  138. <plugin>
  139. <groupId>org.xolstice.maven.plugins</groupId>
  140. <artifactId>protobuf-maven-plugin</artifactId>
  141. <version>${protobuf-maven-plugin.version}</version>
  142. <extensions>true</extensions>
  143. <configuration>
  144. <protocArtifact>
  145. com.google.protobuf:protoc:${protobuf-compile.version}:exe:${os.detected.classifier}
  146. </protocArtifact>
  147. <protoSourceRoot>${basedir}/src/main/proto/</protoSourceRoot>
  148. <includes>
  149. <include>DatanodeContainerProtocol.proto</include>
  150. </includes>
  151. <outputDirectory>target/generated-sources/java</outputDirectory>
  152. <clearOutputDirectory>false</clearOutputDirectory>
  153. </configuration>
  154. <executions>
  155. <execution>
  156. <id>compile-protoc</id>
  157. <goals>
  158. <goal>compile</goal>
  159. <goal>test-compile</goal>
  160. <goal>compile-custom</goal>
  161. <goal>test-compile-custom</goal>
  162. </goals>
  163. <configuration>
  164. <pluginId>grpc-java</pluginId>
  165. <pluginArtifact>
  166. io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}
  167. </pluginArtifact>
  168. </configuration>
  169. </execution>
  170. </executions>
  171. </plugin>
  172. <plugin>
  173. <artifactId>maven-antrun-plugin</artifactId>
  174. <executions>
  175. <execution>
  176. <phase>generate-sources</phase>
  177. <configuration>
  178. <tasks>
  179. <replace token="com.google.protobuf" value="org.apache.ratis.thirdparty.com.google.protobuf"
  180. dir="target/generated-sources/java/org/apache/hadoop/hdds/protocol/datanode/proto">
  181. </replace>
  182. <replace token="io.grpc" value="org.apache.ratis.thirdparty.io.grpc"
  183. dir="target/generated-sources/java/org/apache/hadoop/hdds/protocol/datanode/proto">
  184. </replace>
  185. </tasks>
  186. </configuration>
  187. <goals>
  188. <goal>run</goal>
  189. </goals>
  190. </execution>
  191. </executions>
  192. </plugin>
  193. <plugin>
  194. <groupId>org.apache.hadoop</groupId>
  195. <artifactId>hadoop-maven-plugins</artifactId>
  196. <executions>
  197. <execution>
  198. <id>version-info</id>
  199. <phase>generate-resources</phase>
  200. <goals>
  201. <goal>version-info</goal>
  202. </goals>
  203. <configuration>
  204. <source>
  205. <directory>${basedir}/../</directory>
  206. <includes>
  207. <include>*/src/main/java/**/*.java</include>
  208. <include>*/src/main/proto/*.proto</include>
  209. </includes>
  210. </source>
  211. </configuration>
  212. </execution>
  213. <execution>
  214. <id>compile-protoc</id>
  215. <goals>
  216. <goal>protoc</goal>
  217. </goals>
  218. <configuration>
  219. <protocVersion>${protobuf.version}</protocVersion>
  220. <protocCommand>${protoc.path}</protocCommand>
  221. <imports>
  222. <param>
  223. ${basedir}/../../hadoop-common-project/hadoop-common/src/main/proto
  224. </param>
  225. <param>${basedir}/src/main/proto</param>
  226. </imports>
  227. <source>
  228. <directory>${basedir}/src/main/proto</directory>
  229. <includes>
  230. <include>StorageContainerLocationProtocol.proto</include>
  231. <include>hdds.proto</include>
  232. <include>ScmBlockLocationProtocol.proto</include>
  233. <include>SCMSecurityProtocol.proto</include>
  234. </includes>
  235. </source>
  236. </configuration>
  237. </execution>
  238. </executions>
  239. </plugin>
  240. <plugin>
  241. <groupId>org.codehaus.mojo</groupId>
  242. <artifactId>findbugs-maven-plugin</artifactId>
  243. <configuration>
  244. <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
  245. </configuration>
  246. </plugin>
  247. </plugins>
  248. </build>
  249. </project>