pom.xml 20 KB

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