pom.xml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  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.1</version>
  22. <relativePath>../../hadoop-project-dist</relativePath>
  23. </parent>
  24. <groupId>org.apache.hadoop</groupId>
  25. <artifactId>hadoop-hdfs</artifactId>
  26. <version>2.10.1</version>
  27. <description>Apache Hadoop HDFS</description>
  28. <name>Apache Hadoop HDFS</name>
  29. <packaging>jar</packaging>
  30. <properties>
  31. <hadoop.component>hdfs</hadoop.component>
  32. <is.hadoop.component>true</is.hadoop.component>
  33. </properties>
  34. <dependencies>
  35. <dependency>
  36. <groupId>org.apache.hadoop</groupId>
  37. <artifactId>hadoop-annotations</artifactId>
  38. <scope>provided</scope>
  39. </dependency>
  40. <dependency>
  41. <groupId>org.apache.hadoop</groupId>
  42. <artifactId>hadoop-auth</artifactId>
  43. <scope>provided</scope>
  44. </dependency>
  45. <dependency>
  46. <groupId>org.apache.hadoop</groupId>
  47. <artifactId>hadoop-common</artifactId>
  48. <scope>provided</scope>
  49. </dependency>
  50. <dependency>
  51. <groupId>org.apache.hadoop</groupId>
  52. <artifactId>hadoop-common</artifactId>
  53. <scope>test</scope>
  54. <type>test-jar</type>
  55. </dependency>
  56. <dependency>
  57. <groupId>org.apache.hadoop</groupId>
  58. <artifactId>hadoop-hdfs-client</artifactId>
  59. <scope>compile</scope>
  60. </dependency>
  61. <dependency>
  62. <groupId>org.apache.zookeeper</groupId>
  63. <artifactId>zookeeper</artifactId>
  64. <type>test-jar</type>
  65. <scope>test</scope>
  66. </dependency>
  67. <dependency>
  68. <groupId>com.google.guava</groupId>
  69. <artifactId>guava</artifactId>
  70. <scope>compile</scope>
  71. </dependency>
  72. <dependency>
  73. <groupId>org.mortbay.jetty</groupId>
  74. <artifactId>jetty</artifactId>
  75. <scope>compile</scope>
  76. </dependency>
  77. <dependency>
  78. <groupId>org.mortbay.jetty</groupId>
  79. <artifactId>jetty-util</artifactId>
  80. <scope>compile</scope>
  81. </dependency>
  82. <dependency>
  83. <groupId>com.sun.jersey</groupId>
  84. <artifactId>jersey-core</artifactId>
  85. <scope>compile</scope>
  86. </dependency>
  87. <dependency>
  88. <groupId>com.sun.jersey</groupId>
  89. <artifactId>jersey-server</artifactId>
  90. <scope>compile</scope>
  91. </dependency>
  92. <dependency>
  93. <groupId>commons-cli</groupId>
  94. <artifactId>commons-cli</artifactId>
  95. <scope>compile</scope>
  96. </dependency>
  97. <dependency>
  98. <groupId>commons-codec</groupId>
  99. <artifactId>commons-codec</artifactId>
  100. <scope>compile</scope>
  101. </dependency>
  102. <dependency>
  103. <groupId>commons-io</groupId>
  104. <artifactId>commons-io</artifactId>
  105. <scope>compile</scope>
  106. </dependency>
  107. <dependency>
  108. <groupId>commons-lang</groupId>
  109. <artifactId>commons-lang</artifactId>
  110. <scope>compile</scope>
  111. </dependency>
  112. <dependency>
  113. <groupId>commons-logging</groupId>
  114. <artifactId>commons-logging</artifactId>
  115. <scope>compile</scope>
  116. </dependency>
  117. <dependency>
  118. <groupId>commons-daemon</groupId>
  119. <artifactId>commons-daemon</artifactId>
  120. <scope>compile</scope>
  121. </dependency>
  122. <dependency>
  123. <groupId>log4j</groupId>
  124. <artifactId>log4j</artifactId>
  125. <scope>compile</scope>
  126. </dependency>
  127. <dependency>
  128. <groupId>com.google.protobuf</groupId>
  129. <artifactId>protobuf-java</artifactId>
  130. <scope>compile</scope>
  131. </dependency>
  132. <dependency>
  133. <groupId>javax.servlet</groupId>
  134. <artifactId>servlet-api</artifactId>
  135. <scope>compile</scope>
  136. </dependency>
  137. <dependency>
  138. <groupId>junit</groupId>
  139. <artifactId>junit</artifactId>
  140. <scope>test</scope>
  141. </dependency>
  142. <dependency>
  143. <groupId>org.apache.hadoop</groupId>
  144. <artifactId>hadoop-minikdc</artifactId>
  145. <scope>test</scope>
  146. </dependency>
  147. <dependency>
  148. <groupId>org.mockito</groupId>
  149. <artifactId>mockito-all</artifactId>
  150. <scope>test</scope>
  151. </dependency>
  152. <dependency>
  153. <groupId>org.slf4j</groupId>
  154. <artifactId>slf4j-log4j12</artifactId>
  155. <scope>provided</scope>
  156. </dependency>
  157. <dependency>
  158. <groupId>org.codehaus.jackson</groupId>
  159. <artifactId>jackson-core-asl</artifactId>
  160. <scope>compile</scope>
  161. </dependency>
  162. <dependency>
  163. <groupId>org.codehaus.jackson</groupId>
  164. <artifactId>jackson-mapper-asl</artifactId>
  165. <scope>compile</scope>
  166. </dependency>
  167. <dependency>
  168. <groupId>xmlenc</groupId>
  169. <artifactId>xmlenc</artifactId>
  170. <scope>compile</scope>
  171. </dependency>
  172. <dependency>
  173. <groupId>io.netty</groupId>
  174. <artifactId>netty</artifactId>
  175. <scope>compile</scope>
  176. </dependency>
  177. <dependency>
  178. <groupId>io.netty</groupId>
  179. <artifactId>netty-all</artifactId>
  180. <scope>compile</scope>
  181. </dependency>
  182. <dependency>
  183. <groupId>xerces</groupId>
  184. <artifactId>xercesImpl</artifactId>
  185. <scope>compile</scope>
  186. </dependency>
  187. <dependency>
  188. <groupId>org.apache.htrace</groupId>
  189. <artifactId>htrace-core4</artifactId>
  190. </dependency>
  191. <dependency>
  192. <groupId>org.apache.hadoop</groupId>
  193. <artifactId>hadoop-kms</artifactId>
  194. <classifier>classes</classifier>
  195. <type>jar</type>
  196. <scope>test</scope>
  197. </dependency>
  198. <dependency>
  199. <groupId>org.apache.hadoop</groupId>
  200. <artifactId>hadoop-kms</artifactId>
  201. <type>test-jar</type>
  202. <scope>test</scope>
  203. </dependency>
  204. <dependency>
  205. <groupId>org.fusesource.leveldbjni</groupId>
  206. <artifactId>leveldbjni-all</artifactId>
  207. <version>1.8</version>
  208. </dependency>
  209. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  210. <dependency>
  211. <groupId>org.bouncycastle</groupId>
  212. <artifactId>bcprov-jdk16</artifactId>
  213. <scope>test</scope>
  214. </dependency>
  215. <dependency>
  216. <groupId>com.fasterxml.jackson.core</groupId>
  217. <artifactId>jackson-databind</artifactId>
  218. </dependency>
  219. <dependency>
  220. <groupId>org.apache.curator</groupId>
  221. <artifactId>curator-test</artifactId>
  222. <scope>test</scope>
  223. </dependency>
  224. </dependencies>
  225. <build>
  226. <plugins>
  227. <plugin>
  228. <groupId>org.apache.maven.plugins</groupId>
  229. <artifactId>maven-surefire-plugin</artifactId>
  230. <configuration>
  231. <systemPropertyVariables>
  232. <startKdc>${startKdc}</startKdc>
  233. <kdc.resource.dir>${kdc.resource.dir}</kdc.resource.dir>
  234. <runningWithNative>${runningWithNative}</runningWithNative>
  235. </systemPropertyVariables>
  236. <properties>
  237. <property>
  238. <name>listener</name>
  239. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  240. </property>
  241. </properties>
  242. </configuration>
  243. </plugin>
  244. <plugin>
  245. <groupId>org.apache.maven.plugins</groupId>
  246. <artifactId>maven-antrun-plugin</artifactId>
  247. <configuration>
  248. <skipTests>false</skipTests>
  249. </configuration>
  250. <executions>
  251. <execution>
  252. <id>create-web-xmls</id>
  253. <phase>compile</phase>
  254. <goals>
  255. <goal>run</goal>
  256. </goals>
  257. <configuration>
  258. <target>
  259. <copy file="${basedir}/src/main/webapps/proto-web.xml"
  260. tofile="${project.build.directory}/webapps/hdfs/WEB-INF/web.xml"
  261. filtering="true"/>
  262. <copy file="${basedir}/src/main/webapps/proto-web.xml"
  263. tofile="${project.build.directory}/webapps/secondary/WEB-INF/web.xml"
  264. filtering="true"/>
  265. <copy file="${basedir}/src/main/webapps/proto-web.xml"
  266. tofile="${project.build.directory}/webapps/datanode/WEB-INF/web.xml"
  267. filtering="true"/>
  268. <copy file="${basedir}/src/main/webapps/proto-web.xml"
  269. tofile="${project.build.directory}/webapps/journal/WEB-INF/web.xml"
  270. filtering="true"/>
  271. <copy file="${basedir}/src/main/webapps/proto-web.xml"
  272. tofile="${project.build.directory}/webapps/nfs3/WEB-INF/web.xml"
  273. filtering="true"/>
  274. <copy toDir="${project.build.directory}/webapps">
  275. <fileset dir="${basedir}/src/main/webapps">
  276. <exclude name="**/proto-web.xml"/>
  277. </fileset>
  278. </copy>
  279. <replace dir="${project.build.directory}/webapps" value="${release-year}">
  280. <include name="**/*.html"/>
  281. <replacetoken>{release-year-token}</replacetoken>
  282. </replace>
  283. </target>
  284. </configuration>
  285. </execution>
  286. <execution>
  287. <id>create-log-dir</id>
  288. <phase>process-test-resources</phase>
  289. <goals>
  290. <goal>run</goal>
  291. </goals>
  292. <configuration>
  293. <target>
  294. <delete dir="${test.build.data}"/>
  295. <mkdir dir="${test.build.data}"/>
  296. <mkdir dir="${hadoop.log.dir}"/>
  297. <copy todir="${project.build.directory}/test-classes/webapps">
  298. <fileset dir="${project.build.directory}/webapps">
  299. <exclude name="proto-*-web.xml"/>
  300. <exclude name="**/proto-web.xml"/>
  301. </fileset>
  302. </copy>
  303. </target>
  304. </configuration>
  305. </execution>
  306. <execution>
  307. <phase>pre-site</phase>
  308. <goals>
  309. <goal>run</goal>
  310. </goals>
  311. <configuration>
  312. <tasks>
  313. <copy file="src/main/resources/hdfs-default.xml" todir="src/site/resources"/>
  314. <copy file="src/main/xsl/configuration.xsl" todir="src/site/resources"/>
  315. </tasks>
  316. </configuration>
  317. </execution>
  318. </executions>
  319. </plugin>
  320. <plugin>
  321. <groupId>org.xolstice.maven.plugins</groupId>
  322. <artifactId>protobuf-maven-plugin</artifactId>
  323. <executions>
  324. <execution>
  325. <id>src-compile-protoc</id>
  326. <configuration>
  327. <skip>false</skip>
  328. <additionalProtoPathElements>
  329. <additionalProtoPathElement>
  330. ${basedir}/../../hadoop-common-project/hadoop-common/src/main/proto
  331. </additionalProtoPathElement>
  332. <additionalProtoPathElement>
  333. ${basedir}/../hadoop-hdfs-client/src/main/proto
  334. </additionalProtoPathElement>
  335. </additionalProtoPathElements>
  336. </configuration>
  337. </execution>
  338. </executions>
  339. </plugin>
  340. <plugin>
  341. <groupId>org.apache.maven.plugins</groupId>
  342. <artifactId>maven-javadoc-plugin</artifactId>
  343. <configuration>
  344. <excludePackageNames>org.apache.hadoop.hdfs.protocol.proto</excludePackageNames>
  345. </configuration>
  346. </plugin>
  347. <plugin>
  348. <groupId>org.apache.rat</groupId>
  349. <artifactId>apache-rat-plugin</artifactId>
  350. <configuration>
  351. <excludes>
  352. <exclude>.gitattributes</exclude>
  353. <exclude>.idea/**</exclude>
  354. <exclude>src/main/conf/*</exclude>
  355. <exclude>dev-support/findbugsExcludeFile.xml</exclude>
  356. <exclude>dev-support/checkstyle*</exclude>
  357. <exclude>dev-support/jdiff/**</exclude>
  358. <exclude>dev-support/*tests</exclude>
  359. <exclude>src/test/empty-file</exclude>
  360. <exclude>src/test/all-tests</exclude>
  361. <exclude>src/test/resources/*.tgz</exclude>
  362. <exclude>src/test/resources/data*</exclude>
  363. <exclude>**/*.json</exclude>
  364. <exclude>src/test/resources/editsStored*</exclude>
  365. <exclude>src/test/resources/empty-file</exclude>
  366. <exclude>src/main/webapps/datanode/robots.txt</exclude>
  367. <exclude>src/main/webapps/hdfs/robots.txt</exclude>
  368. <exclude>src/main/webapps/journal/robots.txt</exclude>
  369. <exclude>src/main/webapps/secondary/robots.txt</exclude>
  370. <exclude>src/contrib/**</exclude>
  371. <exclude>src/site/resources/images/*</exclude>
  372. <exclude>src/main/webapps/static/bootstrap-3.0.2/**</exclude>
  373. <exclude>src/main/webapps/static/moment.min.js</exclude>
  374. <exclude>src/main/webapps/static/dust-full-2.0.0.min.js</exclude>
  375. <exclude>src/main/webapps/static/dust-helpers-1.1.1.min.js</exclude>
  376. <exclude>src/main/webapps/static/jquery-1.10.2.min.js</exclude>
  377. <exclude>src/main/webapps/static/jquery.dataTables.min.js</exclude>
  378. <exclude>src/main/webapps/static/json-bignum.js</exclude>
  379. <exclude>src/main/webapps/static/dataTables.bootstrap.css</exclude>
  380. <exclude>src/main/webapps/static/dataTables.bootstrap.js</exclude>
  381. <exclude>src/main/webapps/static/d3-v4.1.1.min.js</exclude>
  382. </excludes>
  383. </configuration>
  384. </plugin>
  385. <plugin>
  386. <artifactId>maven-clean-plugin</artifactId>
  387. <configuration>
  388. <filesets>
  389. <fileset>
  390. <directory>src/site/resources</directory>
  391. <includes>
  392. <include>configuration.xsl</include>
  393. <include>hdfs-default.xml</include>
  394. </includes>
  395. <followSymlinks>false</followSymlinks>
  396. </fileset>
  397. </filesets>
  398. </configuration>
  399. </plugin>
  400. </plugins>
  401. </build>
  402. <profiles>
  403. <profile>
  404. <id>parallel-tests</id>
  405. <build>
  406. <plugins>
  407. <plugin>
  408. <groupId>org.apache.hadoop</groupId>
  409. <artifactId>hadoop-maven-plugins</artifactId>
  410. <executions>
  411. <execution>
  412. <id>parallel-tests-createdir</id>
  413. <goals>
  414. <goal>parallel-tests-createdir</goal>
  415. </goals>
  416. </execution>
  417. </executions>
  418. </plugin>
  419. <plugin>
  420. <groupId>org.apache.maven.plugins</groupId>
  421. <artifactId>maven-surefire-plugin</artifactId>
  422. <configuration>
  423. <forkCount>${testsThreadCount}</forkCount>
  424. <reuseForks>false</reuseForks>
  425. <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
  426. <systemPropertyVariables>
  427. <testsThreadCount>${testsThreadCount}</testsThreadCount>
  428. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  429. <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
  430. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  431. <!-- This is intentionally the same directory for all JUnit -->
  432. <!-- forks, for use in the very rare situation that -->
  433. <!-- concurrent tests need to coordinate, such as using lock -->
  434. <!-- files. -->
  435. <test.build.shared.data>${test.build.data}</test.build.shared.data>
  436. <!-- Due to a Maven quirk, setting this to just -->
  437. <!-- surefire.forkNumber won't do the parameter substitution. -->
  438. <!-- Putting a prefix in front of it like "fork-" makes it -->
  439. <!-- work. -->
  440. <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
  441. </systemPropertyVariables>
  442. </configuration>
  443. </plugin>
  444. </plugins>
  445. </build>
  446. </profile>
  447. </profiles>
  448. </project>