pom.xml 11 KB

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