pom.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  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>3.4.0-SNAPSHOT</version>
  22. <relativePath>../../hadoop-project-dist</relativePath>
  23. </parent>
  24. <artifactId>hadoop-hdfs-rbf</artifactId>
  25. <version>3.4.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.bouncycastle</groupId>
  35. <artifactId>bcprov-jdk15on</artifactId>
  36. <scope>test</scope>
  37. </dependency>
  38. <dependency>
  39. <groupId>org.apache.hadoop</groupId>
  40. <artifactId>hadoop-minikdc</artifactId>
  41. <scope>test</scope>
  42. </dependency>
  43. <dependency>
  44. <groupId>org.apache.hadoop</groupId>
  45. <artifactId>hadoop-common</artifactId>
  46. <scope>provided</scope>
  47. <exclusions>
  48. <exclusion>
  49. <groupId>commons-logging</groupId>
  50. <artifactId>commons-logging</artifactId>
  51. </exclusion>
  52. <exclusion>
  53. <groupId>log4j</groupId>
  54. <artifactId>log4j</artifactId>
  55. </exclusion>
  56. </exclusions>
  57. </dependency>
  58. <dependency>
  59. <groupId>org.apache.hadoop</groupId>
  60. <artifactId>hadoop-hdfs</artifactId>
  61. <scope>provided</scope>
  62. </dependency>
  63. <dependency>
  64. <groupId>org.apache.hadoop</groupId>
  65. <artifactId>hadoop-hdfs-client</artifactId>
  66. <scope>provided</scope>
  67. </dependency>
  68. <dependency>
  69. <groupId>org.apache.hadoop</groupId>
  70. <artifactId>hadoop-federation-balance</artifactId>
  71. <scope>provided</scope>
  72. </dependency>
  73. <dependency>
  74. <groupId>org.slf4j</groupId>
  75. <artifactId>slf4j-log4j12</artifactId>
  76. <scope>provided</scope>
  77. </dependency>
  78. <dependency>
  79. <groupId>org.eclipse.jetty</groupId>
  80. <artifactId>jetty-util-ajax</artifactId>
  81. <scope>compile</scope>
  82. </dependency>
  83. <dependency>
  84. <groupId>org.apache.hadoop</groupId>
  85. <artifactId>hadoop-common</artifactId>
  86. <scope>test</scope>
  87. <type>test-jar</type>
  88. </dependency>
  89. <dependency>
  90. <groupId>org.apache.hadoop</groupId>
  91. <artifactId>hadoop-federation-balance</artifactId>
  92. <scope>test</scope>
  93. <type>test-jar</type>
  94. </dependency>
  95. <dependency>
  96. <groupId>org.apache.hadoop</groupId>
  97. <artifactId>hadoop-distcp</artifactId>
  98. <scope>test</scope>
  99. </dependency>
  100. <dependency>
  101. <groupId>com.fasterxml.jackson.core</groupId>
  102. <artifactId>jackson-annotations</artifactId>
  103. </dependency>
  104. <dependency>
  105. <groupId>com.fasterxml.jackson.core</groupId>
  106. <artifactId>jackson-databind</artifactId>
  107. </dependency>
  108. <dependency>
  109. <groupId>junit</groupId>
  110. <artifactId>junit</artifactId>
  111. <scope>test</scope>
  112. </dependency>
  113. <dependency>
  114. <groupId>org.apache.hadoop</groupId>
  115. <artifactId>hadoop-hdfs</artifactId>
  116. <scope>test</scope>
  117. <type>test-jar</type>
  118. </dependency>
  119. <dependency>
  120. <groupId>org.apache.hadoop</groupId>
  121. <artifactId>hadoop-mapreduce-client-app</artifactId>
  122. <scope>test</scope>
  123. </dependency>
  124. <dependency>
  125. <groupId>org.apache.hadoop</groupId>
  126. <artifactId>hadoop-mapreduce-client-hs</artifactId>
  127. <scope>test</scope>
  128. </dependency>
  129. <dependency>
  130. <groupId>org.apache.hadoop</groupId>
  131. <artifactId>hadoop-mapreduce-client-core</artifactId>
  132. <scope>test</scope>
  133. </dependency>
  134. <dependency>
  135. <groupId>org.apache.hadoop</groupId>
  136. <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
  137. <scope>test</scope>
  138. </dependency>
  139. <dependency>
  140. <groupId>org.apache.curator</groupId>
  141. <artifactId>curator-test</artifactId>
  142. <scope>test</scope>
  143. </dependency>
  144. <dependency>
  145. <groupId>org.mockito</groupId>
  146. <artifactId>mockito-core</artifactId>
  147. <scope>test</scope>
  148. </dependency>
  149. <dependency>
  150. <groupId>org.assertj</groupId>
  151. <artifactId>assertj-core</artifactId>
  152. <scope>test</scope>
  153. </dependency>
  154. </dependencies>
  155. <build>
  156. <plugins>
  157. <plugin>
  158. <groupId>org.apache.maven.plugins</groupId>
  159. <artifactId>maven-surefire-plugin</artifactId>
  160. </plugin>
  161. <plugin>
  162. <groupId>org.apache.maven.plugins</groupId>
  163. <artifactId>maven-antrun-plugin</artifactId>
  164. <configuration>
  165. <skipTests>false</skipTests>
  166. </configuration>
  167. <executions>
  168. <execution>
  169. <id>create-web-xmls</id>
  170. <phase>compile</phase>
  171. <goals>
  172. <goal>run</goal>
  173. </goals>
  174. <configuration>
  175. <target>
  176. <copy file="${basedir}/src/main/webapps/proto-web.xml"
  177. tofile="${project.build.directory}/webapps/router/WEB-INF/web.xml"
  178. filtering="true"/>
  179. <copy toDir="${project.build.directory}/webapps">
  180. <fileset dir="${basedir}/src/main/webapps">
  181. <exclude name="**/proto-web.xml"/>
  182. </fileset>
  183. </copy>
  184. <replace dir="${project.build.directory}/webapps" value="${release-year}">
  185. <include name="**/*.html"/>
  186. <replacetoken>{release-year-token}</replacetoken>
  187. </replace>
  188. </target>
  189. </configuration>
  190. </execution>
  191. <execution>
  192. <id>create-log-dir</id>
  193. <phase>process-test-resources</phase>
  194. <goals>
  195. <goal>run</goal>
  196. </goals>
  197. <configuration>
  198. <target>
  199. <copy todir="${project.build.directory}/test-classes/webapps">
  200. <fileset dir="${project.build.directory}/webapps">
  201. <exclude name="proto-*-web.xml"/>
  202. <exclude name="**/proto-web.xml"/>
  203. </fileset>
  204. </copy>
  205. </target>
  206. </configuration>
  207. </execution>
  208. <execution>
  209. <phase>pre-site</phase>
  210. <goals>
  211. <goal>run</goal>
  212. </goals>
  213. <configuration>
  214. <tasks>
  215. <copy file="src/main/resources/hdfs-rbf-default.xml" todir="src/site/resources"/>
  216. <copy file="src/main/xsl/configuration.xsl" todir="src/site/resources"/>
  217. </tasks>
  218. </configuration>
  219. </execution>
  220. </executions>
  221. </plugin>
  222. <plugin>
  223. <groupId>org.xolstice.maven.plugins</groupId>
  224. <artifactId>protobuf-maven-plugin</artifactId>
  225. <executions>
  226. <execution>
  227. <id>src-compile-protoc</id>
  228. <configuration>
  229. <skip>false</skip>
  230. <additionalProtoPathElements>
  231. <additionalProtoPathElement>
  232. ${basedir}/../../hadoop-common-project/hadoop-common/src/main/proto
  233. </additionalProtoPathElement>
  234. <additionalProtoPathElement>
  235. ${basedir}/../hadoop-hdfs-client/src/main/proto
  236. </additionalProtoPathElement>
  237. </additionalProtoPathElements>
  238. </configuration>
  239. </execution>
  240. </executions>
  241. </plugin>
  242. <plugin>
  243. <groupId>com.google.code.maven-replacer-plugin</groupId>
  244. <artifactId>replacer</artifactId>
  245. <executions>
  246. <execution>
  247. <id>replace-generated-sources</id>
  248. <configuration>
  249. <skip>false</skip>
  250. </configuration>
  251. </execution>
  252. <execution>
  253. <id>replace-sources</id>
  254. <configuration>
  255. <skip>false</skip>
  256. </configuration>
  257. </execution>
  258. <execution>
  259. <id>replace-test-sources</id>
  260. <configuration>
  261. <skip>false</skip>
  262. </configuration>
  263. </execution>
  264. </executions>
  265. </plugin>
  266. <plugin>
  267. <groupId>org.apache.maven.plugins</groupId>
  268. <artifactId>maven-javadoc-plugin</artifactId>
  269. </plugin>
  270. <plugin>
  271. <groupId>org.apache.rat</groupId>
  272. <artifactId>apache-rat-plugin</artifactId>
  273. <configuration>
  274. <excludes>
  275. <exclude>.gitattributes</exclude>
  276. <exclude>.idea/**</exclude>
  277. <exclude>dev-support/findbugsExcludeFile.xml</exclude>
  278. <exclude>src/main/webapps/router/robots.txt</exclude>
  279. <exclude>src/site/resources/images/*</exclude>
  280. </excludes>
  281. </configuration>
  282. </plugin>
  283. <plugin>
  284. <artifactId>maven-clean-plugin</artifactId>
  285. <configuration>
  286. <filesets>
  287. <fileset>
  288. <directory>src/site/resources</directory>
  289. <includes>
  290. <include>hdfs-rbf-default.xml</include>
  291. </includes>
  292. <followSymlinks>false</followSymlinks>
  293. </fileset>
  294. </filesets>
  295. </configuration>
  296. </plugin>
  297. </plugins>
  298. </build>
  299. <profiles>
  300. <profile>
  301. <id>parallel-tests</id>
  302. <build>
  303. <plugins>
  304. <plugin>
  305. <groupId>org.apache.hadoop</groupId>
  306. <artifactId>hadoop-maven-plugins</artifactId>
  307. <executions>
  308. <execution>
  309. <id>parallel-tests-createdir</id>
  310. <goals>
  311. <goal>parallel-tests-createdir</goal>
  312. </goals>
  313. </execution>
  314. </executions>
  315. </plugin>
  316. <plugin>
  317. <groupId>org.apache.maven.plugins</groupId>
  318. <artifactId>maven-surefire-plugin</artifactId>
  319. <configuration>
  320. <forkCount>${testsThreadCount}</forkCount>
  321. <reuseForks>false</reuseForks>
  322. <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
  323. <systemPropertyVariables>
  324. <testsThreadCount>${testsThreadCount}</testsThreadCount>
  325. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  326. <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
  327. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  328. <!-- This is intentionally the same directory for all JUnit -->
  329. <!-- forks, for use in the very rare situation that -->
  330. <!-- concurrent tests need to coordinate, such as using lock -->
  331. <!-- files. -->
  332. <test.build.shared.data>${test.build.data}</test.build.shared.data>
  333. <!-- Due to a Maven quirk, setting this to just -->
  334. <!-- surefire.forkNumber won't do the parameter substitution. -->
  335. <!-- Putting a prefix in front of it like "fork-" makes it -->
  336. <!-- work. -->
  337. <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
  338. </systemPropertyVariables>
  339. </configuration>
  340. </plugin>
  341. </plugins>
  342. </build>
  343. </profile>
  344. </profiles>
  345. </project>