pom.xml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630
  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. See accompanying LICENSE file.
  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-dist</artifactId>
  21. <version>0.23.3</version>
  22. <relativePath>../../hadoop-project-dist</relativePath>
  23. </parent>
  24. <groupId>org.apache.hadoop</groupId>
  25. <artifactId>hadoop-common</artifactId>
  26. <version>0.23.3</version>
  27. <description>Apache Hadoop Common</description>
  28. <name>Apache Hadoop Common</name>
  29. <packaging>jar</packaging>
  30. <properties>
  31. <snappy.prefix>/usr/local</snappy.prefix>
  32. <snappy.lib>${snappy.prefix}/lib</snappy.lib>
  33. <bundle.snappy>false</bundle.snappy>
  34. <hadoop.component>common</hadoop.component>
  35. <is.hadoop.component>true</is.hadoop.component>
  36. </properties>
  37. <dependencies>
  38. <dependency>
  39. <groupId>org.apache.hadoop</groupId>
  40. <artifactId>hadoop-annotations</artifactId>
  41. <scope>compile</scope>
  42. </dependency>
  43. <dependency>
  44. <groupId>com.google.guava</groupId>
  45. <artifactId>guava</artifactId>
  46. <scope>compile</scope>
  47. </dependency>
  48. <dependency>
  49. <groupId>commons-cli</groupId>
  50. <artifactId>commons-cli</artifactId>
  51. <scope>compile</scope>
  52. </dependency>
  53. <dependency>
  54. <groupId>org.apache.commons</groupId>
  55. <artifactId>commons-math</artifactId>
  56. <scope>compile</scope>
  57. </dependency>
  58. <dependency>
  59. <groupId>xmlenc</groupId>
  60. <artifactId>xmlenc</artifactId>
  61. <scope>compile</scope>
  62. </dependency>
  63. <dependency>
  64. <groupId>commons-httpclient</groupId>
  65. <artifactId>commons-httpclient</artifactId>
  66. <scope>compile</scope>
  67. </dependency>
  68. <dependency>
  69. <groupId>commons-codec</groupId>
  70. <artifactId>commons-codec</artifactId>
  71. <scope>compile</scope>
  72. </dependency>
  73. <dependency>
  74. <groupId>commons-net</groupId>
  75. <artifactId>commons-net</artifactId>
  76. <scope>compile</scope>
  77. </dependency>
  78. <dependency>
  79. <groupId>commons-io</groupId>
  80. <artifactId>commons-io</artifactId>
  81. <scope>compile</scope>
  82. </dependency>
  83. <dependency>
  84. <groupId>javax.servlet</groupId>
  85. <artifactId>servlet-api</artifactId>
  86. <scope>compile</scope>
  87. </dependency>
  88. <dependency>
  89. <groupId>org.mortbay.jetty</groupId>
  90. <artifactId>jetty</artifactId>
  91. <scope>compile</scope>
  92. </dependency>
  93. <dependency>
  94. <groupId>org.mortbay.jetty</groupId>
  95. <artifactId>jetty-util</artifactId>
  96. <scope>compile</scope>
  97. </dependency>
  98. <dependency>
  99. <groupId>asm</groupId>
  100. <artifactId>asm</artifactId>
  101. <scope>compile</scope>
  102. </dependency>
  103. <dependency>
  104. <groupId>com.sun.jersey</groupId>
  105. <artifactId>jersey-core</artifactId>
  106. <scope>compile</scope>
  107. </dependency>
  108. <dependency>
  109. <groupId>com.sun.jersey</groupId>
  110. <artifactId>jersey-json</artifactId>
  111. <scope>compile</scope>
  112. </dependency>
  113. <dependency>
  114. <groupId>com.sun.jersey</groupId>
  115. <artifactId>jersey-server</artifactId>
  116. <scope>compile</scope>
  117. </dependency>
  118. <dependency>
  119. <groupId>tomcat</groupId>
  120. <artifactId>jasper-compiler</artifactId>
  121. <scope>compile</scope>
  122. </dependency>
  123. <dependency>
  124. <groupId>tomcat</groupId>
  125. <artifactId>jasper-runtime</artifactId>
  126. <scope>compile</scope>
  127. </dependency>
  128. <dependency>
  129. <groupId>javax.servlet.jsp</groupId>
  130. <artifactId>jsp-api</artifactId>
  131. <scope>compile</scope>
  132. </dependency>
  133. <dependency>
  134. <groupId>commons-el</groupId>
  135. <artifactId>commons-el</artifactId>
  136. <scope>compile</scope>
  137. </dependency>
  138. <dependency>
  139. <groupId>commons-logging</groupId>
  140. <artifactId>commons-logging</artifactId>
  141. <scope>compile</scope>
  142. </dependency>
  143. <dependency>
  144. <groupId>commons-logging</groupId>
  145. <artifactId>commons-logging-api</artifactId>
  146. <scope>compile</scope>
  147. </dependency>
  148. <dependency>
  149. <groupId>log4j</groupId>
  150. <artifactId>log4j</artifactId>
  151. <scope>compile</scope>
  152. </dependency>
  153. <dependency>
  154. <groupId>net.java.dev.jets3t</groupId>
  155. <artifactId>jets3t</artifactId>
  156. <scope>compile</scope>
  157. </dependency>
  158. <dependency>
  159. <groupId>org.apache.mina</groupId>
  160. <artifactId>mina-core</artifactId>
  161. <scope>test</scope>
  162. </dependency>
  163. <dependency>
  164. <groupId>org.apache.ftpserver</groupId>
  165. <artifactId>ftplet-api</artifactId>
  166. <scope>test</scope>
  167. </dependency>
  168. <dependency>
  169. <groupId>org.apache.ftpserver</groupId>
  170. <artifactId>ftpserver-core</artifactId>
  171. <scope>test</scope>
  172. </dependency>
  173. <dependency>
  174. <groupId>org.apache.ftpserver</groupId>
  175. <artifactId>ftpserver-deprecated</artifactId>
  176. <scope>test</scope>
  177. </dependency>
  178. <dependency>
  179. <groupId>junit</groupId>
  180. <artifactId>junit</artifactId>
  181. <scope>test</scope>
  182. </dependency>
  183. <dependency>
  184. <groupId>commons-lang</groupId>
  185. <artifactId>commons-lang</artifactId>
  186. <scope>compile</scope>
  187. </dependency>
  188. <dependency>
  189. <groupId>commons-collections</groupId>
  190. <artifactId>commons-collections</artifactId>
  191. <scope>compile</scope>
  192. </dependency>
  193. <dependency>
  194. <groupId>commons-configuration</groupId>
  195. <artifactId>commons-configuration</artifactId>
  196. <scope>compile</scope>
  197. </dependency>
  198. <dependency>
  199. <groupId>org.slf4j</groupId>
  200. <artifactId>slf4j-api</artifactId>
  201. <scope>compile</scope>
  202. </dependency>
  203. <dependency>
  204. <groupId>org.slf4j</groupId>
  205. <artifactId>slf4j-log4j12</artifactId>
  206. <scope>compile</scope>
  207. </dependency>
  208. <dependency>
  209. <groupId>org.eclipse.jdt</groupId>
  210. <artifactId>core</artifactId>
  211. <scope>compile</scope>
  212. </dependency>
  213. <dependency>
  214. <groupId>oro</groupId>
  215. <artifactId>oro</artifactId>
  216. <scope>compile</scope>
  217. </dependency>
  218. <dependency>
  219. <groupId>org.codehaus.jackson</groupId>
  220. <artifactId>jackson-mapper-asl</artifactId>
  221. <scope>compile</scope>
  222. </dependency>
  223. <dependency>
  224. <groupId>org.aspectj</groupId>
  225. <artifactId>aspectjrt</artifactId>
  226. <scope>compile</scope>
  227. </dependency>
  228. <dependency>
  229. <groupId>org.mockito</groupId>
  230. <artifactId>mockito-all</artifactId>
  231. <scope>test</scope>
  232. </dependency>
  233. <dependency>
  234. <groupId>org.apache.avro</groupId>
  235. <artifactId>avro</artifactId>
  236. <scope>compile</scope>
  237. </dependency>
  238. <dependency>
  239. <groupId>org.apache.avro</groupId>
  240. <artifactId>avro-ipc</artifactId>
  241. <scope>compile</scope>
  242. </dependency>
  243. <dependency>
  244. <groupId>net.sf.kosmosfs</groupId>
  245. <artifactId>kfs</artifactId>
  246. <scope>compile</scope>
  247. </dependency>
  248. <dependency>
  249. <groupId>org.apache.ant</groupId>
  250. <artifactId>ant</artifactId>
  251. <scope>provided</scope>
  252. </dependency>
  253. <dependency>
  254. <groupId>com.google.protobuf</groupId>
  255. <artifactId>protobuf-java</artifactId>
  256. <scope>compile</scope>
  257. </dependency>
  258. <dependency>
  259. <groupId>org.apache.hadoop</groupId>
  260. <artifactId>hadoop-auth</artifactId>
  261. <scope>compile</scope>
  262. </dependency>
  263. <dependency>
  264. <groupId>com.googlecode.json-simple</groupId>
  265. <artifactId>json-simple</artifactId>
  266. <scope>compile</scope>
  267. </dependency>
  268. </dependencies>
  269. <build>
  270. <plugins>
  271. <plugin>
  272. <groupId>org.apache.avro</groupId>
  273. <artifactId>avro-maven-plugin</artifactId>
  274. <executions>
  275. <execution>
  276. <id>generate-avro-test-sources</id>
  277. <phase>generate-test-sources</phase>
  278. <goals>
  279. <goal>schema</goal>
  280. <goal>protocol</goal>
  281. </goals>
  282. </execution>
  283. </executions>
  284. <configuration>
  285. <testOutputDirectory>${project.build.directory}/generated-test-sources/java</testOutputDirectory>
  286. </configuration>
  287. </plugin>
  288. <plugin>
  289. <groupId>org.apache.maven.plugins</groupId>
  290. <artifactId>maven-antrun-plugin</artifactId>
  291. <executions>
  292. <execution>
  293. <id>compile-proto</id>
  294. <phase>generate-sources</phase>
  295. <goals>
  296. <goal>run</goal>
  297. </goals>
  298. <configuration>
  299. <target>
  300. <echo file="target/compile-proto.sh">
  301. PROTO_DIR=src/main/proto
  302. JAVA_DIR=target/generated-sources/java
  303. which cygpath 2&gt; /dev/null
  304. if [ $? = 1 ]; then
  305. IS_WIN=false
  306. else
  307. IS_WIN=true
  308. WIN_PROTO_DIR=`cygpath --windows $PROTO_DIR`
  309. WIN_JAVA_DIR=`cygpath --windows $JAVA_DIR`
  310. fi
  311. mkdir -p $JAVA_DIR 2&gt; /dev/null
  312. for PROTO_FILE in `ls $PROTO_DIR/*.proto 2&gt; /dev/null`
  313. do
  314. if [ "$IS_WIN" = "true" ]; then
  315. protoc -I$WIN_PROTO_DIR --java_out=$WIN_JAVA_DIR $PROTO_FILE
  316. else
  317. protoc -I$PROTO_DIR --java_out=$JAVA_DIR $PROTO_FILE
  318. fi
  319. done
  320. </echo>
  321. <exec executable="sh" dir="${basedir}" failonerror="true">
  322. <arg line="target/compile-proto.sh"/>
  323. </exec>
  324. </target>
  325. </configuration>
  326. </execution>
  327. <execution>
  328. <id>compile-test-proto</id>
  329. <phase>generate-test-sources</phase>
  330. <goals>
  331. <goal>run</goal>
  332. </goals>
  333. <configuration>
  334. <target>
  335. <echo file="target/compile-test-proto.sh">
  336. PROTO_DIR=src/test/proto
  337. JAVA_DIR=target/generated-test-sources/java
  338. which cygpath 2&gt; /dev/null
  339. if [ $? = 1 ]; then
  340. IS_WIN=false
  341. else
  342. IS_WIN=true
  343. WIN_PROTO_DIR=`cygpath --windows $PROTO_DIR`
  344. WIN_JAVA_DIR=`cygpath --windows $JAVA_DIR`
  345. fi
  346. mkdir -p $JAVA_DIR 2&gt; /dev/null
  347. for PROTO_FILE in `ls $PROTO_DIR/*.proto 2&gt; /dev/null`
  348. do
  349. if [ "$IS_WIN" = "true" ]; then
  350. protoc -I$WIN_PROTO_DIR --java_out=$WIN_JAVA_DIR $PROTO_FILE
  351. else
  352. protoc -I$PROTO_DIR --java_out=$JAVA_DIR $PROTO_FILE
  353. fi
  354. done
  355. </echo>
  356. <exec executable="sh" dir="${basedir}" failonerror="true">
  357. <arg line="target/compile-test-proto.sh"/>
  358. </exec>
  359. </target>
  360. </configuration>
  361. </execution>
  362. <execution>
  363. <id>save-version</id>
  364. <phase>generate-sources</phase>
  365. <goals>
  366. <goal>run</goal>
  367. </goals>
  368. <configuration>
  369. <target>
  370. <mkdir dir="${project.build.directory}/generated-sources/java"/>
  371. <exec executable="sh">
  372. <arg
  373. line="${basedir}/dev-support/saveVersion.sh ${project.version} ${project.build.directory}/generated-sources/java"/>
  374. </exec>
  375. </target>
  376. </configuration>
  377. </execution>
  378. <execution>
  379. <id>generate-test-sources</id>
  380. <phase>generate-test-sources</phase>
  381. <goals>
  382. <goal>run</goal>
  383. </goals>
  384. <configuration>
  385. <target>
  386. <mkdir dir="${project.build.directory}/generated-test-sources/java"/>
  387. <taskdef name="recordcc" classname="org.apache.hadoop.record.compiler.ant.RccTask">
  388. <classpath refid="maven.compile.classpath"/>
  389. </taskdef>
  390. <recordcc destdir="${project.build.directory}/generated-test-sources/java">
  391. <fileset dir="${basedir}/src/test/ddl" includes="**/*.jr"/>
  392. </recordcc>
  393. </target>
  394. </configuration>
  395. </execution>
  396. <execution>
  397. <id>create-log-dir</id>
  398. <phase>process-test-resources</phase>
  399. <goals>
  400. <goal>run</goal>
  401. </goals>
  402. <configuration>
  403. <target>
  404. <!--
  405. TODO: there are tests (TestLocalFileSystem#testCopy) that fail if data
  406. TODO: from a previous run is present
  407. -->
  408. <delete dir="${test.build.data}"/>
  409. <mkdir dir="${test.build.data}"/>
  410. <mkdir dir="${hadoop.log.dir}"/>
  411. <copy toDir="${project.build.directory}/test-classes">
  412. <fileset dir="${basedir}/src/main/conf"/>
  413. </copy>
  414. </target>
  415. </configuration>
  416. </execution>
  417. <execution>
  418. <phase>pre-site</phase>
  419. <goals>
  420. <goal>run</goal>
  421. </goals>
  422. <configuration>
  423. <tasks>
  424. <copy file="src/main/resources/core-default.xml" todir="src/site/resources"/>
  425. <copy file="src/main/xsl/configuration.xsl" todir="src/site/resources"/>
  426. </tasks>
  427. </configuration>
  428. </execution>
  429. </executions>
  430. </plugin>
  431. <plugin>
  432. <groupId>org.codehaus.mojo</groupId>
  433. <artifactId>build-helper-maven-plugin</artifactId>
  434. <executions>
  435. <execution>
  436. <id>add-source</id>
  437. <phase>generate-sources</phase>
  438. <goals>
  439. <goal>add-source</goal>
  440. </goals>
  441. <configuration>
  442. <sources>
  443. <source>${project.build.directory}/generated-sources/java</source>
  444. </sources>
  445. </configuration>
  446. </execution>
  447. <execution>
  448. <id>add-test-source</id>
  449. <phase>generate-sources</phase>
  450. <goals>
  451. <goal>add-test-source</goal>
  452. </goals>
  453. <configuration>
  454. <sources>
  455. <source>${project.build.directory}/generated-test-sources/java</source>
  456. </sources>
  457. </configuration>
  458. </execution>
  459. </executions>
  460. </plugin>
  461. <plugin>
  462. <groupId>org.apache.rat</groupId>
  463. <artifactId>apache-rat-plugin</artifactId>
  464. <configuration>
  465. <excludes>
  466. <exclude>CHANGES.txt</exclude>
  467. <exclude>.idea/**</exclude>
  468. <exclude>src/main/conf/*</exclude>
  469. <exclude>src/main/docs/**</exclude>
  470. <exclude>dev-support/jdiff/**</exclude>
  471. <exclude>src/main/native/*</exclude>
  472. <exclude>src/main/native/config/*</exclude>
  473. <exclude>src/main/resources/META-INF/services/org.apache.hadoop.security.SecurityInfo</exclude>
  474. <exclude>src/main/native/m4/*</exclude>
  475. <exclude>src/test/empty-file</exclude>
  476. <exclude>src/test/all-tests</exclude>
  477. </excludes>
  478. </configuration>
  479. </plugin>
  480. </plugins>
  481. </build>
  482. <profiles>
  483. <profile>
  484. <id>native</id>
  485. <activation>
  486. <activeByDefault>false</activeByDefault>
  487. </activation>
  488. <properties>
  489. <snappy.prefix>/usr/local</snappy.prefix>
  490. <snappy.lib>${snappy.prefix}/lib</snappy.lib>
  491. <snappy.include>${snappy.prefix}/include</snappy.include>
  492. </properties>
  493. <build>
  494. <plugins>
  495. <plugin>
  496. <groupId>org.apache.maven.plugins</groupId>
  497. <artifactId>maven-antrun-plugin</artifactId>
  498. <executions>
  499. <execution>
  500. <id>compile</id>
  501. <phase>compile</phase>
  502. <goals>
  503. <goal>run</goal>
  504. </goals>
  505. <configuration>
  506. <target>
  507. <mkdir dir="${project.build.directory}/native/javah"/>
  508. <copy toDir="${project.build.directory}/native">
  509. <fileset dir="${basedir}/src/main/native"/>
  510. </copy>
  511. <mkdir dir="${project.build.directory}/native/m4"/>
  512. </target>
  513. </configuration>
  514. </execution>
  515. </executions>
  516. </plugin>
  517. <plugin>
  518. <groupId>org.codehaus.mojo</groupId>
  519. <artifactId>native-maven-plugin</artifactId>
  520. <executions>
  521. <execution>
  522. <phase>compile</phase>
  523. <goals>
  524. <goal>javah</goal>
  525. </goals>
  526. <configuration>
  527. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  528. <javahClassNames>
  529. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  530. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  531. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  532. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  533. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  534. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  535. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  536. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  537. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  538. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  539. </javahClassNames>
  540. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  541. </configuration>
  542. </execution>
  543. </executions>
  544. </plugin>
  545. <plugin>
  546. <groupId>org.codehaus.mojo</groupId>
  547. <artifactId>make-maven-plugin</artifactId>
  548. <executions>
  549. <execution>
  550. <id>compile</id>
  551. <phase>compile</phase>
  552. <goals>
  553. <goal>autoreconf</goal>
  554. <goal>configure</goal>
  555. <goal>make-install</goal>
  556. </goals>
  557. </execution>
  558. </executions>
  559. <configuration>
  560. <!-- autoreconf settings -->
  561. <workDir>${project.build.directory}/native</workDir>
  562. <arguments>
  563. <argument>-i</argument>
  564. <argument>-f</argument>
  565. </arguments>
  566. <!-- configure settings -->
  567. <configureEnvironment>
  568. <property>
  569. <name>OS_NAME</name>
  570. <value>${os.name}</value>
  571. </property>
  572. <property>
  573. <name>OS_ARCH</name>
  574. <value>${os.arch}</value>
  575. </property>
  576. <property>
  577. <name>JVM_DATA_MODEL</name>
  578. <value>${sun.arch.data.model}</value>
  579. </property>
  580. </configureEnvironment>
  581. <configureOptions>
  582. <configureOption>CPPFLAGS=-I${snappy.include}</configureOption>
  583. <configureOption>LDFLAGS=-L${snappy.lib}</configureOption>
  584. </configureOptions>
  585. <configureWorkDir>${project.build.directory}/native</configureWorkDir>
  586. <prefix>/usr/local</prefix>
  587. <!-- make settings -->
  588. <installEnvironment>
  589. <property>
  590. <name>OS_NAME</name>
  591. <value>${os.name}</value>
  592. </property>
  593. <property>
  594. <name>OS_ARCH</name>
  595. <value>${os.arch}</value>
  596. </property>
  597. <property>
  598. <name>JVM_DATA_MODEL</name>
  599. <value>${sun.arch.data.model}</value>
  600. </property>
  601. <property>
  602. <name>HADOOP_NATIVE_SRCDIR</name>
  603. <value>${project.build.directory}/native</value>
  604. </property>
  605. </installEnvironment>
  606. <!-- configure & make settings -->
  607. <destDir>${project.build.directory}/native/target</destDir>
  608. </configuration>
  609. </plugin>
  610. </plugins>
  611. </build>
  612. </profile>
  613. </profiles>
  614. </project>