pom.xml 21 KB

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