pom.xml 19 KB

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