pom.xml 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  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.3.0-SNAPSHOT</version>
  22. </parent>
  23. <artifactId>hadoop-hdds-common</artifactId>
  24. <version>0.3.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.3.0-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.14.2</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. <dependency>
  96. <groupId>org.apache.commons</groupId>
  97. <artifactId>commons-pool2</artifactId>
  98. <version>2.6.0</version>
  99. </dependency>
  100. </dependencies>
  101. <build>
  102. <resources>
  103. <resource>
  104. <directory>${basedir}/src/main/resources</directory>
  105. <excludes>
  106. <exclude>hdds-version-info.properties</exclude>
  107. </excludes>
  108. <filtering>false</filtering>
  109. </resource>
  110. <resource>
  111. <directory>${basedir}/src/main/resources</directory>
  112. <includes>
  113. <include>hdds-version-info.properties</include>
  114. </includes>
  115. <filtering>true</filtering>
  116. </resource>
  117. </resources>
  118. <extensions>
  119. <extension>
  120. <groupId>kr.motd.maven</groupId>
  121. <artifactId>os-maven-plugin</artifactId>
  122. <version>${os-maven-plugin.version}</version>
  123. </extension>
  124. </extensions>
  125. <plugins>
  126. <plugin>
  127. <groupId>org.xolstice.maven.plugins</groupId>
  128. <artifactId>protobuf-maven-plugin</artifactId>
  129. <version>${protobuf-maven-plugin.version}</version>
  130. <extensions>true</extensions>
  131. <configuration>
  132. <protocArtifact>
  133. com.google.protobuf:protoc:${protobuf-compile.version}:exe:${os.detected.classifier}
  134. </protocArtifact>
  135. <protoSourceRoot>${basedir}/src/main/proto/</protoSourceRoot>
  136. <includes>
  137. <include>DatanodeContainerProtocol.proto</include>
  138. </includes>
  139. <outputDirectory>target/generated-sources/java</outputDirectory>
  140. <clearOutputDirectory>false</clearOutputDirectory>
  141. </configuration>
  142. <executions>
  143. <execution>
  144. <id>compile-protoc</id>
  145. <goals>
  146. <goal>compile</goal>
  147. <goal>test-compile</goal>
  148. <goal>compile-custom</goal>
  149. <goal>test-compile-custom</goal>
  150. </goals>
  151. <configuration>
  152. <pluginId>grpc-java</pluginId>
  153. <pluginArtifact>
  154. io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}
  155. </pluginArtifact>
  156. </configuration>
  157. </execution>
  158. </executions>
  159. </plugin>
  160. <plugin>
  161. <artifactId>maven-antrun-plugin</artifactId>
  162. <executions>
  163. <execution>
  164. <phase>generate-sources</phase>
  165. <configuration>
  166. <tasks>
  167. <replace token="com.google.protobuf" value="org.apache.ratis.shaded.com.google.protobuf"
  168. dir="target/generated-sources/java/org/apache/hadoop/hdds/protocol/datanode/proto">
  169. </replace>
  170. <replace token="io.grpc" value="org.apache.ratis.shaded.io.grpc"
  171. dir="target/generated-sources/java/org/apache/hadoop/hdds/protocol/datanode/proto">
  172. </replace>
  173. </tasks>
  174. </configuration>
  175. <goals>
  176. <goal>run</goal>
  177. </goals>
  178. </execution>
  179. </executions>
  180. </plugin>
  181. <plugin>
  182. <groupId>org.apache.hadoop</groupId>
  183. <artifactId>hadoop-maven-plugins</artifactId>
  184. <executions>
  185. <execution>
  186. <id>version-info</id>
  187. <phase>generate-resources</phase>
  188. <goals>
  189. <goal>version-info</goal>
  190. </goals>
  191. <configuration>
  192. <source>
  193. <directory>${basedir}/../</directory>
  194. <includes>
  195. <include>*/src/main/java/**/*.java</include>
  196. <include>*/src/main/proto/*.proto</include>
  197. </includes>
  198. </source>
  199. </configuration>
  200. </execution>
  201. <execution>
  202. <id>compile-protoc</id>
  203. <goals>
  204. <goal>protoc</goal>
  205. </goals>
  206. <configuration>
  207. <protocVersion>${protobuf.version}</protocVersion>
  208. <protocCommand>${protoc.path}</protocCommand>
  209. <imports>
  210. <param>
  211. ${basedir}/../../hadoop-common-project/hadoop-common/src/main/proto
  212. </param>
  213. <param>
  214. ${basedir}/../../hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/
  215. </param>
  216. <param>
  217. ${basedir}/../../hadoop-hdfs-project/hadoop-hdfs/src/main/proto/
  218. </param>
  219. <param>${basedir}/src/main/proto</param>
  220. </imports>
  221. <source>
  222. <directory>${basedir}/src/main/proto</directory>
  223. <includes>
  224. <include>StorageContainerLocationProtocol.proto</include>
  225. <include>hdds.proto</include>
  226. <include>ScmBlockLocationProtocol.proto</include>
  227. </includes>
  228. </source>
  229. </configuration>
  230. </execution>
  231. </executions>
  232. </plugin>
  233. <plugin>
  234. <groupId>org.codehaus.mojo</groupId>
  235. <artifactId>findbugs-maven-plugin</artifactId>
  236. <configuration>
  237. <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
  238. </configuration>
  239. </plugin>
  240. </plugins>
  241. </build>
  242. </project>