pom.xml 11 KB

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