pom.xml 6.7 KB

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