pom.xml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  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.
  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</artifactId>
  21. <version>2.10.1</version>
  22. <relativePath>../../hadoop-project</relativePath>
  23. </parent>
  24. <groupId>org.apache.hadoop</groupId>
  25. <artifactId>hadoop-hdfs-httpfs</artifactId>
  26. <version>2.10.1</version>
  27. <packaging>war</packaging>
  28. <name>Apache Hadoop HttpFS</name>
  29. <description>Apache Hadoop HttpFS</description>
  30. <properties>
  31. <httpfs.source.repository>REPO NOT AVAIL</httpfs.source.repository>
  32. <httpfs.source.repository>REPO NOT AVAIL</httpfs.source.repository>
  33. <httpfs.source.revision>REVISION NOT AVAIL</httpfs.source.revision>
  34. <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ssZ</maven.build.timestamp.format>
  35. <httpfs.build.timestamp>${maven.build.timestamp}</httpfs.build.timestamp>
  36. <httpfs.tomcat.dist.dir>
  37. ${project.build.directory}/${project.artifactId}-${project.version}/share/hadoop/httpfs/tomcat
  38. </httpfs.tomcat.dist.dir>
  39. <kerberos.realm>LOCALHOST</kerberos.realm>
  40. <test.exclude.kerberos.test>**/TestHttpFSWithKerberos.java</test.exclude.kerberos.test>
  41. <tomcat.download.url>https://archive.apache.org/dist/tomcat/tomcat-8/v${tomcat.version}/bin/apache-tomcat-${tomcat.version}.tar.gz</tomcat.download.url>
  42. </properties>
  43. <dependencies>
  44. <dependency>
  45. <groupId>junit</groupId>
  46. <artifactId>junit</artifactId>
  47. <scope>test</scope>
  48. </dependency>
  49. <dependency>
  50. <groupId>org.mockito</groupId>
  51. <artifactId>mockito-all</artifactId>
  52. <scope>test</scope>
  53. </dependency>
  54. <dependency>
  55. <groupId>org.apache.hadoop</groupId>
  56. <artifactId>hadoop-auth</artifactId>
  57. <scope>compile</scope>
  58. </dependency>
  59. <dependency>
  60. <groupId>com.sun.jersey</groupId>
  61. <artifactId>jersey-core</artifactId>
  62. <scope>compile</scope>
  63. </dependency>
  64. <dependency>
  65. <groupId>com.sun.jersey</groupId>
  66. <artifactId>jersey-server</artifactId>
  67. <scope>compile</scope>
  68. </dependency>
  69. <dependency>
  70. <groupId>javax.servlet</groupId>
  71. <artifactId>servlet-api</artifactId>
  72. <scope>provided</scope>
  73. </dependency>
  74. <dependency>
  75. <groupId>com.google.guava</groupId>
  76. <artifactId>guava</artifactId>
  77. <scope>compile</scope>
  78. </dependency>
  79. <dependency>
  80. <groupId>com.googlecode.json-simple</groupId>
  81. <artifactId>json-simple</artifactId>
  82. <scope>compile</scope>
  83. </dependency>
  84. <dependency>
  85. <groupId>org.mortbay.jetty</groupId>
  86. <artifactId>jetty</artifactId>
  87. <scope>test</scope>
  88. </dependency>
  89. <dependency>
  90. <groupId>org.apache.hadoop</groupId>
  91. <artifactId>hadoop-common</artifactId>
  92. <scope>compile</scope>
  93. <exclusions>
  94. <exclusion>
  95. <groupId>javax.xml.stream</groupId>
  96. <artifactId>stax-api</artifactId>
  97. </exclusion>
  98. <exclusion>
  99. <groupId>commons-httpclient</groupId>
  100. <artifactId>commons-httpclient</artifactId>
  101. </exclusion>
  102. <exclusion>
  103. <groupId>javax.servlet</groupId>
  104. <artifactId>servlet-api</artifactId>
  105. </exclusion>
  106. <exclusion>
  107. <groupId>javax.servlet.jsp</groupId>
  108. <artifactId>jsp-api</artifactId>
  109. </exclusion>
  110. <exclusion>
  111. <groupId>org.mortbay.jetty</groupId>
  112. <artifactId>jetty</artifactId>
  113. </exclusion>
  114. <exclusion>
  115. <groupId>org.mortbay.jetty</groupId>
  116. <artifactId>jetty-util</artifactId>
  117. </exclusion>
  118. <exclusion>
  119. <groupId>org.mortbay.jetty</groupId>
  120. <artifactId>servlet-api-2.5</artifactId>
  121. </exclusion>
  122. <exclusion>
  123. <groupId>net.java.dev.jets3t</groupId>
  124. <artifactId>jets3t</artifactId>
  125. </exclusion>
  126. <exclusion>
  127. <groupId>org.eclipse.jdt</groupId>
  128. <artifactId>core</artifactId>
  129. </exclusion>
  130. </exclusions>
  131. </dependency>
  132. <dependency>
  133. <groupId>org.apache.hadoop</groupId>
  134. <artifactId>hadoop-hdfs</artifactId>
  135. <scope>compile</scope>
  136. <exclusions>
  137. <exclusion>
  138. <groupId>commons-cli</groupId>
  139. <artifactId>commons-cli</artifactId>
  140. </exclusion>
  141. <exclusion>
  142. <groupId>commons-httpclient</groupId>
  143. <artifactId>commons-httpclient</artifactId>
  144. </exclusion>
  145. <exclusion>
  146. <groupId>javax.servlet</groupId>
  147. <artifactId>servlet-api</artifactId>
  148. </exclusion>
  149. <exclusion>
  150. <groupId>org.mortbay.jetty</groupId>
  151. <artifactId>jetty</artifactId>
  152. </exclusion>
  153. <exclusion>
  154. <groupId>org.mortbay.jetty</groupId>
  155. <artifactId>jetty-util</artifactId>
  156. </exclusion>
  157. <exclusion>
  158. <groupId>org.mortbay.jetty</groupId>
  159. <artifactId>servlet-api-2.5</artifactId>
  160. </exclusion>
  161. <exclusion>
  162. <groupId>net.java.dev.jets3t</groupId>
  163. <artifactId>jets3t</artifactId>
  164. </exclusion>
  165. <exclusion>
  166. <groupId>org.eclipse.jdt</groupId>
  167. <artifactId>core</artifactId>
  168. </exclusion>
  169. </exclusions>
  170. </dependency>
  171. <dependency>
  172. <groupId>org.apache.hadoop</groupId>
  173. <artifactId>hadoop-common</artifactId>
  174. <scope>test</scope>
  175. <type>test-jar</type>
  176. </dependency>
  177. <dependency>
  178. <groupId>org.apache.hadoop</groupId>
  179. <artifactId>hadoop-hdfs</artifactId>
  180. <scope>test</scope>
  181. <type>test-jar</type>
  182. </dependency>
  183. <dependency>
  184. <groupId>org.apache.hadoop</groupId>
  185. <artifactId>hadoop-auth</artifactId>
  186. <scope>test</scope>
  187. <type>test-jar</type>
  188. </dependency>
  189. <dependency>
  190. <groupId>log4j</groupId>
  191. <artifactId>log4j</artifactId>
  192. <scope>compile</scope>
  193. </dependency>
  194. <dependency>
  195. <groupId>org.slf4j</groupId>
  196. <artifactId>slf4j-api</artifactId>
  197. <scope>compile</scope>
  198. </dependency>
  199. <dependency>
  200. <groupId>org.slf4j</groupId>
  201. <artifactId>slf4j-log4j12</artifactId>
  202. <scope>runtime</scope>
  203. </dependency>
  204. <!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
  205. <dependency>
  206. <groupId>org.bouncycastle</groupId>
  207. <artifactId>bcprov-jdk16</artifactId>
  208. <scope>test</scope>
  209. </dependency>
  210. </dependencies>
  211. <build>
  212. <resources>
  213. <resource>
  214. <directory>src/main/resources</directory>
  215. <filtering>true</filtering>
  216. <includes>
  217. <include>httpfs.properties</include>
  218. </includes>
  219. </resource>
  220. <resource>
  221. <directory>src/main/resources</directory>
  222. <filtering>false</filtering>
  223. <excludes>
  224. <exclude>httpfs.properties</exclude>
  225. </excludes>
  226. </resource>
  227. </resources>
  228. <testResources>
  229. <testResource>
  230. <directory>${basedir}/src/test/resources</directory>
  231. <filtering>false</filtering>
  232. <excludes>
  233. <exclude>krb5.conf</exclude>
  234. </excludes>
  235. </testResource>
  236. <testResource>
  237. <directory>${basedir}/src/test/resources</directory>
  238. <filtering>true</filtering>
  239. <includes>
  240. <include>krb5.conf</include>
  241. </includes>
  242. </testResource>
  243. </testResources>
  244. <plugins>
  245. <plugin>
  246. <!-- workaround for filtered/unfiltered resources in same directory -->
  247. <!-- remove when maven-eclipse-plugin 2.9 is available -->
  248. <groupId>org.apache.maven.plugins</groupId>
  249. <artifactId>maven-eclipse-plugin</artifactId>
  250. <version>2.6</version>
  251. </plugin>
  252. <plugin>
  253. <groupId>org.apache.maven.plugins</groupId>
  254. <artifactId>maven-surefire-plugin</artifactId>
  255. <configuration>
  256. <threadCount>1</threadCount>
  257. <forkedProcessTimeoutInSeconds>600</forkedProcessTimeoutInSeconds>
  258. <systemPropertyVariables>
  259. <java.security.krb5.conf>${project.build.directory}/test-classes/krb5.conf</java.security.krb5.conf>
  260. <kerberos.realm>${kerberos.realm}</kerberos.realm>
  261. </systemPropertyVariables>
  262. <properties>
  263. <property>
  264. <name>listener</name>
  265. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  266. </property>
  267. </properties>
  268. <excludes>
  269. <exclude>**/${test.exclude}.java</exclude>
  270. <exclude>${test.exclude.pattern}</exclude>
  271. <exclude>${test.exclude.kerberos.test}</exclude>
  272. </excludes>
  273. </configuration>
  274. </plugin>
  275. <plugin>
  276. <groupId>org.apache.maven.plugins</groupId>
  277. <artifactId>maven-javadoc-plugin</artifactId>
  278. <executions>
  279. <execution>
  280. <goals>
  281. <goal>javadoc</goal>
  282. </goals>
  283. <phase>site</phase>
  284. <configuration>
  285. <quiet>true</quiet>
  286. <verbose>false</verbose>
  287. <source>${maven.compile.source}</source>
  288. <charset>${maven.compile.encoding}</charset>
  289. <groups>
  290. <group>
  291. <title>HttpFs API</title>
  292. <packages>*</packages>
  293. </group>
  294. </groups>
  295. </configuration>
  296. </execution>
  297. </executions>
  298. </plugin>
  299. <plugin>
  300. <groupId>org.apache.maven.plugins</groupId>
  301. <artifactId>maven-project-info-reports-plugin</artifactId>
  302. <executions>
  303. <execution>
  304. <configuration>
  305. <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
  306. </configuration>
  307. <goals>
  308. <goal>dependencies</goal>
  309. </goals>
  310. <phase>site</phase>
  311. </execution>
  312. </executions>
  313. </plugin>
  314. <plugin>
  315. <groupId>org.apache.rat</groupId>
  316. <artifactId>apache-rat-plugin</artifactId>
  317. <configuration>
  318. <excludes>
  319. <exclude>src/test/resources/classutils.txt</exclude>
  320. <exclude>src/main/conf/httpfs-signature.secret</exclude>
  321. </excludes>
  322. </configuration>
  323. </plugin>
  324. <plugin>
  325. <groupId>org.apache.maven.plugins</groupId>
  326. <artifactId>maven-antrun-plugin</artifactId>
  327. <executions>
  328. <execution>
  329. <id>create-web-xmls</id>
  330. <phase>generate-test-resources</phase>
  331. <goals>
  332. <goal>run</goal>
  333. </goals>
  334. <configuration>
  335. <target>
  336. <mkdir dir="${project.build.directory}/test-classes/webapp"/>
  337. <copy todir="${project.build.directory}/test-classes/webapp">
  338. <fileset dir="${basedir}/src/main/webapp"/>
  339. </copy>
  340. </target>
  341. </configuration>
  342. </execution>
  343. <execution>
  344. <id>site</id>
  345. <phase>site</phase>
  346. <goals>
  347. <goal>run</goal>
  348. </goals>
  349. <configuration>
  350. <target>
  351. <xslt in="${basedir}/src/main/resources/httpfs-default.xml"
  352. out="${project.build.directory}/site/httpfs-default.html"
  353. style="${basedir}/src/site/configuration.xsl"/>
  354. </target>
  355. </configuration>
  356. </execution>
  357. </executions>
  358. </plugin>
  359. <plugin>
  360. <groupId>org.apache.maven.plugins</groupId>
  361. <artifactId>maven-war-plugin</artifactId>
  362. <executions>
  363. <execution>
  364. <id>default-war</id>
  365. <phase>package</phase>
  366. <goals>
  367. <goal>war</goal>
  368. </goals>
  369. <configuration>
  370. <warName>webhdfs</warName>
  371. <webappDirectory>${project.build.directory}/webhdfs</webappDirectory>
  372. </configuration>
  373. </execution>
  374. </executions>
  375. </plugin>
  376. <plugin>
  377. <groupId>org.codehaus.mojo</groupId>
  378. <artifactId>findbugs-maven-plugin</artifactId>
  379. <configuration>
  380. <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
  381. </configuration>
  382. </plugin>
  383. </plugins>
  384. </build>
  385. <profiles>
  386. <profile>
  387. <id>testKerberos</id>
  388. <activation>
  389. <activeByDefault>false</activeByDefault>
  390. </activation>
  391. <properties>
  392. <test.exclude.kerberos.test>_</test.exclude.kerberos.test>
  393. </properties>
  394. <build>
  395. <plugins>
  396. <plugin>
  397. <groupId>org.apache.maven.plugins</groupId>
  398. <artifactId>maven-surefire-plugin</artifactId>
  399. <configuration>
  400. <forkCount>1</forkCount>
  401. <reuseForks>true</reuseForks>
  402. <forkedProcessTimeoutInSeconds>600</forkedProcessTimeoutInSeconds>
  403. <systemPropertyVariables>
  404. <java.security.krb5.conf>${project.build.directory}/test-classes/krb5.conf</java.security.krb5.conf>
  405. <kerberos.realm>${kerberos.realm}</kerberos.realm>
  406. <httpfs.http.hostname>localhost</httpfs.http.hostname>
  407. </systemPropertyVariables>
  408. <includes>
  409. <include>**/TestHttpFSWithKerberos.java</include>
  410. </includes>
  411. </configuration>
  412. </plugin>
  413. </plugins>
  414. </build>
  415. </profile>
  416. <profile>
  417. <id>docs</id>
  418. <activation>
  419. <activeByDefault>false</activeByDefault>
  420. </activation>
  421. <build>
  422. <plugins>
  423. <plugin>
  424. <groupId>org.apache.maven.plugins</groupId>
  425. <artifactId>maven-site-plugin</artifactId>
  426. <executions>
  427. <execution>
  428. <id>docs</id>
  429. <phase>prepare-package</phase>
  430. <goals>
  431. <goal>site</goal>
  432. </goals>
  433. </execution>
  434. </executions>
  435. </plugin>
  436. </plugins>
  437. </build>
  438. </profile>
  439. <profile>
  440. <id>dist</id>
  441. <activation>
  442. <activeByDefault>false</activeByDefault>
  443. </activation>
  444. <build>
  445. <plugins>
  446. <plugin>
  447. <groupId>org.apache.maven.plugins</groupId>
  448. <artifactId>maven-assembly-plugin</artifactId>
  449. <dependencies>
  450. <dependency>
  451. <groupId>org.apache.hadoop</groupId>
  452. <artifactId>hadoop-assemblies</artifactId>
  453. <version>${project.version}</version>
  454. </dependency>
  455. </dependencies>
  456. <executions>
  457. <execution>
  458. <id>dist</id>
  459. <phase>package</phase>
  460. <goals>
  461. <goal>single</goal>
  462. </goals>
  463. <configuration>
  464. <finalName>${project.artifactId}-${project.version}</finalName>
  465. <appendAssemblyId>false</appendAssemblyId>
  466. <attach>false</attach>
  467. <descriptorRefs>
  468. <descriptorRef>hadoop-httpfs-dist</descriptorRef>
  469. </descriptorRefs>
  470. </configuration>
  471. </execution>
  472. </executions>
  473. </plugin>
  474. <!-- Downloading Tomcat TAR.GZ, using downloads/ dir to avoid downloading over an over -->
  475. <plugin>
  476. <groupId>org.apache.maven.plugins</groupId>
  477. <artifactId>maven-antrun-plugin</artifactId>
  478. <executions>
  479. <execution>
  480. <id>dist</id>
  481. <goals>
  482. <goal>run</goal>
  483. </goals>
  484. <phase>package</phase>
  485. <configuration>
  486. <target>
  487. <mkdir dir="downloads"/>
  488. <get
  489. src="${tomcat.download.url}"
  490. dest="downloads/apache-tomcat-${tomcat.version}.tar.gz" verbose="true" skipexisting="true"/>
  491. <delete dir="${project.build.directory}/tomcat.exp"/>
  492. <mkdir dir="${project.build.directory}/tomcat.exp"/>
  493. <!-- Using Unix script to preserve file permissions -->
  494. <echo file="${project.build.directory}/tomcat-untar.sh">
  495. cd "${project.build.directory}/tomcat.exp"
  496. gzip -cd ../../downloads/apache-tomcat-${tomcat.version}.tar.gz | tar xf -
  497. </echo>
  498. <exec executable="${shell-executable}" dir="${project.build.directory}" failonerror="true">
  499. <arg line="./tomcat-untar.sh"/>
  500. </exec>
  501. <move file="${project.build.directory}/tomcat.exp/apache-tomcat-${tomcat.version}"
  502. tofile="${httpfs.tomcat.dist.dir}"/>
  503. <delete dir="${project.build.directory}/tomcat.exp"/>
  504. <delete dir="${httpfs.tomcat.dist.dir}/webapps"/>
  505. <mkdir dir="${httpfs.tomcat.dist.dir}/webapps"/>
  506. <delete file="${httpfs.tomcat.dist.dir}/conf/catalina-default.properties"/>
  507. <copy file="${basedir}/src/main/tomcat/catalina-default.properties"
  508. toDir="${httpfs.tomcat.dist.dir}/conf"/>
  509. <delete file="${httpfs.tomcat.dist.dir}/conf/server.xml"/>
  510. <copy file="${basedir}/src/main/tomcat/server.xml"
  511. toDir="${httpfs.tomcat.dist.dir}/conf"/>
  512. <delete file="${httpfs.tomcat.dist.dir}/conf/ssl-server.xml"/>
  513. <copy file="${basedir}/src/main/tomcat/ssl-server.xml"
  514. toDir="${httpfs.tomcat.dist.dir}/conf"/>
  515. <delete file="${httpfs.tomcat.dist.dir}/conf/logging.properties"/>
  516. <copy file="${basedir}/src/main/tomcat/logging.properties"
  517. toDir="${httpfs.tomcat.dist.dir}/conf"/>
  518. <copy toDir="${httpfs.tomcat.dist.dir}/webapps/ROOT">
  519. <fileset dir="${basedir}/src/main/tomcat/ROOT"/>
  520. </copy>
  521. <copy toDir="${httpfs.tomcat.dist.dir}/webapps/webhdfs">
  522. <fileset dir="${project.build.directory}/webhdfs"/>
  523. </copy>
  524. </target>
  525. </configuration>
  526. </execution>
  527. <execution>
  528. <id>tar</id>
  529. <phase>package</phase>
  530. <goals>
  531. <goal>run</goal>
  532. </goals>
  533. <configuration>
  534. <target if="tar">
  535. <!-- Using Unix script to preserve symlinks -->
  536. <echo file="${project.build.directory}/dist-maketar.sh">
  537. cd "${project.build.directory}"
  538. tar cf - ${project.artifactId}-${project.version} | gzip > ${project.artifactId}-${project.version}.tar.gz
  539. </echo>
  540. <exec executable="${shell-executable}" dir="${project.build.directory}" failonerror="true">
  541. <arg line="./dist-maketar.sh"/>
  542. </exec>
  543. </target>
  544. </configuration>
  545. </execution>
  546. </executions>
  547. </plugin>
  548. </plugins>
  549. </build>
  550. </profile>
  551. </profiles>
  552. </project>