pom.xml 11 KB

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