pom.xml 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050
  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</artifactId>
  18. <version>0.23.0-SNAPSHOT</version>
  19. <relativePath>../hadoop-project</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. <test.build.data>${project.build.directory}/test/data</test.build.data>
  29. <hadoop.log.dir>${project.build.directory}/log</hadoop.log.dir>
  30. <test.build.webapps>${project.build.directory}/test-classes/webapps</test.build.webapps>
  31. <test.cache.data>${project.build.directory}/test-classes</test.cache.data>
  32. <test.build.classes>${project.build.directory}/test-classes</test.build.classes>
  33. <build.platform>${os.name}-${os.arch}-${sun.arch.data.model}</build.platform>
  34. <snappy.prefix>/usr/local</snappy.prefix>
  35. <snappy.lib>${snappy.prefix}/lib</snappy.lib>
  36. <bundle.snappy>false</bundle.snappy>
  37. <hadoop.component>common</hadoop.component>
  38. </properties>
  39. <dependencies>
  40. <dependency>
  41. <groupId>org.apache.hadoop</groupId>
  42. <artifactId>hadoop-annotations</artifactId>
  43. <scope>provided</scope>
  44. </dependency>
  45. <dependency>
  46. <groupId>com.google.guava</groupId>
  47. <artifactId>guava</artifactId>
  48. <scope>compile</scope>
  49. </dependency>
  50. <dependency>
  51. <groupId>commons-cli</groupId>
  52. <artifactId>commons-cli</artifactId>
  53. <scope>compile</scope>
  54. </dependency>
  55. <dependency>
  56. <groupId>org.apache.commons</groupId>
  57. <artifactId>commons-math</artifactId>
  58. <scope>compile</scope>
  59. </dependency>
  60. <dependency>
  61. <groupId>xmlenc</groupId>
  62. <artifactId>xmlenc</artifactId>
  63. <scope>compile</scope>
  64. </dependency>
  65. <dependency>
  66. <groupId>commons-httpclient</groupId>
  67. <artifactId>commons-httpclient</artifactId>
  68. <scope>compile</scope>
  69. </dependency>
  70. <dependency>
  71. <groupId>commons-codec</groupId>
  72. <artifactId>commons-codec</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>tomcat</groupId>
  97. <artifactId>jasper-compiler</artifactId>
  98. <scope>compile</scope>
  99. </dependency>
  100. <dependency>
  101. <groupId>tomcat</groupId>
  102. <artifactId>jasper-runtime</artifactId>
  103. <scope>compile</scope>
  104. </dependency>
  105. <dependency>
  106. <groupId>javax.servlet.jsp</groupId>
  107. <artifactId>jsp-api</artifactId>
  108. <scope>compile</scope>
  109. </dependency>
  110. <dependency>
  111. <groupId>commons-el</groupId>
  112. <artifactId>commons-el</artifactId>
  113. <scope>compile</scope>
  114. </dependency>
  115. <dependency>
  116. <groupId>commons-logging</groupId>
  117. <artifactId>commons-logging</artifactId>
  118. <scope>compile</scope>
  119. </dependency>
  120. <dependency>
  121. <groupId>commons-logging</groupId>
  122. <artifactId>commons-logging-api</artifactId>
  123. <scope>compile</scope>
  124. </dependency>
  125. <dependency>
  126. <groupId>log4j</groupId>
  127. <artifactId>log4j</artifactId>
  128. <scope>compile</scope>
  129. </dependency>
  130. <dependency>
  131. <groupId>net.java.dev.jets3t</groupId>
  132. <artifactId>jets3t</artifactId>
  133. <scope>compile</scope>
  134. </dependency>
  135. <dependency>
  136. <groupId>org.apache.mina</groupId>
  137. <artifactId>mina-core</artifactId>
  138. <scope>test</scope>
  139. </dependency>
  140. <dependency>
  141. <groupId>org.apache.ftpserver</groupId>
  142. <artifactId>ftplet-api</artifactId>
  143. <scope>test</scope>
  144. </dependency>
  145. <dependency>
  146. <groupId>org.apache.ftpserver</groupId>
  147. <artifactId>ftpserver-core</artifactId>
  148. <scope>test</scope>
  149. </dependency>
  150. <dependency>
  151. <groupId>org.apache.ftpserver</groupId>
  152. <artifactId>ftpserver-deprecated</artifactId>
  153. <scope>test</scope>
  154. </dependency>
  155. <dependency>
  156. <groupId>junit</groupId>
  157. <artifactId>junit</artifactId>
  158. <scope>test</scope>
  159. </dependency>
  160. <dependency>
  161. <groupId>commons-lang</groupId>
  162. <artifactId>commons-lang</artifactId>
  163. <scope>compile</scope>
  164. </dependency>
  165. <dependency>
  166. <groupId>commons-collections</groupId>
  167. <artifactId>commons-collections</artifactId>
  168. <scope>compile</scope>
  169. </dependency>
  170. <dependency>
  171. <groupId>commons-configuration</groupId>
  172. <artifactId>commons-configuration</artifactId>
  173. <scope>compile</scope>
  174. </dependency>
  175. <dependency>
  176. <groupId>hsqldb</groupId>
  177. <artifactId>hsqldb</artifactId>
  178. <scope>compile</scope>
  179. </dependency>
  180. <dependency>
  181. <groupId>org.slf4j</groupId>
  182. <artifactId>slf4j-api</artifactId>
  183. <scope>compile</scope>
  184. </dependency>
  185. <dependency>
  186. <groupId>org.slf4j</groupId>
  187. <artifactId>slf4j-log4j12</artifactId>
  188. <scope>compile</scope>
  189. </dependency>
  190. <dependency>
  191. <groupId>org.eclipse.jdt</groupId>
  192. <artifactId>core</artifactId>
  193. <scope>compile</scope>
  194. </dependency>
  195. <dependency>
  196. <groupId>oro</groupId>
  197. <artifactId>oro</artifactId>
  198. <scope>compile</scope>
  199. </dependency>
  200. <dependency>
  201. <groupId>org.codehaus.jackson</groupId>
  202. <artifactId>jackson-mapper-asl</artifactId>
  203. <scope>compile</scope>
  204. </dependency>
  205. <dependency>
  206. <groupId>org.aspectj</groupId>
  207. <artifactId>aspectjrt</artifactId>
  208. <scope>compile</scope>
  209. </dependency>
  210. <dependency>
  211. <groupId>org.mockito</groupId>
  212. <artifactId>mockito-all</artifactId>
  213. <scope>test</scope>
  214. </dependency>
  215. <dependency>
  216. <groupId>org.apache.hadoop</groupId>
  217. <artifactId>avro</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. </dependencies>
  236. <build>
  237. <plugins>
  238. <plugin>
  239. <groupId>org.apache.maven.plugins</groupId>
  240. <artifactId>maven-surefire-plugin</artifactId>
  241. <configuration>
  242. <forkMode>always</forkMode>
  243. <forkedProcessTimeoutInSeconds>600</forkedProcessTimeoutInSeconds>
  244. <argLine>-Xmx1024m</argLine>
  245. <environmentVariables>
  246. <LD_LIBRARY_PATH>${env.LD_LIBRARY_PATH}:${project.build.directory}/native/target/usr/local/lib</LD_LIBRARY_PATH>
  247. </environmentVariables>
  248. <systemPropertyVariables>
  249. <!-- TODO: all references in testcases should be updated to this default -->
  250. <test.build.data>${test.build.data}</test.build.data>
  251. <test.build.webapps>${test.build.webapps}</test.build.webapps>
  252. <test.cache.data>${test.cache.data}</test.cache.data>
  253. <hadoop.log.dir>${hadoop.log.dir}</hadoop.log.dir>
  254. <test.build.classes>${test.build.classes}</test.build.classes>
  255. <java.net.preferIPv4Stack>true</java.net.preferIPv4Stack>
  256. <java.security.krb5.conf>${basedir}/src/test/resources/krb5.conf</java.security.krb5.conf>
  257. </systemPropertyVariables>
  258. <includes>
  259. <include>**/Test*.java</include>
  260. </includes>
  261. <excludes>
  262. <exclude>**/${test.exclude}.java</exclude>
  263. <exclude>${test.exclude.pattern}</exclude>
  264. <exclude>**/Test*$*.java</exclude>
  265. </excludes>
  266. </configuration>
  267. </plugin>
  268. <plugin>
  269. <groupId>org.apache.maven.plugins</groupId>
  270. <artifactId>maven-jar-plugin</artifactId>
  271. <executions>
  272. <execution>
  273. <phase>prepare-package</phase>
  274. <goals>
  275. <goal>jar</goal>
  276. <goal>test-jar</goal>
  277. </goals>
  278. </execution>
  279. </executions>
  280. </plugin>
  281. <plugin>
  282. <groupId>org.apache.maven.plugins</groupId>
  283. <artifactId>maven-source-plugin</artifactId>
  284. <executions>
  285. <execution>
  286. <phase>prepare-package</phase>
  287. <goals>
  288. <goal>jar</goal>
  289. <goal>test-jar</goal>
  290. </goals>
  291. </execution>
  292. </executions>
  293. <configuration>
  294. <attach>true</attach>
  295. </configuration>
  296. </plugin>
  297. <plugin>
  298. <groupId>org.codehaus.mojo</groupId>
  299. <artifactId>findbugs-maven-plugin</artifactId>
  300. <configuration>
  301. <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
  302. </configuration>
  303. </plugin>
  304. <plugin>
  305. <groupId>org.apache.maven.plugins</groupId>
  306. <artifactId>maven-antrun-plugin</artifactId>
  307. <executions>
  308. <execution>
  309. <id>save-version</id>
  310. <phase>generate-sources</phase>
  311. <goals>
  312. <goal>run</goal>
  313. </goals>
  314. <configuration>
  315. <target>
  316. <mkdir dir="${project.build.directory}/generated-sources/java"/>
  317. <exec executable="sh">
  318. <arg
  319. line="${basedir}/dev-support/saveVersion.sh ${project.version} ${project.build.directory}/generated-sources/java"/>
  320. </exec>
  321. </target>
  322. </configuration>
  323. </execution>
  324. <execution>
  325. <id>generate-test-sources</id>
  326. <phase>generate-test-sources</phase>
  327. <goals>
  328. <goal>run</goal>
  329. </goals>
  330. <configuration>
  331. <target>
  332. <mkdir dir="${project.build.directory}/generated-test-sources/java"/>
  333. <taskdef name="recordcc" classname="org.apache.hadoop.record.compiler.ant.RccTask">
  334. <classpath refid="maven.compile.classpath"/>
  335. </taskdef>
  336. <recordcc destdir="${project.build.directory}/generated-test-sources/java">
  337. <fileset dir="${basedir}/src/test/ddl" includes="**/*.jr"/>
  338. </recordcc>
  339. <taskdef name="schema" classname="org.apache.avro.specific.SchemaTask">
  340. <classpath refid="maven.test.classpath"/>
  341. </taskdef>
  342. <schema destdir="${project.build.directory}/generated-test-sources/java">
  343. <fileset dir="${basedir}/src/test">
  344. <include name="**/*.avsc"/>
  345. </fileset>
  346. </schema>
  347. <taskdef name="schema" classname="org.apache.avro.specific.ProtocolTask">
  348. <classpath refid="maven.test.classpath"/>
  349. </taskdef>
  350. <schema destdir="${project.build.directory}/generated-test-sources/java">
  351. <fileset dir="${basedir}/src/test">
  352. <include name="**/*.avpr"/>
  353. </fileset>
  354. </schema>
  355. </target>
  356. </configuration>
  357. </execution>
  358. <execution>
  359. <id>create-log-dir</id>
  360. <phase>process-test-resources</phase>
  361. <goals>
  362. <goal>run</goal>
  363. </goals>
  364. <configuration>
  365. <target>
  366. <!--
  367. TODO: there are tests (TestLocalFileSystem#testCopy) that fail if data
  368. TODO: from a previous run is present
  369. -->
  370. <delete dir="${test.build.data}"/>
  371. <mkdir dir="${hadoop.log.dir}"/>
  372. <copy toDir="${project.build.directory}/test-classes">
  373. <fileset dir="${basedir}/src/main/conf"/>
  374. </copy>
  375. </target>
  376. </configuration>
  377. </execution>
  378. </executions>
  379. </plugin>
  380. <plugin>
  381. <groupId>org.codehaus.mojo</groupId>
  382. <artifactId>build-helper-maven-plugin</artifactId>
  383. <executions>
  384. <execution>
  385. <id>add-source</id>
  386. <phase>generate-sources</phase>
  387. <goals>
  388. <goal>add-source</goal>
  389. </goals>
  390. <configuration>
  391. <sources>
  392. <source>${project.build.directory}/generated-sources/java</source>
  393. </sources>
  394. </configuration>
  395. </execution>
  396. <execution>
  397. <id>add-test-source</id>
  398. <phase>generate-test-sources</phase>
  399. <goals>
  400. <goal>add-test-source</goal>
  401. </goals>
  402. <configuration>
  403. <sources>
  404. <source>${project.build.directory}/generated-test-sources/java</source>
  405. </sources>
  406. </configuration>
  407. </execution>
  408. </executions>
  409. </plugin>
  410. <plugin>
  411. <groupId>org.apache.maven.plugins</groupId>
  412. <artifactId>maven-checkstyle-plugin</artifactId>
  413. <configuration>
  414. <configLocation>file://${basedir}/dev-support/checkstyle.xml</configLocation>
  415. <failOnViolation>false</failOnViolation>
  416. <format>xml</format>
  417. <format>html</format>
  418. <outputFile>${project.build.directory}/test/checkstyle-errors.xml</outputFile>
  419. </configuration>
  420. </plugin>
  421. <plugin>
  422. <groupId>org.apache.rat</groupId>
  423. <artifactId>apache-rat-plugin</artifactId>
  424. <configuration>
  425. <excludes>
  426. <exclude>CHANGES.txt</exclude>
  427. <exclude>.idea/**</exclude>
  428. <exclude>src/main/conf/*</exclude>
  429. <exclude>src/main/docs/**</exclude>
  430. <exclude>dev-support/jdiff/**</exclude>
  431. <exclude>src/main/native/*</exclude>
  432. <exclude>src/main/native/config/*</exclude>
  433. <exclude>src/main/resources/META-INF/services/org.apache.hadoop.security.SecurityInfo</exclude>
  434. <exclude>src/main/native/m4/*</exclude>
  435. <exclude>src/test/empty-file</exclude>
  436. <exclude>src/test/all-tests</exclude>
  437. </excludes>
  438. </configuration>
  439. </plugin>
  440. <plugin>
  441. <groupId>org.apache.maven.plugins</groupId>
  442. <artifactId>maven-javadoc-plugin</artifactId>
  443. <configuration>
  444. <linksource>true</linksource>
  445. <quiet>true</quiet>
  446. <verbose>false</verbose>
  447. <source>${maven.compile.source}</source>
  448. <charset>${maven.compile.encoding}</charset>
  449. <reportOutputDirectory>${project.build.directory}/site</reportOutputDirectory>
  450. <destDir>api</destDir>
  451. <groups>
  452. <group>
  453. <title>${project.name} API</title>
  454. <packages>org.apache.hadoop*</packages>
  455. </group>
  456. </groups>
  457. <doclet>org.apache.hadoop.classification.tools.ExcludePrivateAnnotationsStandardDoclet</doclet>
  458. <docletArtifacts>
  459. <docletArtifact>
  460. <groupId>org.apache.hadoop</groupId>
  461. <artifactId>hadoop-annotations</artifactId>
  462. <version>${project.version}</version>
  463. </docletArtifact>
  464. </docletArtifacts>
  465. <useStandardDocletOptions>true</useStandardDocletOptions>
  466. <!-- switch on dependency-driven aggregation -->
  467. <includeDependencySources>true</includeDependencySources>
  468. <dependencySourceIncludes>
  469. <!-- include ONLY dependencies I control -->
  470. <dependencySourceInclude>org.apache.hadoop:hadoop-annotations</dependencySourceInclude>
  471. </dependencySourceIncludes>
  472. </configuration>
  473. </plugin>
  474. </plugins>
  475. </build>
  476. <profiles>
  477. <profile>
  478. <id>native</id>
  479. <activation>
  480. <activeByDefault>false</activeByDefault>
  481. </activation>
  482. <properties>
  483. <snappy.prefix>/usr/local</snappy.prefix>
  484. <snappy.lib>${snappy.prefix}/lib</snappy.lib>
  485. <snappy.include>${snappy.prefix}/include</snappy.include>
  486. </properties>
  487. <build>
  488. <plugins>
  489. <plugin>
  490. <groupId>org.apache.maven.plugins</groupId>
  491. <artifactId>maven-antrun-plugin</artifactId>
  492. <executions>
  493. <execution>
  494. <id>compile</id>
  495. <phase>compile</phase>
  496. <goals>
  497. <goal>run</goal>
  498. </goals>
  499. <configuration>
  500. <target>
  501. <mkdir dir="${project.build.directory}/native/javah"/>
  502. <copy toDir="${project.build.directory}/native">
  503. <fileset dir="${basedir}/src/main/native"/>
  504. </copy>
  505. <mkdir dir="${project.build.directory}/native/m4"/>
  506. </target>
  507. </configuration>
  508. </execution>
  509. </executions>
  510. </plugin>
  511. <plugin>
  512. <groupId>org.codehaus.mojo</groupId>
  513. <artifactId>native-maven-plugin</artifactId>
  514. <executions>
  515. <execution>
  516. <phase>compile</phase>
  517. <goals>
  518. <goal>javah</goal>
  519. </goals>
  520. <configuration>
  521. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  522. <javahClassNames>
  523. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  524. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  525. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  526. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  527. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  528. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  529. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  530. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  531. </javahClassNames>
  532. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  533. </configuration>
  534. </execution>
  535. </executions>
  536. </plugin>
  537. <plugin>
  538. <groupId>org.codehaus.mojo</groupId>
  539. <artifactId>make-maven-plugin</artifactId>
  540. <executions>
  541. <execution>
  542. <id>compile</id>
  543. <phase>compile</phase>
  544. <goals>
  545. <goal>autoreconf</goal>
  546. <goal>configure</goal>
  547. <goal>make-install</goal>
  548. </goals>
  549. </execution>
  550. </executions>
  551. <configuration>
  552. <!-- autoreconf settings -->
  553. <workDir>${project.build.directory}/native</workDir>
  554. <arguments>
  555. <argument>-i</argument>
  556. <argument>-f</argument>
  557. </arguments>
  558. <!-- configure settings -->
  559. <configureEnvironment>
  560. <property>
  561. <name>OS_NAME</name>
  562. <value>${os.name}</value>
  563. </property>
  564. <property>
  565. <name>OS_ARCH</name>
  566. <value>${os.arch}</value>
  567. </property>
  568. <property>
  569. <name>JVM_DATA_MODEL</name>
  570. <value>${sun.arch.data.model}</value>
  571. </property>
  572. </configureEnvironment>
  573. <configureOptions>
  574. <configureOption>CPPFLAGS=-I${snappy.include}</configureOption>
  575. <configureOption>LDFLAGS=-L${snappy.lib}</configureOption>
  576. </configureOptions>
  577. <configureWorkDir>${project.build.directory}/native</configureWorkDir>
  578. <prefix>/usr/local</prefix>
  579. <!-- make settings -->
  580. <installEnvironment>
  581. <property>
  582. <name>OS_NAME</name>
  583. <value>${os.name}</value>
  584. </property>
  585. <property>
  586. <name>OS_ARCH</name>
  587. <value>${os.arch}</value>
  588. </property>
  589. <property>
  590. <name>JVM_DATA_MODEL</name>
  591. <value>${sun.arch.data.model}</value>
  592. </property>
  593. <property>
  594. <name>HADOOP_NATIVE_SRCDIR</name>
  595. <value>${project.build.directory}/native</value>
  596. </property>
  597. </installEnvironment>
  598. <!-- configure & make settings -->
  599. <destDir>${project.build.directory}/native/target</destDir>
  600. </configuration>
  601. </plugin>
  602. </plugins>
  603. </build>
  604. </profile>
  605. <profile>
  606. <id>docs</id>
  607. <activation>
  608. <activeByDefault>false</activeByDefault>
  609. </activation>
  610. <properties>
  611. <jdiff.stable.api>0.20.2</jdiff.stable.api>
  612. <jdiff.stability>-unstable</jdiff.stability>
  613. <jdiff.compatibility></jdiff.compatibility>
  614. <jdiff.javadoc.maxmemory>512m</jdiff.javadoc.maxmemory>
  615. </properties>
  616. <build>
  617. <plugins>
  618. <plugin>
  619. <groupId>org.apache.maven.plugins</groupId>
  620. <artifactId>maven-javadoc-plugin</artifactId>
  621. <executions>
  622. <execution>
  623. <goals>
  624. <goal>javadoc</goal>
  625. </goals>
  626. <phase>prepare-package</phase>
  627. </execution>
  628. </executions>
  629. </plugin>
  630. <plugin>
  631. <groupId>org.codehaus.mojo</groupId>
  632. <artifactId>findbugs-maven-plugin</artifactId>
  633. <executions>
  634. <execution>
  635. <goals>
  636. <goal>findbugs</goal>
  637. </goals>
  638. <phase>prepare-package</phase>
  639. </execution>
  640. </executions>
  641. <configuration>
  642. <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
  643. </configuration>
  644. </plugin>
  645. <plugin>
  646. <groupId>org.apache.maven.plugins</groupId>
  647. <artifactId>maven-dependency-plugin</artifactId>
  648. <executions>
  649. <execution>
  650. <id>site</id>
  651. <phase>prepare-package</phase>
  652. <goals>
  653. <goal>copy</goal>
  654. </goals>
  655. <configuration>
  656. <artifactItems>
  657. <artifactItem>
  658. <groupId>jdiff</groupId>
  659. <artifactId>jdiff</artifactId>
  660. <version>${jdiff.version}</version>
  661. <overWrite>false</overWrite>
  662. <outputDirectory>${project.build.directory}</outputDirectory>
  663. <destFileName>jdiff.jar</destFileName>
  664. </artifactItem>
  665. <artifactItem>
  666. <groupId>org.apache.hadoop</groupId>
  667. <artifactId>hadoop-annotations</artifactId>
  668. <version>${hadoop.annotations.version}</version>
  669. <overWrite>false</overWrite>
  670. <outputDirectory>${project.build.directory}</outputDirectory>
  671. <destFileName>hadoop-annotations.jar</destFileName>
  672. </artifactItem>
  673. </artifactItems>
  674. </configuration>
  675. </execution>
  676. </executions>
  677. </plugin>
  678. <plugin>
  679. <groupId>org.apache.maven.plugins</groupId>
  680. <artifactId>maven-antrun-plugin</artifactId>
  681. <executions>
  682. <execution>
  683. <id>site</id>
  684. <phase>prepare-package</phase>
  685. <goals>
  686. <goal>run</goal>
  687. </goals>
  688. <configuration>
  689. <target>
  690. <mkdir dir="${project.build.directory}/docs-src"/>
  691. <copy todir="${project.build.directory}/docs-src">
  692. <fileset dir="${basedir}/src/main/docs"/>
  693. </copy>
  694. <!-- Docs -->
  695. <exec dir="${project.build.directory}/docs-src"
  696. executable="${env.FORREST_HOME}/bin/forrest"
  697. failonerror="true">
  698. </exec>
  699. <copy todir="${project.build.directory}/site">
  700. <fileset dir="${project.build.directory}/docs-src/build/site"/>
  701. </copy>
  702. <copy file="${project.build.directory}/docs-src/releasenotes.html"
  703. todir="${project.build.directory}/site"/>
  704. <style basedir="${basedir}/src/main/resources"
  705. destdir="${project.build.directory}/site"
  706. includes="core-default.xml"
  707. style="${basedir}/src/main/xsl/configuration.xsl"/>
  708. <!-- Convert 'CHANGES.txt' to 'changes.html" -->
  709. <exec executable="perl" input="${basedir}/../CHANGES.txt"
  710. output="${project.build.directory}/site/changes.html"
  711. failonerror="true">
  712. <arg value="${project.build.directory}/docs-src/changes/changes2html.pl"/>
  713. </exec>
  714. <copy todir="${project.build.directory}/site">
  715. <fileset dir="${project.build.directory}/docs-src/changes" includes="*.css"/>
  716. </copy>
  717. <!-- Jdiff -->
  718. <mkdir dir="${project.build.directory}/site/jdiff/xml"/>
  719. <javadoc maxmemory="${jdiff.javadoc.maxmemory}" verbose="yes">
  720. <doclet name="org.apache.hadoop.classification.tools.ExcludePrivateAnnotationsJDiffDoclet"
  721. path="${project.build.directory}/hadoop-annotations.jar:${project.build.directory}/jdiff.jar">
  722. <param name="-apidir" value="${project.build.directory}/site/jdiff/xml"/>
  723. <param name="-apiname" value="hadoop-core ${project.version}"/>
  724. <param name="${jdiff.stability}"/>
  725. </doclet>
  726. <packageset dir="${basedir}/src/main/java"/>
  727. <classpath>
  728. <path refid="maven.compile.classpath"/>
  729. </classpath>
  730. </javadoc>
  731. <javadoc sourcepath="${basedir}/src/main/java"
  732. destdir="${project.build.directory}/site/jdiff/xml"
  733. sourceFiles="${basedir}/dev-support/jdiff/Null.java"
  734. maxmemory="${jdiff.javadoc.maxmemory}">
  735. <doclet name="org.apache.hadoop.classification.tools.ExcludePrivateAnnotationsJDiffDoclet"
  736. path="${project.build.directory}/hadoop-annotations.jar:${project.build.directory}/jdiff.jar">
  737. <param name="-oldapi" value="hadoop-core ${jdiff.stable.api}"/>
  738. <param name="-newapi" value="hadoop-core ${project.version}"/>
  739. <param name="-oldapidir" value="${basedir}/dev-support/jdiff"/>
  740. <param name="-newapidir" value="${project.build.directory}/site/jdiff/xml"/>
  741. <param name="-javadocold"
  742. value="http://hadoop.apache.org/docs/${jdiff.stable.api}/api/"/>
  743. <param name="-javadocnew" value="${project.build.directory}/site/api"/>
  744. <param name="-stats"/>
  745. <param name="${jdiff.stability}"/>
  746. <param name="${jdiff.compatibility}"/>
  747. </doclet>
  748. <classpath>
  749. <path refid="maven.compile.classpath"/>
  750. </classpath>
  751. </javadoc>
  752. <xslt style="${env.FINDBUGS_HOME}/src/xsl/default.xsl"
  753. in="${project.build.directory}/findbugsXml.xml"
  754. out="${project.build.directory}/site/findbugs.html"/>
  755. </target>
  756. </configuration>
  757. </execution>
  758. </executions>
  759. </plugin>
  760. </plugins>
  761. </build>
  762. </profile>
  763. <profile>
  764. <id>src</id>
  765. <activation>
  766. <activeByDefault>false</activeByDefault>
  767. </activation>
  768. <build>
  769. <plugins>
  770. <plugin>
  771. <groupId>org.apache.maven.plugins</groupId>
  772. <artifactId>maven-assembly-plugin</artifactId>
  773. <dependencies>
  774. <dependency>
  775. <groupId>org.apache.hadoop</groupId>
  776. <artifactId>hadoop-assemblies</artifactId>
  777. <version>${hadoop.assemblies.version}</version>
  778. </dependency>
  779. </dependencies>
  780. <executions>
  781. <execution>
  782. <id>pre-tar-src</id>
  783. <phase>prepare-package</phase>
  784. <goals>
  785. <goal>single</goal>
  786. </goals>
  787. <configuration>
  788. <appendAssemblyId>false</appendAssemblyId>
  789. <attach>false</attach>
  790. <finalName>${project.artifactId}-${project.version}</finalName>
  791. <descriptorRefs>
  792. <descriptorRef>hadoop-src</descriptorRef>
  793. </descriptorRefs>
  794. </configuration>
  795. </execution>
  796. </executions>
  797. </plugin>
  798. </plugins>
  799. </build>
  800. </profile>
  801. <profile>
  802. <id>tar</id>
  803. <activation>
  804. <activeByDefault>false</activeByDefault>
  805. </activation>
  806. <build>
  807. <plugins>
  808. <plugin>
  809. <groupId>org.apache.maven.plugins</groupId>
  810. <artifactId>maven-antrun-plugin</artifactId>
  811. <executions>
  812. <execution>
  813. <id>pre-tar</id>
  814. <phase>prepare-package</phase>
  815. <goals>
  816. <goal>run</goal>
  817. </goals>
  818. <configuration>
  819. <target>
  820. <!-- Using Unix script to preserve symlinks -->
  821. <echo file="${project.build.directory}/tar-copynativelibs.sh">
  822. which cygpath 2> /dev/null
  823. if [ $? = 1 ]; then
  824. BUILD_DIR="${project.build.directory}"
  825. else
  826. BUILD_DIR=`cygpath --unix '${project.build.directory}'`
  827. fi
  828. TAR='tar cf -'
  829. UNTAR='tar xfBp -'
  830. LIB_DIR="${BUILD_DIR}/native/target/usr/local/lib"
  831. if [ -d $${LIB_DIR} ] ; then
  832. TARGET_DIR="${BUILD_DIR}/${project.artifactId}-${project.version}/lib/native/${build.platform}"
  833. mkdir -p $${TARGET_DIR}
  834. cd $${LIB_DIR}
  835. $$TAR *hadoop* | (cd $${TARGET_DIR}/; $$UNTAR)
  836. if [ "${bundle.snappy}" = "true" ] ; then
  837. cd ${snappy.lib}
  838. $$TAR *snappy* | (cd $${TARGET_DIR}/; $$UNTAR)
  839. fi
  840. fi
  841. </echo>
  842. <exec executable="sh" dir="${project.build.directory}" failonerror="true">
  843. <arg line="./tar-copynativelibs.sh"/>
  844. </exec>
  845. </target>
  846. </configuration>
  847. </execution>
  848. <execution>
  849. <id>tar</id>
  850. <phase>package</phase>
  851. <goals>
  852. <goal>run</goal>
  853. </goals>
  854. <configuration>
  855. <target>
  856. <!-- Using Unix script to preserve symlinks -->
  857. <echo file="${project.build.directory}/tar-maketar.sh">
  858. which cygpath 2> /dev/null
  859. if [ $? = 1 ]; then
  860. BUILD_DIR="${project.build.directory}"
  861. else
  862. BUILD_DIR=`cygpath --unix '${project.build.directory}'`
  863. fi
  864. cd ${BUILD_DIR}
  865. tar czf ${project.artifactId}-${project.version}.tar.gz ${project.artifactId}-${project.version}
  866. </echo>
  867. <exec executable="sh" dir="${project.build.directory}" failonerror="true">
  868. <arg line="./tar-maketar.sh"/>
  869. </exec>
  870. </target>
  871. </configuration>
  872. </execution>
  873. </executions>
  874. </plugin>
  875. <plugin>
  876. <groupId>org.apache.maven.plugins</groupId>
  877. <artifactId>maven-assembly-plugin</artifactId>
  878. <dependencies>
  879. <dependency>
  880. <groupId>org.apache.hadoop</groupId>
  881. <artifactId>hadoop-assemblies</artifactId>
  882. <version>${hadoop.assemblies.version}</version>
  883. </dependency>
  884. </dependencies>
  885. <executions>
  886. <execution>
  887. <id>pre-tar</id>
  888. <phase>prepare-package</phase>
  889. <goals>
  890. <goal>single</goal>
  891. </goals>
  892. <configuration>
  893. <appendAssemblyId>false</appendAssemblyId>
  894. <attach>false</attach>
  895. <finalName>${project.artifactId}-${project.version}</finalName>
  896. <descriptorRefs>
  897. <descriptorRef>hadoop-tar</descriptorRef>
  898. </descriptorRefs>
  899. </configuration>
  900. </execution>
  901. </executions>
  902. </plugin>
  903. </plugins>
  904. </build>
  905. </profile>
  906. <profile>
  907. <id>bintar</id>
  908. <activation>
  909. <activeByDefault>false</activeByDefault>
  910. </activation>
  911. <build>
  912. <plugins>
  913. <plugin>
  914. <groupId>org.apache.maven.plugins</groupId>
  915. <artifactId>maven-antrun-plugin</artifactId>
  916. <executions>
  917. <execution>
  918. <id>pre-bintar</id>
  919. <phase>prepare-package</phase>
  920. <goals>
  921. <goal>run</goal>
  922. </goals>
  923. <configuration>
  924. <target>
  925. <!-- Using Unix script to preserve symlinks -->
  926. <echo file="${project.build.directory}/bintar-copynativelibs.sh">
  927. which cygpath 2> /dev/null
  928. if [ $? = 1 ]; then
  929. BUILD_DIR="${project.build.directory}"
  930. else
  931. BUILD_DIR=`cygpath --unix '${project.build.directory}'`
  932. fi
  933. TAR='tar cf -'
  934. UNTAR='tar xfBp -'
  935. LIB_DIR="${BUILD_DIR}/native/target/usr/local/lib"
  936. if [ -d $${LIB_DIR} ] ; then
  937. TARGET_DIR="${BUILD_DIR}/${project.artifactId}-${project.version}-bin/lib"
  938. mkdir -p $${TARGET_DIR}
  939. cd $${LIB_DIR}
  940. $$TAR *hadoop* | (cd $${TARGET_DIR}/; $$UNTAR)
  941. if [ "${bundle.snappy}" = "true" ] ; then
  942. cd ${snappy.lib}
  943. $$TAR *snappy* | (cd $${TARGET_DIR}/; $$UNTAR)
  944. fi
  945. fi
  946. </echo>
  947. <exec executable="sh" dir="${project.build.directory}" failonerror="true">
  948. <arg line="./bintar-copynativelibs.sh"/>
  949. </exec>
  950. </target>
  951. </configuration>
  952. </execution>
  953. <execution>
  954. <id>bintar</id>
  955. <phase>package</phase>
  956. <goals>
  957. <goal>run</goal>
  958. </goals>
  959. <configuration>
  960. <target>
  961. <!-- Using Unix script to preserve symlinks -->
  962. <echo file="${project.build.directory}/bintar-maketar.sh">
  963. which cygpath 2> /dev/null
  964. if [ $? = 1 ]; then
  965. BUILD_DIR="${project.build.directory}"
  966. else
  967. BUILD_DIR=`cygpath --unix '${project.build.directory}'`
  968. fi
  969. cd ${BUILD_DIR}
  970. tar czf ${project.artifactId}-${project.version}-bin.tar.gz ${project.artifactId}-${project.version}-bin
  971. </echo>
  972. <exec executable="sh" dir="${project.build.directory}" failonerror="true">
  973. <arg line="./bintar-maketar.sh"/>
  974. </exec>
  975. </target>
  976. </configuration>
  977. </execution>
  978. </executions>
  979. </plugin>
  980. <plugin>
  981. <groupId>org.apache.maven.plugins</groupId>
  982. <artifactId>maven-assembly-plugin</artifactId>
  983. <dependencies>
  984. <dependency>
  985. <groupId>org.apache.hadoop</groupId>
  986. <artifactId>hadoop-assemblies</artifactId>
  987. <version>${hadoop.assemblies.version}</version>
  988. </dependency>
  989. </dependencies>
  990. <executions>
  991. <execution>
  992. <id>pre-bintar</id>
  993. <phase>prepare-package</phase>
  994. <goals>
  995. <goal>single</goal>
  996. </goals>
  997. <configuration>
  998. <appendAssemblyId>false</appendAssemblyId>
  999. <attach>false</attach>
  1000. <finalName>${project.artifactId}-${project.version}-bin</finalName>
  1001. <descriptorRefs>
  1002. <descriptorRef>hadoop-bintar</descriptorRef>
  1003. </descriptorRefs>
  1004. </configuration>
  1005. </execution>
  1006. </executions>
  1007. </plugin>
  1008. </plugins>
  1009. </build>
  1010. </profile>
  1011. </profiles>
  1012. </project>