pom.xml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548
  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>2.0.2-alpha</version>
  22. <relativePath>../../hadoop-project-dist</relativePath>
  23. </parent>
  24. <groupId>org.apache.hadoop</groupId>
  25. <artifactId>hadoop-common</artifactId>
  26. <version>2.0.2-alpha</version>
  27. <description>Apache Hadoop Common</description>
  28. <name>Apache Hadoop Common</name>
  29. <packaging>jar</packaging>
  30. <properties>
  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>compile</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-io</groupId>
  72. <artifactId>commons-io</artifactId>
  73. <scope>compile</scope>
  74. </dependency>
  75. <dependency>
  76. <groupId>commons-net</groupId>
  77. <artifactId>commons-net</artifactId>
  78. <scope>compile</scope>
  79. </dependency>
  80. <dependency>
  81. <groupId>javax.servlet</groupId>
  82. <artifactId>servlet-api</artifactId>
  83. <scope>compile</scope>
  84. </dependency>
  85. <dependency>
  86. <groupId>org.mortbay.jetty</groupId>
  87. <artifactId>jetty</artifactId>
  88. <scope>compile</scope>
  89. </dependency>
  90. <dependency>
  91. <groupId>org.mortbay.jetty</groupId>
  92. <artifactId>jetty-util</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. <!-- Used, even though 'mvn dependency:analyze' doesn't find it -->
  102. <groupId>com.sun.jersey</groupId>
  103. <artifactId>jersey-json</artifactId>
  104. <scope>compile</scope>
  105. </dependency>
  106. <dependency>
  107. <groupId>com.sun.jersey</groupId>
  108. <artifactId>jersey-server</artifactId>
  109. <scope>compile</scope>
  110. </dependency>
  111. <dependency>
  112. <groupId>tomcat</groupId>
  113. <artifactId>jasper-compiler</artifactId>
  114. <scope>runtime</scope>
  115. </dependency>
  116. <dependency>
  117. <groupId>tomcat</groupId>
  118. <artifactId>jasper-runtime</artifactId>
  119. <scope>runtime</scope>
  120. </dependency>
  121. <dependency>
  122. <groupId>javax.servlet.jsp</groupId>
  123. <artifactId>jsp-api</artifactId>
  124. <scope>runtime</scope>
  125. </dependency>
  126. <dependency>
  127. <groupId>commons-el</groupId>
  128. <artifactId>commons-el</artifactId>
  129. <scope>runtime</scope>
  130. </dependency>
  131. <dependency>
  132. <groupId>commons-logging</groupId>
  133. <artifactId>commons-logging</artifactId>
  134. <scope>compile</scope>
  135. </dependency>
  136. <dependency>
  137. <groupId>log4j</groupId>
  138. <artifactId>log4j</artifactId>
  139. <scope>compile</scope>
  140. </dependency>
  141. <dependency>
  142. <groupId>net.java.dev.jets3t</groupId>
  143. <artifactId>jets3t</artifactId>
  144. <scope>compile</scope>
  145. </dependency>
  146. <dependency>
  147. <groupId>junit</groupId>
  148. <artifactId>junit</artifactId>
  149. <scope>test</scope>
  150. </dependency>
  151. <dependency>
  152. <groupId>commons-lang</groupId>
  153. <artifactId>commons-lang</artifactId>
  154. <scope>compile</scope>
  155. </dependency>
  156. <dependency>
  157. <groupId>commons-configuration</groupId>
  158. <artifactId>commons-configuration</artifactId>
  159. <scope>compile</scope>
  160. </dependency>
  161. <dependency>
  162. <groupId>org.slf4j</groupId>
  163. <artifactId>slf4j-api</artifactId>
  164. <scope>compile</scope>
  165. </dependency>
  166. <dependency>
  167. <groupId>org.slf4j</groupId>
  168. <artifactId>slf4j-log4j12</artifactId>
  169. <scope>runtime</scope>
  170. </dependency>
  171. <dependency>
  172. <groupId>org.codehaus.jackson</groupId>
  173. <artifactId>jackson-core-asl</artifactId>
  174. <scope>compile</scope>
  175. </dependency>
  176. <dependency>
  177. <groupId>org.codehaus.jackson</groupId>
  178. <artifactId>jackson-mapper-asl</artifactId>
  179. <scope>compile</scope>
  180. </dependency>
  181. <dependency>
  182. <groupId>org.mockito</groupId>
  183. <artifactId>mockito-all</artifactId>
  184. <scope>test</scope>
  185. </dependency>
  186. <dependency>
  187. <groupId>org.apache.avro</groupId>
  188. <artifactId>avro</artifactId>
  189. <scope>compile</scope>
  190. </dependency>
  191. <dependency>
  192. <groupId>net.sf.kosmosfs</groupId>
  193. <artifactId>kfs</artifactId>
  194. <scope>compile</scope>
  195. </dependency>
  196. <dependency>
  197. <groupId>org.apache.ant</groupId>
  198. <artifactId>ant</artifactId>
  199. <scope>provided</scope>
  200. </dependency>
  201. <dependency>
  202. <groupId>com.google.protobuf</groupId>
  203. <artifactId>protobuf-java</artifactId>
  204. <scope>compile</scope>
  205. </dependency>
  206. <dependency>
  207. <groupId>org.apache.hadoop</groupId>
  208. <artifactId>hadoop-auth</artifactId>
  209. <scope>compile</scope>
  210. </dependency>
  211. <dependency>
  212. <groupId>com.jcraft</groupId>
  213. <artifactId>jsch</artifactId>
  214. </dependency>
  215. <dependency>
  216. <groupId>org.apache.zookeeper</groupId>
  217. <artifactId>zookeeper</artifactId>
  218. <version>3.4.2</version>
  219. <exclusions>
  220. <exclusion>
  221. <!-- otherwise seems to drag in junit 3.8.1 via jline -->
  222. <groupId>junit</groupId>
  223. <artifactId>junit</artifactId>
  224. </exclusion>
  225. <exclusion>
  226. <groupId>com.sun.jdmk</groupId>
  227. <artifactId>jmxtools</artifactId>
  228. </exclusion>
  229. <exclusion>
  230. <groupId>com.sun.jmx</groupId>
  231. <artifactId>jmxri</artifactId>
  232. </exclusion>
  233. </exclusions>
  234. </dependency>
  235. <dependency>
  236. <groupId>org.apache.zookeeper</groupId>
  237. <artifactId>zookeeper</artifactId>
  238. <version>3.4.2</version>
  239. <type>test-jar</type>
  240. <scope>test</scope>
  241. </dependency>
  242. </dependencies>
  243. <build>
  244. <plugins>
  245. <plugin>
  246. <groupId>org.apache.avro</groupId>
  247. <artifactId>avro-maven-plugin</artifactId>
  248. <executions>
  249. <execution>
  250. <id>generate-avro-test-sources</id>
  251. <phase>generate-test-sources</phase>
  252. <goals>
  253. <goal>schema</goal>
  254. </goals>
  255. </execution>
  256. </executions>
  257. <configuration>
  258. <testOutputDirectory>${project.build.directory}/generated-test-sources/java</testOutputDirectory>
  259. </configuration>
  260. </plugin>
  261. <plugin>
  262. <groupId>org.apache.maven.plugins</groupId>
  263. <artifactId>maven-antrun-plugin</artifactId>
  264. <executions>
  265. <execution>
  266. <id>compile-proto</id>
  267. <phase>generate-sources</phase>
  268. <goals>
  269. <goal>run</goal>
  270. </goals>
  271. <configuration>
  272. <target>
  273. <echo file="target/compile-proto.sh">
  274. PROTO_DIR=src/main/proto
  275. JAVA_DIR=target/generated-sources/java
  276. which cygpath 2&gt; /dev/null
  277. if [ $? = 1 ]; then
  278. IS_WIN=false
  279. else
  280. IS_WIN=true
  281. WIN_PROTO_DIR=`cygpath --windows $PROTO_DIR`
  282. WIN_JAVA_DIR=`cygpath --windows $JAVA_DIR`
  283. fi
  284. mkdir -p $JAVA_DIR 2&gt; /dev/null
  285. for PROTO_FILE in `ls $PROTO_DIR/*.proto 2&gt; /dev/null`
  286. do
  287. if [ "$IS_WIN" = "true" ]; then
  288. protoc -I$WIN_PROTO_DIR --java_out=$WIN_JAVA_DIR $PROTO_FILE
  289. else
  290. protoc -I$PROTO_DIR --java_out=$JAVA_DIR $PROTO_FILE
  291. fi
  292. done
  293. </echo>
  294. <exec executable="sh" dir="${basedir}" failonerror="true">
  295. <arg line="target/compile-proto.sh"/>
  296. </exec>
  297. </target>
  298. </configuration>
  299. </execution>
  300. <execution>
  301. <id>compile-test-proto</id>
  302. <phase>generate-test-sources</phase>
  303. <goals>
  304. <goal>run</goal>
  305. </goals>
  306. <configuration>
  307. <target>
  308. <echo file="target/compile-test-proto.sh">
  309. PROTO_DIR=src/test/proto
  310. JAVA_DIR=target/generated-test-sources/java
  311. which cygpath 2&gt; /dev/null
  312. if [ $? = 1 ]; then
  313. IS_WIN=false
  314. else
  315. IS_WIN=true
  316. WIN_PROTO_DIR=`cygpath --windows $PROTO_DIR`
  317. WIN_JAVA_DIR=`cygpath --windows $JAVA_DIR`
  318. fi
  319. mkdir -p $JAVA_DIR 2&gt; /dev/null
  320. for PROTO_FILE in `ls $PROTO_DIR/*.proto 2&gt; /dev/null`
  321. do
  322. if [ "$IS_WIN" = "true" ]; then
  323. protoc -I$WIN_PROTO_DIR --java_out=$WIN_JAVA_DIR $PROTO_FILE
  324. else
  325. protoc -I$PROTO_DIR --java_out=$JAVA_DIR $PROTO_FILE
  326. fi
  327. done
  328. </echo>
  329. <exec executable="sh" dir="${basedir}" failonerror="true">
  330. <arg line="target/compile-test-proto.sh"/>
  331. </exec>
  332. </target>
  333. </configuration>
  334. </execution>
  335. <execution>
  336. <id>save-version</id>
  337. <phase>generate-sources</phase>
  338. <goals>
  339. <goal>run</goal>
  340. </goals>
  341. <configuration>
  342. <target>
  343. <mkdir dir="${project.build.directory}/generated-sources/java"/>
  344. <exec executable="sh">
  345. <arg
  346. line="${basedir}/dev-support/saveVersion.sh ${project.version} ${project.build.directory}/generated-sources/java"/>
  347. </exec>
  348. </target>
  349. </configuration>
  350. </execution>
  351. <execution>
  352. <id>generate-test-sources</id>
  353. <phase>generate-test-sources</phase>
  354. <goals>
  355. <goal>run</goal>
  356. </goals>
  357. <configuration>
  358. <target>
  359. <mkdir dir="${project.build.directory}/generated-test-sources/java"/>
  360. <taskdef name="recordcc" classname="org.apache.hadoop.record.compiler.ant.RccTask">
  361. <classpath refid="maven.compile.classpath"/>
  362. </taskdef>
  363. <recordcc destdir="${project.build.directory}/generated-test-sources/java">
  364. <fileset dir="${basedir}/src/test/ddl" includes="**/*.jr"/>
  365. </recordcc>
  366. </target>
  367. </configuration>
  368. </execution>
  369. <execution>
  370. <id>create-log-dir</id>
  371. <phase>process-test-resources</phase>
  372. <goals>
  373. <goal>run</goal>
  374. </goals>
  375. <configuration>
  376. <target>
  377. <!--
  378. TODO: there are tests (TestLocalFileSystem#testCopy) that fail if data
  379. TODO: from a previous run is present
  380. -->
  381. <delete dir="${test.build.data}"/>
  382. <mkdir dir="${test.build.data}"/>
  383. <mkdir dir="${hadoop.log.dir}"/>
  384. <copy toDir="${project.build.directory}/test-classes">
  385. <fileset dir="${basedir}/src/main/conf"/>
  386. </copy>
  387. </target>
  388. </configuration>
  389. </execution>
  390. <execution>
  391. <phase>pre-site</phase>
  392. <goals>
  393. <goal>run</goal>
  394. </goals>
  395. <configuration>
  396. <tasks>
  397. <copy file="src/main/resources/core-default.xml" todir="src/site/resources"/>
  398. <copy file="src/main/xsl/configuration.xsl" todir="src/site/resources"/>
  399. </tasks>
  400. </configuration>
  401. </execution>
  402. </executions>
  403. </plugin>
  404. <plugin>
  405. <groupId>org.codehaus.mojo</groupId>
  406. <artifactId>build-helper-maven-plugin</artifactId>
  407. <executions>
  408. <execution>
  409. <id>add-source</id>
  410. <phase>generate-sources</phase>
  411. <goals>
  412. <goal>add-source</goal>
  413. </goals>
  414. <configuration>
  415. <sources>
  416. <source>${project.build.directory}/generated-sources/java</source>
  417. </sources>
  418. </configuration>
  419. </execution>
  420. <execution>
  421. <id>add-test-source</id>
  422. <phase>generate-sources</phase>
  423. <goals>
  424. <goal>add-test-source</goal>
  425. </goals>
  426. <configuration>
  427. <sources>
  428. <source>${project.build.directory}/generated-test-sources/java</source>
  429. </sources>
  430. </configuration>
  431. </execution>
  432. </executions>
  433. </plugin>
  434. <plugin>
  435. <groupId>org.apache.rat</groupId>
  436. <artifactId>apache-rat-plugin</artifactId>
  437. <configuration>
  438. <excludes>
  439. <exclude>CHANGES.txt</exclude>
  440. <exclude>.idea/**</exclude>
  441. <exclude>src/main/conf/*</exclude>
  442. <exclude>src/main/docs/**</exclude>
  443. <exclude>dev-support/jdiff/**</exclude>
  444. <exclude>src/main/native/*</exclude>
  445. <exclude>src/main/native/config/*</exclude>
  446. <exclude>src/main/resources/META-INF/services/org.apache.hadoop.security.SecurityInfo</exclude>
  447. <exclude>src/main/native/m4/*</exclude>
  448. <exclude>src/test/empty-file</exclude>
  449. <exclude>src/test/all-tests</exclude>
  450. </excludes>
  451. </configuration>
  452. </plugin>
  453. </plugins>
  454. </build>
  455. <profiles>
  456. <profile>
  457. <id>native</id>
  458. <activation>
  459. <activeByDefault>false</activeByDefault>
  460. </activation>
  461. <properties>
  462. <snappy.prefix></snappy.prefix>
  463. <snappy.lib></snappy.lib>
  464. <snappy.include></snappy.include>
  465. <require.snappy>false</require.snappy>
  466. </properties>
  467. <build>
  468. <plugins>
  469. <plugin>
  470. <groupId>org.codehaus.mojo</groupId>
  471. <artifactId>native-maven-plugin</artifactId>
  472. <executions>
  473. <execution>
  474. <phase>compile</phase>
  475. <goals>
  476. <goal>javah</goal>
  477. </goals>
  478. <configuration>
  479. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  480. <javahClassNames>
  481. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  482. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  483. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  484. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  485. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  486. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  487. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  488. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  489. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  490. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  491. </javahClassNames>
  492. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  493. </configuration>
  494. </execution>
  495. </executions>
  496. </plugin>
  497. <plugin>
  498. <groupId>org.apache.maven.plugins</groupId>
  499. <artifactId>maven-antrun-plugin</artifactId>
  500. <executions>
  501. <execution>
  502. <id>make</id>
  503. <phase>compile</phase>
  504. <goals><goal>run</goal></goals>
  505. <configuration>
  506. <target>
  507. <exec executable="cmake" dir="${project.build.directory}/native" failonerror="true">
  508. <arg line="${basedir}/src/ -DGENERATED_JAVAH=${project.build.directory}/native/javah -DJVM_ARCH_DATA_MODEL=${sun.arch.data.model} -DREQUIRE_SNAPPY=${require.snappy} -DCUSTOM_SNAPPY_PREFIX=${snappy.prefix} -DCUSTOM_SNAPPY_LIB=${snappy.lib} -DCUSTOM_SNAPPY_INCLUDE=${snappy.include}"/>
  509. </exec>
  510. <exec executable="make" dir="${project.build.directory}/native" failonerror="true">
  511. <arg line="VERBOSE=1"/>
  512. </exec>
  513. </target>
  514. </configuration>
  515. </execution>
  516. <execution>
  517. <id>native_tests</id>
  518. <phase>test</phase>
  519. <goals><goal>run</goal></goals>
  520. <configuration>
  521. <target>
  522. <exec executable="sh" failonerror="true" dir="${project.build.directory}/native">
  523. <arg value="-c"/>
  524. <arg value="[ x$SKIPTESTS = xtrue ] || ${project.build.directory}/native/test_bulk_crc32"/>
  525. <env key="SKIPTESTS" value="${skipTests}"/>
  526. </exec>
  527. </target>
  528. </configuration>
  529. </execution>
  530. </executions>
  531. </plugin>
  532. </plugins>
  533. </build>
  534. </profile>
  535. </profiles>
  536. </project>