pom.xml 20 KB

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