pom.xml 7.3 KB

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