pom.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515
  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.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.23.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>tomcat</groupId>
  92. <artifactId>jasper-compiler</artifactId>
  93. <scope>compile</scope>
  94. </dependency>
  95. <dependency>
  96. <groupId>tomcat</groupId>
  97. <artifactId>jasper-runtime</artifactId>
  98. <scope>compile</scope>
  99. </dependency>
  100. <dependency>
  101. <groupId>javax.servlet.jsp</groupId>
  102. <artifactId>jsp-api</artifactId>
  103. <scope>compile</scope>
  104. </dependency>
  105. <dependency>
  106. <groupId>commons-el</groupId>
  107. <artifactId>commons-el</artifactId>
  108. <scope>compile</scope>
  109. </dependency>
  110. <dependency>
  111. <groupId>commons-logging</groupId>
  112. <artifactId>commons-logging</artifactId>
  113. <scope>compile</scope>
  114. </dependency>
  115. <dependency>
  116. <groupId>commons-logging</groupId>
  117. <artifactId>commons-logging-api</artifactId>
  118. <scope>compile</scope>
  119. </dependency>
  120. <dependency>
  121. <groupId>log4j</groupId>
  122. <artifactId>log4j</artifactId>
  123. <scope>compile</scope>
  124. </dependency>
  125. <dependency>
  126. <groupId>net.java.dev.jets3t</groupId>
  127. <artifactId>jets3t</artifactId>
  128. <scope>compile</scope>
  129. </dependency>
  130. <dependency>
  131. <groupId>org.apache.mina</groupId>
  132. <artifactId>mina-core</artifactId>
  133. <scope>test</scope>
  134. </dependency>
  135. <dependency>
  136. <groupId>org.apache.ftpserver</groupId>
  137. <artifactId>ftplet-api</artifactId>
  138. <scope>test</scope>
  139. </dependency>
  140. <dependency>
  141. <groupId>org.apache.ftpserver</groupId>
  142. <artifactId>ftpserver-core</artifactId>
  143. <scope>test</scope>
  144. </dependency>
  145. <dependency>
  146. <groupId>org.apache.ftpserver</groupId>
  147. <artifactId>ftpserver-deprecated</artifactId>
  148. <scope>test</scope>
  149. </dependency>
  150. <dependency>
  151. <groupId>junit</groupId>
  152. <artifactId>junit</artifactId>
  153. <scope>test</scope>
  154. </dependency>
  155. <dependency>
  156. <groupId>commons-lang</groupId>
  157. <artifactId>commons-lang</artifactId>
  158. <scope>compile</scope>
  159. </dependency>
  160. <dependency>
  161. <groupId>commons-collections</groupId>
  162. <artifactId>commons-collections</artifactId>
  163. <scope>compile</scope>
  164. </dependency>
  165. <dependency>
  166. <groupId>commons-configuration</groupId>
  167. <artifactId>commons-configuration</artifactId>
  168. <scope>compile</scope>
  169. </dependency>
  170. <dependency>
  171. <groupId>hsqldb</groupId>
  172. <artifactId>hsqldb</artifactId>
  173. <scope>compile</scope>
  174. </dependency>
  175. <dependency>
  176. <groupId>org.slf4j</groupId>
  177. <artifactId>slf4j-api</artifactId>
  178. <scope>compile</scope>
  179. </dependency>
  180. <dependency>
  181. <groupId>org.slf4j</groupId>
  182. <artifactId>slf4j-log4j12</artifactId>
  183. <scope>compile</scope>
  184. </dependency>
  185. <dependency>
  186. <groupId>org.eclipse.jdt</groupId>
  187. <artifactId>core</artifactId>
  188. <scope>compile</scope>
  189. </dependency>
  190. <dependency>
  191. <groupId>oro</groupId>
  192. <artifactId>oro</artifactId>
  193. <scope>compile</scope>
  194. </dependency>
  195. <dependency>
  196. <groupId>org.codehaus.jackson</groupId>
  197. <artifactId>jackson-mapper-asl</artifactId>
  198. <scope>compile</scope>
  199. </dependency>
  200. <dependency>
  201. <groupId>org.aspectj</groupId>
  202. <artifactId>aspectjrt</artifactId>
  203. <scope>compile</scope>
  204. </dependency>
  205. <dependency>
  206. <groupId>org.mockito</groupId>
  207. <artifactId>mockito-all</artifactId>
  208. <scope>test</scope>
  209. </dependency>
  210. <dependency>
  211. <groupId>org.apache.avro</groupId>
  212. <artifactId>avro</artifactId>
  213. <scope>compile</scope>
  214. </dependency>
  215. <dependency>
  216. <groupId>org.apache.avro</groupId>
  217. <artifactId>avro-ipc</artifactId>
  218. <scope>compile</scope>
  219. </dependency>
  220. <dependency>
  221. <groupId>net.sf.kosmosfs</groupId>
  222. <artifactId>kfs</artifactId>
  223. <scope>compile</scope>
  224. </dependency>
  225. <dependency>
  226. <groupId>org.apache.ant</groupId>
  227. <artifactId>ant</artifactId>
  228. <scope>provided</scope>
  229. </dependency>
  230. <dependency>
  231. <groupId>com.google.protobuf</groupId>
  232. <artifactId>protobuf-java</artifactId>
  233. <scope>compile</scope>
  234. </dependency>
  235. <dependency>
  236. <groupId>org.apache.hadoop</groupId>
  237. <artifactId>hadoop-alfredo</artifactId>
  238. <scope>compile</scope>
  239. </dependency>
  240. </dependencies>
  241. <build>
  242. <plugins>
  243. <plugin>
  244. <groupId>org.apache.avro</groupId>
  245. <artifactId>avro-maven-plugin</artifactId>
  246. <executions>
  247. <execution>
  248. <id>generate-avro-test-sources</id>
  249. <phase>generate-test-sources</phase>
  250. <goals>
  251. <goal>schema</goal>
  252. <goal>protocol</goal>
  253. </goals>
  254. </execution>
  255. </executions>
  256. <configuration>
  257. <testOutputDirectory>${project.build.directory}/generated-test-sources/java</testOutputDirectory>
  258. </configuration>
  259. </plugin>
  260. <plugin>
  261. <groupId>org.apache.maven.plugins</groupId>
  262. <artifactId>maven-antrun-plugin</artifactId>
  263. <executions>
  264. <execution>
  265. <id>save-version</id>
  266. <phase>generate-sources</phase>
  267. <goals>
  268. <goal>run</goal>
  269. </goals>
  270. <configuration>
  271. <target>
  272. <mkdir dir="${project.build.directory}/generated-sources/java"/>
  273. <exec executable="sh">
  274. <arg
  275. line="${basedir}/dev-support/saveVersion.sh ${project.version} ${project.build.directory}/generated-sources/java"/>
  276. </exec>
  277. </target>
  278. </configuration>
  279. </execution>
  280. <execution>
  281. <id>generate-test-sources</id>
  282. <phase>generate-test-sources</phase>
  283. <goals>
  284. <goal>run</goal>
  285. </goals>
  286. <configuration>
  287. <target>
  288. <mkdir dir="${project.build.directory}/generated-test-sources/java"/>
  289. <taskdef name="recordcc" classname="org.apache.hadoop.record.compiler.ant.RccTask">
  290. <classpath refid="maven.compile.classpath"/>
  291. </taskdef>
  292. <recordcc destdir="${project.build.directory}/generated-test-sources/java">
  293. <fileset dir="${basedir}/src/test/ddl" includes="**/*.jr"/>
  294. </recordcc>
  295. </target>
  296. </configuration>
  297. </execution>
  298. <execution>
  299. <id>create-log-dir</id>
  300. <phase>process-test-resources</phase>
  301. <goals>
  302. <goal>run</goal>
  303. </goals>
  304. <configuration>
  305. <target>
  306. <!--
  307. TODO: there are tests (TestLocalFileSystem#testCopy) that fail if data
  308. TODO: from a previous run is present
  309. -->
  310. <delete dir="${test.build.data}"/>
  311. <mkdir dir="${hadoop.log.dir}"/>
  312. <copy toDir="${project.build.directory}/test-classes">
  313. <fileset dir="${basedir}/src/main/conf"/>
  314. </copy>
  315. </target>
  316. </configuration>
  317. </execution>
  318. </executions>
  319. </plugin>
  320. <plugin>
  321. <groupId>org.codehaus.mojo</groupId>
  322. <artifactId>build-helper-maven-plugin</artifactId>
  323. <executions>
  324. <execution>
  325. <id>add-source</id>
  326. <phase>generate-sources</phase>
  327. <goals>
  328. <goal>add-source</goal>
  329. </goals>
  330. <configuration>
  331. <sources>
  332. <source>${project.build.directory}/generated-sources/java</source>
  333. </sources>
  334. </configuration>
  335. </execution>
  336. <execution>
  337. <id>add-test-source</id>
  338. <phase>generate-test-sources</phase>
  339. <goals>
  340. <goal>add-test-source</goal>
  341. </goals>
  342. <configuration>
  343. <sources>
  344. <source>${project.build.directory}/generated-test-sources/java</source>
  345. </sources>
  346. </configuration>
  347. </execution>
  348. </executions>
  349. </plugin>
  350. <plugin>
  351. <groupId>org.apache.rat</groupId>
  352. <artifactId>apache-rat-plugin</artifactId>
  353. <configuration>
  354. <excludes>
  355. <exclude>CHANGES.txt</exclude>
  356. <exclude>.idea/**</exclude>
  357. <exclude>src/main/conf/*</exclude>
  358. <exclude>src/main/docs/**</exclude>
  359. <exclude>dev-support/jdiff/**</exclude>
  360. <exclude>src/main/native/*</exclude>
  361. <exclude>src/main/native/config/*</exclude>
  362. <exclude>src/main/resources/META-INF/services/org.apache.hadoop.security.SecurityInfo</exclude>
  363. <exclude>src/main/native/m4/*</exclude>
  364. <exclude>src/test/empty-file</exclude>
  365. <exclude>src/test/all-tests</exclude>
  366. </excludes>
  367. </configuration>
  368. </plugin>
  369. </plugins>
  370. </build>
  371. <profiles>
  372. <profile>
  373. <id>native</id>
  374. <activation>
  375. <activeByDefault>false</activeByDefault>
  376. </activation>
  377. <properties>
  378. <snappy.prefix>/usr/local</snappy.prefix>
  379. <snappy.lib>${snappy.prefix}/lib</snappy.lib>
  380. <snappy.include>${snappy.prefix}/include</snappy.include>
  381. </properties>
  382. <build>
  383. <plugins>
  384. <plugin>
  385. <groupId>org.apache.maven.plugins</groupId>
  386. <artifactId>maven-antrun-plugin</artifactId>
  387. <executions>
  388. <execution>
  389. <id>compile</id>
  390. <phase>compile</phase>
  391. <goals>
  392. <goal>run</goal>
  393. </goals>
  394. <configuration>
  395. <target>
  396. <mkdir dir="${project.build.directory}/native/javah"/>
  397. <copy toDir="${project.build.directory}/native">
  398. <fileset dir="${basedir}/src/main/native"/>
  399. </copy>
  400. <mkdir dir="${project.build.directory}/native/m4"/>
  401. </target>
  402. </configuration>
  403. </execution>
  404. </executions>
  405. </plugin>
  406. <plugin>
  407. <groupId>org.codehaus.mojo</groupId>
  408. <artifactId>native-maven-plugin</artifactId>
  409. <executions>
  410. <execution>
  411. <phase>compile</phase>
  412. <goals>
  413. <goal>javah</goal>
  414. </goals>
  415. <configuration>
  416. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  417. <javahClassNames>
  418. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  419. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  420. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  421. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  422. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  423. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  424. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  425. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  426. </javahClassNames>
  427. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  428. </configuration>
  429. </execution>
  430. </executions>
  431. </plugin>
  432. <plugin>
  433. <groupId>org.codehaus.mojo</groupId>
  434. <artifactId>make-maven-plugin</artifactId>
  435. <executions>
  436. <execution>
  437. <id>compile</id>
  438. <phase>compile</phase>
  439. <goals>
  440. <goal>autoreconf</goal>
  441. <goal>configure</goal>
  442. <goal>make-install</goal>
  443. </goals>
  444. </execution>
  445. </executions>
  446. <configuration>
  447. <!-- autoreconf settings -->
  448. <workDir>${project.build.directory}/native</workDir>
  449. <arguments>
  450. <argument>-i</argument>
  451. <argument>-f</argument>
  452. </arguments>
  453. <!-- configure settings -->
  454. <configureEnvironment>
  455. <property>
  456. <name>OS_NAME</name>
  457. <value>${os.name}</value>
  458. </property>
  459. <property>
  460. <name>OS_ARCH</name>
  461. <value>${os.arch}</value>
  462. </property>
  463. <property>
  464. <name>JVM_DATA_MODEL</name>
  465. <value>${sun.arch.data.model}</value>
  466. </property>
  467. </configureEnvironment>
  468. <configureOptions>
  469. <configureOption>CPPFLAGS=-I${snappy.include}</configureOption>
  470. <configureOption>LDFLAGS=-L${snappy.lib}</configureOption>
  471. </configureOptions>
  472. <configureWorkDir>${project.build.directory}/native</configureWorkDir>
  473. <prefix>/usr/local</prefix>
  474. <!-- make settings -->
  475. <installEnvironment>
  476. <property>
  477. <name>OS_NAME</name>
  478. <value>${os.name}</value>
  479. </property>
  480. <property>
  481. <name>OS_ARCH</name>
  482. <value>${os.arch}</value>
  483. </property>
  484. <property>
  485. <name>JVM_DATA_MODEL</name>
  486. <value>${sun.arch.data.model}</value>
  487. </property>
  488. <property>
  489. <name>HADOOP_NATIVE_SRCDIR</name>
  490. <value>${project.build.directory}/native</value>
  491. </property>
  492. </installEnvironment>
  493. <!-- configure & make settings -->
  494. <destDir>${project.build.directory}/native/target</destDir>
  495. </configuration>
  496. </plugin>
  497. </plugins>
  498. </build>
  499. </profile>
  500. </profiles>
  501. </project>