pom.xml 19 KB

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