pom.xml 8.4 KB

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