pom.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550
  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.24.0-SNAPSHOT</version>
  19. <relativePath>../../hadoop-project-dist</relativePath>
  20. </parent>
  21. <groupId>org.apache.hadoop</groupId>
  22. <artifactId>hadoop-common</artifactId>
  23. <version>0.24.0-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>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. </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. <goal>protocol</goal>
  273. </goals>
  274. </execution>
  275. </executions>
  276. <configuration>
  277. <testOutputDirectory>${project.build.directory}/generated-test-sources/java</testOutputDirectory>
  278. </configuration>
  279. </plugin>
  280. <plugin>
  281. <groupId>org.apache.maven.plugins</groupId>
  282. <artifactId>maven-antrun-plugin</artifactId>
  283. <executions>
  284. <execution>
  285. <id>save-version</id>
  286. <phase>generate-sources</phase>
  287. <goals>
  288. <goal>run</goal>
  289. </goals>
  290. <configuration>
  291. <target>
  292. <mkdir dir="${project.build.directory}/generated-sources/java"/>
  293. <exec executable="sh">
  294. <arg
  295. line="${basedir}/dev-support/saveVersion.sh ${project.version} ${project.build.directory}/generated-sources/java"/>
  296. </exec>
  297. </target>
  298. </configuration>
  299. </execution>
  300. <execution>
  301. <id>generate-test-sources</id>
  302. <phase>generate-test-sources</phase>
  303. <goals>
  304. <goal>run</goal>
  305. </goals>
  306. <configuration>
  307. <target>
  308. <mkdir dir="${project.build.directory}/generated-test-sources/java"/>
  309. <taskdef name="recordcc" classname="org.apache.hadoop.record.compiler.ant.RccTask">
  310. <classpath refid="maven.compile.classpath"/>
  311. </taskdef>
  312. <recordcc destdir="${project.build.directory}/generated-test-sources/java">
  313. <fileset dir="${basedir}/src/test/ddl" includes="**/*.jr"/>
  314. </recordcc>
  315. </target>
  316. </configuration>
  317. </execution>
  318. <execution>
  319. <id>create-log-dir</id>
  320. <phase>process-test-resources</phase>
  321. <goals>
  322. <goal>run</goal>
  323. </goals>
  324. <configuration>
  325. <target>
  326. <!--
  327. TODO: there are tests (TestLocalFileSystem#testCopy) that fail if data
  328. TODO: from a previous run is present
  329. -->
  330. <delete dir="${test.build.data}"/>
  331. <mkdir dir="${test.build.data}"/>
  332. <mkdir dir="${hadoop.log.dir}"/>
  333. <copy toDir="${project.build.directory}/test-classes">
  334. <fileset dir="${basedir}/src/main/conf"/>
  335. </copy>
  336. </target>
  337. </configuration>
  338. </execution>
  339. <execution>
  340. <phase>pre-site</phase>
  341. <goals>
  342. <goal>run</goal>
  343. </goals>
  344. <configuration>
  345. <tasks>
  346. <copy file="src/main/resources/core-default.xml" todir="src/site/resources"/>
  347. <copy file="src/main/xsl/configuration.xsl" todir="src/site/resources"/>
  348. </tasks>
  349. </configuration>
  350. </execution>
  351. </executions>
  352. </plugin>
  353. <plugin>
  354. <groupId>org.codehaus.mojo</groupId>
  355. <artifactId>build-helper-maven-plugin</artifactId>
  356. <executions>
  357. <execution>
  358. <id>add-source</id>
  359. <phase>generate-sources</phase>
  360. <goals>
  361. <goal>add-source</goal>
  362. </goals>
  363. <configuration>
  364. <sources>
  365. <source>${project.build.directory}/generated-sources/java</source>
  366. </sources>
  367. </configuration>
  368. </execution>
  369. <execution>
  370. <id>add-test-source</id>
  371. <phase>generate-test-sources</phase>
  372. <goals>
  373. <goal>add-test-source</goal>
  374. </goals>
  375. <configuration>
  376. <sources>
  377. <source>${project.build.directory}/generated-test-sources/java</source>
  378. </sources>
  379. </configuration>
  380. </execution>
  381. </executions>
  382. </plugin>
  383. <plugin>
  384. <groupId>org.apache.rat</groupId>
  385. <artifactId>apache-rat-plugin</artifactId>
  386. <configuration>
  387. <excludes>
  388. <exclude>CHANGES.txt</exclude>
  389. <exclude>.idea/**</exclude>
  390. <exclude>src/main/conf/*</exclude>
  391. <exclude>src/main/docs/**</exclude>
  392. <exclude>dev-support/jdiff/**</exclude>
  393. <exclude>src/main/native/*</exclude>
  394. <exclude>src/main/native/config/*</exclude>
  395. <exclude>src/main/resources/META-INF/services/org.apache.hadoop.security.SecurityInfo</exclude>
  396. <exclude>src/main/native/m4/*</exclude>
  397. <exclude>src/test/empty-file</exclude>
  398. <exclude>src/test/all-tests</exclude>
  399. </excludes>
  400. </configuration>
  401. </plugin>
  402. </plugins>
  403. </build>
  404. <profiles>
  405. <profile>
  406. <id>native</id>
  407. <activation>
  408. <activeByDefault>false</activeByDefault>
  409. </activation>
  410. <properties>
  411. <snappy.prefix>/usr/local</snappy.prefix>
  412. <snappy.lib>${snappy.prefix}/lib</snappy.lib>
  413. <snappy.include>${snappy.prefix}/include</snappy.include>
  414. </properties>
  415. <build>
  416. <plugins>
  417. <plugin>
  418. <groupId>org.apache.maven.plugins</groupId>
  419. <artifactId>maven-antrun-plugin</artifactId>
  420. <executions>
  421. <execution>
  422. <id>compile</id>
  423. <phase>compile</phase>
  424. <goals>
  425. <goal>run</goal>
  426. </goals>
  427. <configuration>
  428. <target>
  429. <mkdir dir="${project.build.directory}/native/javah"/>
  430. <copy toDir="${project.build.directory}/native">
  431. <fileset dir="${basedir}/src/main/native"/>
  432. </copy>
  433. <mkdir dir="${project.build.directory}/native/m4"/>
  434. </target>
  435. </configuration>
  436. </execution>
  437. </executions>
  438. </plugin>
  439. <plugin>
  440. <groupId>org.codehaus.mojo</groupId>
  441. <artifactId>native-maven-plugin</artifactId>
  442. <executions>
  443. <execution>
  444. <phase>compile</phase>
  445. <goals>
  446. <goal>javah</goal>
  447. </goals>
  448. <configuration>
  449. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  450. <javahClassNames>
  451. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  452. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  453. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  454. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  455. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  456. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  457. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  458. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  459. </javahClassNames>
  460. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  461. </configuration>
  462. </execution>
  463. </executions>
  464. </plugin>
  465. <plugin>
  466. <groupId>org.codehaus.mojo</groupId>
  467. <artifactId>make-maven-plugin</artifactId>
  468. <executions>
  469. <execution>
  470. <id>compile</id>
  471. <phase>compile</phase>
  472. <goals>
  473. <goal>autoreconf</goal>
  474. <goal>configure</goal>
  475. <goal>make-install</goal>
  476. </goals>
  477. </execution>
  478. </executions>
  479. <configuration>
  480. <!-- autoreconf settings -->
  481. <workDir>${project.build.directory}/native</workDir>
  482. <arguments>
  483. <argument>-i</argument>
  484. <argument>-f</argument>
  485. </arguments>
  486. <!-- configure settings -->
  487. <configureEnvironment>
  488. <property>
  489. <name>OS_NAME</name>
  490. <value>${os.name}</value>
  491. </property>
  492. <property>
  493. <name>OS_ARCH</name>
  494. <value>${os.arch}</value>
  495. </property>
  496. <property>
  497. <name>JVM_DATA_MODEL</name>
  498. <value>${sun.arch.data.model}</value>
  499. </property>
  500. </configureEnvironment>
  501. <configureOptions>
  502. <configureOption>CPPFLAGS=-I${snappy.include}</configureOption>
  503. <configureOption>LDFLAGS=-L${snappy.lib}</configureOption>
  504. </configureOptions>
  505. <configureWorkDir>${project.build.directory}/native</configureWorkDir>
  506. <prefix>/usr/local</prefix>
  507. <!-- make settings -->
  508. <installEnvironment>
  509. <property>
  510. <name>OS_NAME</name>
  511. <value>${os.name}</value>
  512. </property>
  513. <property>
  514. <name>OS_ARCH</name>
  515. <value>${os.arch}</value>
  516. </property>
  517. <property>
  518. <name>JVM_DATA_MODEL</name>
  519. <value>${sun.arch.data.model}</value>
  520. </property>
  521. <property>
  522. <name>HADOOP_NATIVE_SRCDIR</name>
  523. <value>${project.build.directory}/native</value>
  524. </property>
  525. </installEnvironment>
  526. <!-- configure & make settings -->
  527. <destDir>${project.build.directory}/native/target</destDir>
  528. </configuration>
  529. </plugin>
  530. </plugins>
  531. </build>
  532. </profile>
  533. </profiles>
  534. </project>