pom.xml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  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. https://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-project-dist</artifactId>
  21. <version>2.10.0-SNAPSHOT</version>
  22. <relativePath>../../hadoop-project-dist</relativePath>
  23. </parent>
  24. <artifactId>hadoop-hdfs-rbf</artifactId>
  25. <version>2.10.0-SNAPSHOT</version>
  26. <description>Apache Hadoop HDFS-RBF</description>
  27. <name>Apache Hadoop HDFS-RBF</name>
  28. <packaging>jar</packaging>
  29. <properties>
  30. <hadoop.component>hdfs</hadoop.component>
  31. </properties>
  32. <dependencies>
  33. <dependency>
  34. <groupId>org.apache.hadoop</groupId>
  35. <artifactId>hadoop-common</artifactId>
  36. <scope>provided</scope>
  37. <exclusions>
  38. <exclusion>
  39. <groupId>commons-logging</groupId>
  40. <artifactId>commons-logging</artifactId>
  41. </exclusion>
  42. <exclusion>
  43. <groupId>log4j</groupId>
  44. <artifactId>log4j</artifactId>
  45. </exclusion>
  46. </exclusions>
  47. </dependency>
  48. <dependency>
  49. <groupId>org.apache.hadoop</groupId>
  50. <artifactId>hadoop-hdfs</artifactId>
  51. <scope>provided</scope>
  52. </dependency>
  53. <dependency>
  54. <groupId>org.apache.hadoop</groupId>
  55. <artifactId>hadoop-hdfs-client</artifactId>
  56. <scope>provided</scope>
  57. </dependency>
  58. <dependency>
  59. <groupId>org.slf4j</groupId>
  60. <artifactId>slf4j-log4j12</artifactId>
  61. <scope>provided</scope>
  62. </dependency>
  63. <dependency>
  64. <groupId>org.mortbay.jetty</groupId>
  65. <artifactId>jetty</artifactId>
  66. <scope>compile</scope>
  67. </dependency>
  68. <dependency>
  69. <groupId>org.mortbay.jetty</groupId>
  70. <artifactId>jetty-util</artifactId>
  71. <scope>compile</scope>
  72. </dependency>
  73. <dependency>
  74. <groupId>org.apache.hadoop</groupId>
  75. <artifactId>hadoop-common</artifactId>
  76. <scope>test</scope>
  77. <type>test-jar</type>
  78. </dependency>
  79. <dependency>
  80. <groupId>com.fasterxml.jackson.core</groupId>
  81. <artifactId>jackson-annotations</artifactId>
  82. </dependency>
  83. <dependency>
  84. <groupId>com.fasterxml.jackson.core</groupId>
  85. <artifactId>jackson-databind</artifactId>
  86. </dependency>
  87. <dependency>
  88. <groupId>junit</groupId>
  89. <artifactId>junit</artifactId>
  90. <scope>test</scope>
  91. </dependency>
  92. <dependency>
  93. <groupId>org.apache.hadoop</groupId>
  94. <artifactId>hadoop-hdfs</artifactId>
  95. <scope>test</scope>
  96. <type>test-jar</type>
  97. </dependency>
  98. <dependency>
  99. <groupId>org.apache.curator</groupId>
  100. <artifactId>curator-test</artifactId>
  101. <scope>test</scope>
  102. </dependency>
  103. <dependency>
  104. <groupId>org.mockito</groupId>
  105. <artifactId>mockito-all</artifactId>
  106. <scope>test</scope>
  107. </dependency>
  108. </dependencies>
  109. <build>
  110. <plugins>
  111. <plugin>
  112. <groupId>org.apache.maven.plugins</groupId>
  113. <artifactId>maven-surefire-plugin</artifactId>
  114. </plugin>
  115. <plugin>
  116. <groupId>org.apache.maven.plugins</groupId>
  117. <artifactId>maven-antrun-plugin</artifactId>
  118. <configuration>
  119. <skipTests>false</skipTests>
  120. </configuration>
  121. <executions>
  122. <execution>
  123. <id>create-web-xmls</id>
  124. <phase>compile</phase>
  125. <goals>
  126. <goal>run</goal>
  127. </goals>
  128. <configuration>
  129. <target>
  130. <copy file="${basedir}/src/main/webapps/proto-web.xml"
  131. tofile="${project.build.directory}/webapps/router/WEB-INF/web.xml"
  132. filtering="true"/>
  133. <copy toDir="${project.build.directory}/webapps">
  134. <fileset dir="${basedir}/src/main/webapps">
  135. <exclude name="**/proto-web.xml"/>
  136. </fileset>
  137. </copy>
  138. <replace dir="${project.build.directory}/webapps" value="${release-year}">
  139. <include name="**/*.html"/>
  140. <replacetoken>{release-year-token}</replacetoken>
  141. </replace>
  142. </target>
  143. </configuration>
  144. </execution>
  145. <execution>
  146. <id>create-log-dir</id>
  147. <phase>process-test-resources</phase>
  148. <goals>
  149. <goal>run</goal>
  150. </goals>
  151. <configuration>
  152. <target>
  153. <copy todir="${project.build.directory}/test-classes/webapps">
  154. <fileset dir="${project.build.directory}/webapps">
  155. <exclude name="proto-*-web.xml"/>
  156. <exclude name="**/proto-web.xml"/>
  157. </fileset>
  158. </copy>
  159. </target>
  160. </configuration>
  161. </execution>
  162. <execution>
  163. <phase>pre-site</phase>
  164. <goals>
  165. <goal>run</goal>
  166. </goals>
  167. <configuration>
  168. <tasks>
  169. <copy file="src/main/resources/hdfs-rbf-default.xml" todir="src/site/resources"/>
  170. <copy file="src/main/xsl/configuration.xsl" todir="src/site/resources"/>
  171. </tasks>
  172. </configuration>
  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>compile-protoc</id>
  182. <goals>
  183. <goal>protoc</goal>
  184. </goals>
  185. <configuration>
  186. <protocVersion>${protobuf.version}</protocVersion>
  187. <protocCommand>${protoc.path}</protocCommand>
  188. <imports>
  189. <param>${basedir}/../hadoop-hdfs-client/src/main/proto</param>
  190. <param>${basedir}/../../hadoop-common-project/hadoop-common/src/main/proto</param>
  191. <param>${basedir}/src/main/proto</param>
  192. </imports>
  193. <source>
  194. <directory>${basedir}/src/main/proto</directory>
  195. <includes>
  196. <include>FederationProtocol.proto</include>
  197. <include>RouterProtocol.proto</include>
  198. </includes>
  199. </source>
  200. </configuration>
  201. </execution>
  202. </executions>
  203. </plugin>
  204. <plugin>
  205. <groupId>org.apache.maven.plugins</groupId>
  206. <artifactId>maven-javadoc-plugin</artifactId>
  207. </plugin>
  208. <plugin>
  209. <groupId>org.apache.rat</groupId>
  210. <artifactId>apache-rat-plugin</artifactId>
  211. <configuration>
  212. <excludes>
  213. <exclude>.gitattributes</exclude>
  214. <exclude>.idea/**</exclude>
  215. <exclude>dev-support/findbugsExcludeFile.xml</exclude>
  216. <exclude>src/main/webapps/router/robots.txt</exclude>
  217. <exclude>src/site/resources/images/*</exclude>
  218. </excludes>
  219. </configuration>
  220. </plugin>
  221. <plugin>
  222. <artifactId>maven-clean-plugin</artifactId>
  223. <configuration>
  224. <filesets>
  225. <fileset>
  226. <directory>src/site/resources</directory>
  227. <includes>
  228. <include>hdfs-rbf-default.xml</include>
  229. </includes>
  230. <followSymlinks>false</followSymlinks>
  231. </fileset>
  232. </filesets>
  233. </configuration>
  234. </plugin>
  235. </plugins>
  236. </build>
  237. </project>