pom.xml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621
  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.3-SNAPSHOT</version>
  19. <relativePath>../../hadoop-project-dist</relativePath>
  20. </parent>
  21. <groupId>org.apache.hadoop</groupId>
  22. <artifactId>hadoop-common</artifactId>
  23. <version>0.23.3-SNAPSHOT</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>net.sf.kosmosfs</groupId>
  237. <artifactId>kfs</artifactId>
  238. <scope>compile</scope>
  239. </dependency>
  240. <dependency>
  241. <groupId>org.apache.ant</groupId>
  242. <artifactId>ant</artifactId>
  243. <scope>provided</scope>
  244. </dependency>
  245. <dependency>
  246. <groupId>com.google.protobuf</groupId>
  247. <artifactId>protobuf-java</artifactId>
  248. <scope>compile</scope>
  249. </dependency>
  250. <dependency>
  251. <groupId>org.apache.hadoop</groupId>
  252. <artifactId>hadoop-auth</artifactId>
  253. <scope>compile</scope>
  254. </dependency>
  255. <dependency>
  256. <groupId>com.googlecode.json-simple</groupId>
  257. <artifactId>json-simple</artifactId>
  258. <scope>compile</scope>
  259. </dependency>
  260. </dependencies>
  261. <build>
  262. <plugins>
  263. <plugin>
  264. <groupId>org.apache.avro</groupId>
  265. <artifactId>avro-maven-plugin</artifactId>
  266. <executions>
  267. <execution>
  268. <id>generate-avro-test-sources</id>
  269. <phase>generate-test-sources</phase>
  270. <goals>
  271. <goal>schema</goal>
  272. </goals>
  273. </execution>
  274. </executions>
  275. <configuration>
  276. <testOutputDirectory>${project.build.directory}/generated-test-sources/java</testOutputDirectory>
  277. </configuration>
  278. </plugin>
  279. <plugin>
  280. <groupId>org.apache.maven.plugins</groupId>
  281. <artifactId>maven-antrun-plugin</artifactId>
  282. <executions>
  283. <execution>
  284. <id>compile-proto</id>
  285. <phase>generate-sources</phase>
  286. <goals>
  287. <goal>run</goal>
  288. </goals>
  289. <configuration>
  290. <target>
  291. <echo file="target/compile-proto.sh">
  292. PROTO_DIR=src/main/proto
  293. JAVA_DIR=target/generated-sources/java
  294. which cygpath 2> /dev/null
  295. if [ $? = 1 ]; then
  296. IS_WIN=false
  297. else
  298. IS_WIN=true
  299. WIN_PROTO_DIR=`cygpath --windows $PROTO_DIR`
  300. WIN_JAVA_DIR=`cygpath --windows $JAVA_DIR`
  301. fi
  302. mkdir -p $JAVA_DIR 2> /dev/null
  303. for PROTO_FILE in `ls $PROTO_DIR/*.proto 2> /dev/null`
  304. do
  305. if [ "$IS_WIN" = "true" ]; then
  306. protoc -I$WIN_PROTO_DIR --java_out=$WIN_JAVA_DIR $PROTO_FILE
  307. else
  308. protoc -I$PROTO_DIR --java_out=$JAVA_DIR $PROTO_FILE
  309. fi
  310. done
  311. </echo>
  312. <exec executable="sh" dir="${basedir}" failonerror="true">
  313. <arg line="target/compile-proto.sh"/>
  314. </exec>
  315. </target>
  316. </configuration>
  317. </execution>
  318. <execution>
  319. <id>compile-test-proto</id>
  320. <phase>generate-test-sources</phase>
  321. <goals>
  322. <goal>run</goal>
  323. </goals>
  324. <configuration>
  325. <target>
  326. <echo file="target/compile-test-proto.sh">
  327. PROTO_DIR=src/test/proto
  328. JAVA_DIR=target/generated-test-sources/java
  329. which cygpath 2> /dev/null
  330. if [ $? = 1 ]; then
  331. IS_WIN=false
  332. else
  333. IS_WIN=true
  334. WIN_PROTO_DIR=`cygpath --windows $PROTO_DIR`
  335. WIN_JAVA_DIR=`cygpath --windows $JAVA_DIR`
  336. fi
  337. mkdir -p $JAVA_DIR 2> /dev/null
  338. for PROTO_FILE in `ls $PROTO_DIR/*.proto 2> /dev/null`
  339. do
  340. if [ "$IS_WIN" = "true" ]; then
  341. protoc -I$WIN_PROTO_DIR --java_out=$WIN_JAVA_DIR $PROTO_FILE
  342. else
  343. protoc -I$PROTO_DIR --java_out=$JAVA_DIR $PROTO_FILE
  344. fi
  345. done
  346. </echo>
  347. <exec executable="sh" dir="${basedir}" failonerror="true">
  348. <arg line="target/compile-test-proto.sh"/>
  349. </exec>
  350. </target>
  351. </configuration>
  352. </execution>
  353. <execution>
  354. <id>save-version</id>
  355. <phase>generate-sources</phase>
  356. <goals>
  357. <goal>run</goal>
  358. </goals>
  359. <configuration>
  360. <target>
  361. <mkdir dir="${project.build.directory}/generated-sources/java"/>
  362. <exec executable="sh">
  363. <arg
  364. line="${basedir}/dev-support/saveVersion.sh ${project.version} ${project.build.directory}/generated-sources/java"/>
  365. </exec>
  366. </target>
  367. </configuration>
  368. </execution>
  369. <execution>
  370. <id>generate-test-sources</id>
  371. <phase>generate-test-sources</phase>
  372. <goals>
  373. <goal>run</goal>
  374. </goals>
  375. <configuration>
  376. <target>
  377. <mkdir dir="${project.build.directory}/generated-test-sources/java"/>
  378. <taskdef name="recordcc" classname="org.apache.hadoop.record.compiler.ant.RccTask">
  379. <classpath refid="maven.compile.classpath"/>
  380. </taskdef>
  381. <recordcc destdir="${project.build.directory}/generated-test-sources/java">
  382. <fileset dir="${basedir}/src/test/ddl" includes="**/*.jr"/>
  383. </recordcc>
  384. </target>
  385. </configuration>
  386. </execution>
  387. <execution>
  388. <id>create-log-dir</id>
  389. <phase>process-test-resources</phase>
  390. <goals>
  391. <goal>run</goal>
  392. </goals>
  393. <configuration>
  394. <target>
  395. <!--
  396. TODO: there are tests (TestLocalFileSystem#testCopy) that fail if data
  397. TODO: from a previous run is present
  398. -->
  399. <delete dir="${test.build.data}"/>
  400. <mkdir dir="${test.build.data}"/>
  401. <mkdir dir="${hadoop.log.dir}"/>
  402. <copy toDir="${project.build.directory}/test-classes">
  403. <fileset dir="${basedir}/src/main/conf"/>
  404. </copy>
  405. </target>
  406. </configuration>
  407. </execution>
  408. <execution>
  409. <phase>pre-site</phase>
  410. <goals>
  411. <goal>run</goal>
  412. </goals>
  413. <configuration>
  414. <tasks>
  415. <copy file="src/main/resources/core-default.xml" todir="src/site/resources"/>
  416. <copy file="src/main/xsl/configuration.xsl" todir="src/site/resources"/>
  417. </tasks>
  418. </configuration>
  419. </execution>
  420. </executions>
  421. </plugin>
  422. <plugin>
  423. <groupId>org.codehaus.mojo</groupId>
  424. <artifactId>build-helper-maven-plugin</artifactId>
  425. <executions>
  426. <execution>
  427. <id>add-source</id>
  428. <phase>generate-sources</phase>
  429. <goals>
  430. <goal>add-source</goal>
  431. </goals>
  432. <configuration>
  433. <sources>
  434. <source>${project.build.directory}/generated-sources/java</source>
  435. </sources>
  436. </configuration>
  437. </execution>
  438. <execution>
  439. <id>add-test-source</id>
  440. <phase>generate-sources</phase>
  441. <goals>
  442. <goal>add-test-source</goal>
  443. </goals>
  444. <configuration>
  445. <sources>
  446. <source>${project.build.directory}/generated-test-sources/java</source>
  447. </sources>
  448. </configuration>
  449. </execution>
  450. </executions>
  451. </plugin>
  452. <plugin>
  453. <groupId>org.apache.rat</groupId>
  454. <artifactId>apache-rat-plugin</artifactId>
  455. <configuration>
  456. <excludes>
  457. <exclude>CHANGES.txt</exclude>
  458. <exclude>.idea/**</exclude>
  459. <exclude>src/main/conf/*</exclude>
  460. <exclude>src/main/docs/**</exclude>
  461. <exclude>dev-support/jdiff/**</exclude>
  462. <exclude>src/main/native/*</exclude>
  463. <exclude>src/main/native/config/*</exclude>
  464. <exclude>src/main/resources/META-INF/services/org.apache.hadoop.security.SecurityInfo</exclude>
  465. <exclude>src/main/native/m4/*</exclude>
  466. <exclude>src/test/empty-file</exclude>
  467. <exclude>src/test/all-tests</exclude>
  468. </excludes>
  469. </configuration>
  470. </plugin>
  471. </plugins>
  472. </build>
  473. <profiles>
  474. <profile>
  475. <id>native</id>
  476. <activation>
  477. <activeByDefault>false</activeByDefault>
  478. </activation>
  479. <properties>
  480. <snappy.prefix>/usr/local</snappy.prefix>
  481. <snappy.lib>${snappy.prefix}/lib</snappy.lib>
  482. <snappy.include>${snappy.prefix}/include</snappy.include>
  483. </properties>
  484. <build>
  485. <plugins>
  486. <plugin>
  487. <groupId>org.apache.maven.plugins</groupId>
  488. <artifactId>maven-antrun-plugin</artifactId>
  489. <executions>
  490. <execution>
  491. <id>compile</id>
  492. <phase>compile</phase>
  493. <goals>
  494. <goal>run</goal>
  495. </goals>
  496. <configuration>
  497. <target>
  498. <mkdir dir="${project.build.directory}/native/javah"/>
  499. <copy toDir="${project.build.directory}/native">
  500. <fileset dir="${basedir}/src/main/native"/>
  501. </copy>
  502. <mkdir dir="${project.build.directory}/native/m4"/>
  503. </target>
  504. </configuration>
  505. </execution>
  506. </executions>
  507. </plugin>
  508. <plugin>
  509. <groupId>org.codehaus.mojo</groupId>
  510. <artifactId>native-maven-plugin</artifactId>
  511. <executions>
  512. <execution>
  513. <phase>compile</phase>
  514. <goals>
  515. <goal>javah</goal>
  516. </goals>
  517. <configuration>
  518. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  519. <javahClassNames>
  520. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  521. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  522. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  523. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  524. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  525. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  526. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  527. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  528. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  529. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  530. </javahClassNames>
  531. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  532. </configuration>
  533. </execution>
  534. </executions>
  535. </plugin>
  536. <plugin>
  537. <groupId>org.codehaus.mojo</groupId>
  538. <artifactId>make-maven-plugin</artifactId>
  539. <executions>
  540. <execution>
  541. <id>compile</id>
  542. <phase>compile</phase>
  543. <goals>
  544. <goal>autoreconf</goal>
  545. <goal>configure</goal>
  546. <goal>make-install</goal>
  547. </goals>
  548. </execution>
  549. </executions>
  550. <configuration>
  551. <!-- autoreconf settings -->
  552. <workDir>${project.build.directory}/native</workDir>
  553. <arguments>
  554. <argument>-i</argument>
  555. <argument>-f</argument>
  556. </arguments>
  557. <!-- configure settings -->
  558. <configureEnvironment>
  559. <property>
  560. <name>OS_NAME</name>
  561. <value>${os.name}</value>
  562. </property>
  563. <property>
  564. <name>OS_ARCH</name>
  565. <value>${os.arch}</value>
  566. </property>
  567. <property>
  568. <name>JVM_DATA_MODEL</name>
  569. <value>${sun.arch.data.model}</value>
  570. </property>
  571. </configureEnvironment>
  572. <configureOptions>
  573. <configureOption>CPPFLAGS=-I${snappy.include}</configureOption>
  574. <configureOption>LDFLAGS=-L${snappy.lib}</configureOption>
  575. </configureOptions>
  576. <configureWorkDir>${project.build.directory}/native</configureWorkDir>
  577. <prefix>/usr/local</prefix>
  578. <!-- make settings -->
  579. <installEnvironment>
  580. <property>
  581. <name>OS_NAME</name>
  582. <value>${os.name}</value>
  583. </property>
  584. <property>
  585. <name>OS_ARCH</name>
  586. <value>${os.arch}</value>
  587. </property>
  588. <property>
  589. <name>JVM_DATA_MODEL</name>
  590. <value>${sun.arch.data.model}</value>
  591. </property>
  592. <property>
  593. <name>HADOOP_NATIVE_SRCDIR</name>
  594. <value>${project.build.directory}/native</value>
  595. </property>
  596. </installEnvironment>
  597. <!-- configure & make settings -->
  598. <destDir>${project.build.directory}/native/target</destDir>
  599. </configuration>
  600. </plugin>
  601. </plugins>
  602. </build>
  603. </profile>
  604. </profiles>
  605. </project>