pom.xml 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062
  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. <id>prepare-jar</id>
  274. <phase>prepare-package</phase>
  275. <goals>
  276. <goal>jar</goal>
  277. </goals>
  278. </execution>
  279. <execution>
  280. <id>prepare-test-jar</id>
  281. <phase>prepare-package</phase>
  282. <goals>
  283. <goal>test-jar</goal>
  284. </goals>
  285. <configuration>
  286. <includes>
  287. <include>**/*.class</include>
  288. </includes>
  289. </configuration>
  290. </execution>
  291. </executions>
  292. </plugin>
  293. <plugin>
  294. <groupId>org.apache.maven.plugins</groupId>
  295. <artifactId>maven-source-plugin</artifactId>
  296. <executions>
  297. <execution>
  298. <phase>prepare-package</phase>
  299. <goals>
  300. <goal>jar</goal>
  301. <goal>test-jar</goal>
  302. </goals>
  303. </execution>
  304. </executions>
  305. <configuration>
  306. <attach>true</attach>
  307. </configuration>
  308. </plugin>
  309. <plugin>
  310. <groupId>org.codehaus.mojo</groupId>
  311. <artifactId>findbugs-maven-plugin</artifactId>
  312. <configuration>
  313. <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
  314. </configuration>
  315. </plugin>
  316. <plugin>
  317. <groupId>org.apache.maven.plugins</groupId>
  318. <artifactId>maven-antrun-plugin</artifactId>
  319. <executions>
  320. <execution>
  321. <id>save-version</id>
  322. <phase>generate-sources</phase>
  323. <goals>
  324. <goal>run</goal>
  325. </goals>
  326. <configuration>
  327. <target>
  328. <mkdir dir="${project.build.directory}/generated-sources/java"/>
  329. <exec executable="sh">
  330. <arg
  331. line="${basedir}/dev-support/saveVersion.sh ${project.version} ${project.build.directory}/generated-sources/java"/>
  332. </exec>
  333. </target>
  334. </configuration>
  335. </execution>
  336. <execution>
  337. <id>generate-test-sources</id>
  338. <phase>generate-test-sources</phase>
  339. <goals>
  340. <goal>run</goal>
  341. </goals>
  342. <configuration>
  343. <target>
  344. <mkdir dir="${project.build.directory}/generated-test-sources/java"/>
  345. <taskdef name="recordcc" classname="org.apache.hadoop.record.compiler.ant.RccTask">
  346. <classpath refid="maven.compile.classpath"/>
  347. </taskdef>
  348. <recordcc destdir="${project.build.directory}/generated-test-sources/java">
  349. <fileset dir="${basedir}/src/test/ddl" includes="**/*.jr"/>
  350. </recordcc>
  351. <taskdef name="schema" classname="org.apache.avro.specific.SchemaTask">
  352. <classpath refid="maven.test.classpath"/>
  353. </taskdef>
  354. <schema destdir="${project.build.directory}/generated-test-sources/java">
  355. <fileset dir="${basedir}/src/test">
  356. <include name="**/*.avsc"/>
  357. </fileset>
  358. </schema>
  359. <taskdef name="schema" classname="org.apache.avro.specific.ProtocolTask">
  360. <classpath refid="maven.test.classpath"/>
  361. </taskdef>
  362. <schema destdir="${project.build.directory}/generated-test-sources/java">
  363. <fileset dir="${basedir}/src/test">
  364. <include name="**/*.avpr"/>
  365. </fileset>
  366. </schema>
  367. </target>
  368. </configuration>
  369. </execution>
  370. <execution>
  371. <id>create-log-dir</id>
  372. <phase>process-test-resources</phase>
  373. <goals>
  374. <goal>run</goal>
  375. </goals>
  376. <configuration>
  377. <target>
  378. <!--
  379. TODO: there are tests (TestLocalFileSystem#testCopy) that fail if data
  380. TODO: from a previous run is present
  381. -->
  382. <delete 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. </executions>
  391. </plugin>
  392. <plugin>
  393. <groupId>org.codehaus.mojo</groupId>
  394. <artifactId>build-helper-maven-plugin</artifactId>
  395. <executions>
  396. <execution>
  397. <id>add-source</id>
  398. <phase>generate-sources</phase>
  399. <goals>
  400. <goal>add-source</goal>
  401. </goals>
  402. <configuration>
  403. <sources>
  404. <source>${project.build.directory}/generated-sources/java</source>
  405. </sources>
  406. </configuration>
  407. </execution>
  408. <execution>
  409. <id>add-test-source</id>
  410. <phase>generate-test-sources</phase>
  411. <goals>
  412. <goal>add-test-source</goal>
  413. </goals>
  414. <configuration>
  415. <sources>
  416. <source>${project.build.directory}/generated-test-sources/java</source>
  417. </sources>
  418. </configuration>
  419. </execution>
  420. </executions>
  421. </plugin>
  422. <plugin>
  423. <groupId>org.apache.maven.plugins</groupId>
  424. <artifactId>maven-checkstyle-plugin</artifactId>
  425. <configuration>
  426. <configLocation>file://${basedir}/dev-support/checkstyle.xml</configLocation>
  427. <failOnViolation>false</failOnViolation>
  428. <format>xml</format>
  429. <format>html</format>
  430. <outputFile>${project.build.directory}/test/checkstyle-errors.xml</outputFile>
  431. </configuration>
  432. </plugin>
  433. <plugin>
  434. <groupId>org.apache.rat</groupId>
  435. <artifactId>apache-rat-plugin</artifactId>
  436. <configuration>
  437. <excludes>
  438. <exclude>CHANGES.txt</exclude>
  439. <exclude>.idea/**</exclude>
  440. <exclude>src/main/conf/*</exclude>
  441. <exclude>src/main/docs/**</exclude>
  442. <exclude>dev-support/jdiff/**</exclude>
  443. <exclude>src/main/native/*</exclude>
  444. <exclude>src/main/native/config/*</exclude>
  445. <exclude>src/main/resources/META-INF/services/org.apache.hadoop.security.SecurityInfo</exclude>
  446. <exclude>src/main/native/m4/*</exclude>
  447. <exclude>src/test/empty-file</exclude>
  448. <exclude>src/test/all-tests</exclude>
  449. </excludes>
  450. </configuration>
  451. </plugin>
  452. <plugin>
  453. <groupId>org.apache.maven.plugins</groupId>
  454. <artifactId>maven-javadoc-plugin</artifactId>
  455. <configuration>
  456. <linksource>true</linksource>
  457. <quiet>true</quiet>
  458. <verbose>false</verbose>
  459. <source>${maven.compile.source}</source>
  460. <charset>${maven.compile.encoding}</charset>
  461. <reportOutputDirectory>${project.build.directory}/site</reportOutputDirectory>
  462. <destDir>api</destDir>
  463. <groups>
  464. <group>
  465. <title>${project.name} API</title>
  466. <packages>org.apache.hadoop*</packages>
  467. </group>
  468. </groups>
  469. <doclet>org.apache.hadoop.classification.tools.ExcludePrivateAnnotationsStandardDoclet</doclet>
  470. <docletArtifacts>
  471. <docletArtifact>
  472. <groupId>org.apache.hadoop</groupId>
  473. <artifactId>hadoop-annotations</artifactId>
  474. <version>${project.version}</version>
  475. </docletArtifact>
  476. </docletArtifacts>
  477. <useStandardDocletOptions>true</useStandardDocletOptions>
  478. <!-- switch on dependency-driven aggregation -->
  479. <includeDependencySources>true</includeDependencySources>
  480. <dependencySourceIncludes>
  481. <!-- include ONLY dependencies I control -->
  482. <dependencySourceInclude>org.apache.hadoop:hadoop-annotations</dependencySourceInclude>
  483. </dependencySourceIncludes>
  484. </configuration>
  485. </plugin>
  486. </plugins>
  487. </build>
  488. <profiles>
  489. <profile>
  490. <id>native</id>
  491. <activation>
  492. <activeByDefault>false</activeByDefault>
  493. </activation>
  494. <properties>
  495. <snappy.prefix>/usr/local</snappy.prefix>
  496. <snappy.lib>${snappy.prefix}/lib</snappy.lib>
  497. <snappy.include>${snappy.prefix}/include</snappy.include>
  498. </properties>
  499. <build>
  500. <plugins>
  501. <plugin>
  502. <groupId>org.apache.maven.plugins</groupId>
  503. <artifactId>maven-antrun-plugin</artifactId>
  504. <executions>
  505. <execution>
  506. <id>compile</id>
  507. <phase>compile</phase>
  508. <goals>
  509. <goal>run</goal>
  510. </goals>
  511. <configuration>
  512. <target>
  513. <mkdir dir="${project.build.directory}/native/javah"/>
  514. <copy toDir="${project.build.directory}/native">
  515. <fileset dir="${basedir}/src/main/native"/>
  516. </copy>
  517. <mkdir dir="${project.build.directory}/native/m4"/>
  518. </target>
  519. </configuration>
  520. </execution>
  521. </executions>
  522. </plugin>
  523. <plugin>
  524. <groupId>org.codehaus.mojo</groupId>
  525. <artifactId>native-maven-plugin</artifactId>
  526. <executions>
  527. <execution>
  528. <phase>compile</phase>
  529. <goals>
  530. <goal>javah</goal>
  531. </goals>
  532. <configuration>
  533. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  534. <javahClassNames>
  535. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  536. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  537. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  538. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  539. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  540. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  541. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  542. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  543. </javahClassNames>
  544. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  545. </configuration>
  546. </execution>
  547. </executions>
  548. </plugin>
  549. <plugin>
  550. <groupId>org.codehaus.mojo</groupId>
  551. <artifactId>make-maven-plugin</artifactId>
  552. <executions>
  553. <execution>
  554. <id>compile</id>
  555. <phase>compile</phase>
  556. <goals>
  557. <goal>autoreconf</goal>
  558. <goal>configure</goal>
  559. <goal>make-install</goal>
  560. </goals>
  561. </execution>
  562. </executions>
  563. <configuration>
  564. <!-- autoreconf settings -->
  565. <workDir>${project.build.directory}/native</workDir>
  566. <arguments>
  567. <argument>-i</argument>
  568. <argument>-f</argument>
  569. </arguments>
  570. <!-- configure settings -->
  571. <configureEnvironment>
  572. <property>
  573. <name>OS_NAME</name>
  574. <value>${os.name}</value>
  575. </property>
  576. <property>
  577. <name>OS_ARCH</name>
  578. <value>${os.arch}</value>
  579. </property>
  580. <property>
  581. <name>JVM_DATA_MODEL</name>
  582. <value>${sun.arch.data.model}</value>
  583. </property>
  584. </configureEnvironment>
  585. <configureOptions>
  586. <configureOption>CPPFLAGS=-I${snappy.include}</configureOption>
  587. <configureOption>LDFLAGS=-L${snappy.lib}</configureOption>
  588. </configureOptions>
  589. <configureWorkDir>${project.build.directory}/native</configureWorkDir>
  590. <prefix>/usr/local</prefix>
  591. <!-- make settings -->
  592. <installEnvironment>
  593. <property>
  594. <name>OS_NAME</name>
  595. <value>${os.name}</value>
  596. </property>
  597. <property>
  598. <name>OS_ARCH</name>
  599. <value>${os.arch}</value>
  600. </property>
  601. <property>
  602. <name>JVM_DATA_MODEL</name>
  603. <value>${sun.arch.data.model}</value>
  604. </property>
  605. <property>
  606. <name>HADOOP_NATIVE_SRCDIR</name>
  607. <value>${project.build.directory}/native</value>
  608. </property>
  609. </installEnvironment>
  610. <!-- configure & make settings -->
  611. <destDir>${project.build.directory}/native/target</destDir>
  612. </configuration>
  613. </plugin>
  614. </plugins>
  615. </build>
  616. </profile>
  617. <profile>
  618. <id>docs</id>
  619. <activation>
  620. <activeByDefault>false</activeByDefault>
  621. </activation>
  622. <properties>
  623. <jdiff.stable.api>0.20.2</jdiff.stable.api>
  624. <jdiff.stability>-unstable</jdiff.stability>
  625. <jdiff.compatibility></jdiff.compatibility>
  626. <jdiff.javadoc.maxmemory>512m</jdiff.javadoc.maxmemory>
  627. </properties>
  628. <build>
  629. <plugins>
  630. <plugin>
  631. <groupId>org.apache.maven.plugins</groupId>
  632. <artifactId>maven-javadoc-plugin</artifactId>
  633. <executions>
  634. <execution>
  635. <goals>
  636. <goal>javadoc</goal>
  637. </goals>
  638. <phase>prepare-package</phase>
  639. </execution>
  640. </executions>
  641. </plugin>
  642. <plugin>
  643. <groupId>org.codehaus.mojo</groupId>
  644. <artifactId>findbugs-maven-plugin</artifactId>
  645. <executions>
  646. <execution>
  647. <goals>
  648. <goal>findbugs</goal>
  649. </goals>
  650. <phase>prepare-package</phase>
  651. </execution>
  652. </executions>
  653. <configuration>
  654. <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
  655. </configuration>
  656. </plugin>
  657. <plugin>
  658. <groupId>org.apache.maven.plugins</groupId>
  659. <artifactId>maven-dependency-plugin</artifactId>
  660. <executions>
  661. <execution>
  662. <id>site</id>
  663. <phase>prepare-package</phase>
  664. <goals>
  665. <goal>copy</goal>
  666. </goals>
  667. <configuration>
  668. <artifactItems>
  669. <artifactItem>
  670. <groupId>jdiff</groupId>
  671. <artifactId>jdiff</artifactId>
  672. <version>${jdiff.version}</version>
  673. <overWrite>false</overWrite>
  674. <outputDirectory>${project.build.directory}</outputDirectory>
  675. <destFileName>jdiff.jar</destFileName>
  676. </artifactItem>
  677. <artifactItem>
  678. <groupId>org.apache.hadoop</groupId>
  679. <artifactId>hadoop-annotations</artifactId>
  680. <version>${hadoop.annotations.version}</version>
  681. <overWrite>false</overWrite>
  682. <outputDirectory>${project.build.directory}</outputDirectory>
  683. <destFileName>hadoop-annotations.jar</destFileName>
  684. </artifactItem>
  685. </artifactItems>
  686. </configuration>
  687. </execution>
  688. </executions>
  689. </plugin>
  690. <plugin>
  691. <groupId>org.apache.maven.plugins</groupId>
  692. <artifactId>maven-antrun-plugin</artifactId>
  693. <executions>
  694. <execution>
  695. <id>site</id>
  696. <phase>prepare-package</phase>
  697. <goals>
  698. <goal>run</goal>
  699. </goals>
  700. <configuration>
  701. <target>
  702. <mkdir dir="${project.build.directory}/docs-src"/>
  703. <copy todir="${project.build.directory}/docs-src">
  704. <fileset dir="${basedir}/src/main/docs"/>
  705. </copy>
  706. <!-- Docs -->
  707. <exec dir="${project.build.directory}/docs-src"
  708. executable="${env.FORREST_HOME}/bin/forrest"
  709. failonerror="true">
  710. </exec>
  711. <copy todir="${project.build.directory}/site">
  712. <fileset dir="${project.build.directory}/docs-src/build/site"/>
  713. </copy>
  714. <copy file="${project.build.directory}/docs-src/releasenotes.html"
  715. todir="${project.build.directory}/site"/>
  716. <style basedir="${basedir}/src/main/resources"
  717. destdir="${project.build.directory}/site"
  718. includes="core-default.xml"
  719. style="${basedir}/src/main/xsl/configuration.xsl"/>
  720. <!-- Convert 'CHANGES.txt' to 'changes.html" -->
  721. <exec executable="perl" input="${basedir}/../CHANGES.txt"
  722. output="${project.build.directory}/site/changes.html"
  723. failonerror="true">
  724. <arg value="${project.build.directory}/docs-src/changes/changes2html.pl"/>
  725. </exec>
  726. <copy todir="${project.build.directory}/site">
  727. <fileset dir="${project.build.directory}/docs-src/changes" includes="*.css"/>
  728. </copy>
  729. <!-- Jdiff -->
  730. <mkdir dir="${project.build.directory}/site/jdiff/xml"/>
  731. <javadoc maxmemory="${jdiff.javadoc.maxmemory}" verbose="yes">
  732. <doclet name="org.apache.hadoop.classification.tools.ExcludePrivateAnnotationsJDiffDoclet"
  733. path="${project.build.directory}/hadoop-annotations.jar:${project.build.directory}/jdiff.jar">
  734. <param name="-apidir" value="${project.build.directory}/site/jdiff/xml"/>
  735. <param name="-apiname" value="hadoop-core ${project.version}"/>
  736. <param name="${jdiff.stability}"/>
  737. </doclet>
  738. <packageset dir="${basedir}/src/main/java"/>
  739. <classpath>
  740. <path refid="maven.compile.classpath"/>
  741. </classpath>
  742. </javadoc>
  743. <javadoc sourcepath="${basedir}/src/main/java"
  744. destdir="${project.build.directory}/site/jdiff/xml"
  745. sourceFiles="${basedir}/dev-support/jdiff/Null.java"
  746. maxmemory="${jdiff.javadoc.maxmemory}">
  747. <doclet name="org.apache.hadoop.classification.tools.ExcludePrivateAnnotationsJDiffDoclet"
  748. path="${project.build.directory}/hadoop-annotations.jar:${project.build.directory}/jdiff.jar">
  749. <param name="-oldapi" value="hadoop-core ${jdiff.stable.api}"/>
  750. <param name="-newapi" value="hadoop-core ${project.version}"/>
  751. <param name="-oldapidir" value="${basedir}/dev-support/jdiff"/>
  752. <param name="-newapidir" value="${project.build.directory}/site/jdiff/xml"/>
  753. <param name="-javadocold"
  754. value="http://hadoop.apache.org/docs/${jdiff.stable.api}/api/"/>
  755. <param name="-javadocnew" value="${project.build.directory}/site/api"/>
  756. <param name="-stats"/>
  757. <param name="${jdiff.stability}"/>
  758. <param name="${jdiff.compatibility}"/>
  759. </doclet>
  760. <classpath>
  761. <path refid="maven.compile.classpath"/>
  762. </classpath>
  763. </javadoc>
  764. <xslt style="${env.FINDBUGS_HOME}/src/xsl/default.xsl"
  765. in="${project.build.directory}/findbugsXml.xml"
  766. out="${project.build.directory}/site/findbugs.html"/>
  767. </target>
  768. </configuration>
  769. </execution>
  770. </executions>
  771. </plugin>
  772. </plugins>
  773. </build>
  774. </profile>
  775. <profile>
  776. <id>src</id>
  777. <activation>
  778. <activeByDefault>false</activeByDefault>
  779. </activation>
  780. <build>
  781. <plugins>
  782. <plugin>
  783. <groupId>org.apache.maven.plugins</groupId>
  784. <artifactId>maven-assembly-plugin</artifactId>
  785. <dependencies>
  786. <dependency>
  787. <groupId>org.apache.hadoop</groupId>
  788. <artifactId>hadoop-assemblies</artifactId>
  789. <version>${hadoop.assemblies.version}</version>
  790. </dependency>
  791. </dependencies>
  792. <executions>
  793. <execution>
  794. <id>pre-tar-src</id>
  795. <phase>prepare-package</phase>
  796. <goals>
  797. <goal>single</goal>
  798. </goals>
  799. <configuration>
  800. <appendAssemblyId>false</appendAssemblyId>
  801. <attach>false</attach>
  802. <finalName>${project.artifactId}-${project.version}</finalName>
  803. <descriptorRefs>
  804. <descriptorRef>hadoop-src</descriptorRef>
  805. </descriptorRefs>
  806. </configuration>
  807. </execution>
  808. </executions>
  809. </plugin>
  810. </plugins>
  811. </build>
  812. </profile>
  813. <profile>
  814. <id>tar</id>
  815. <activation>
  816. <activeByDefault>false</activeByDefault>
  817. </activation>
  818. <build>
  819. <plugins>
  820. <plugin>
  821. <groupId>org.apache.maven.plugins</groupId>
  822. <artifactId>maven-antrun-plugin</artifactId>
  823. <executions>
  824. <execution>
  825. <id>pre-tar</id>
  826. <phase>prepare-package</phase>
  827. <goals>
  828. <goal>run</goal>
  829. </goals>
  830. <configuration>
  831. <target>
  832. <!-- Using Unix script to preserve symlinks -->
  833. <echo file="${project.build.directory}/tar-copynativelibs.sh">
  834. which cygpath 2> /dev/null
  835. if [ $? = 1 ]; then
  836. BUILD_DIR="${project.build.directory}"
  837. else
  838. BUILD_DIR=`cygpath --unix '${project.build.directory}'`
  839. fi
  840. TAR='tar cf -'
  841. UNTAR='tar xfBp -'
  842. LIB_DIR="${BUILD_DIR}/native/target/usr/local/lib"
  843. if [ -d $${LIB_DIR} ] ; then
  844. TARGET_DIR="${BUILD_DIR}/${project.artifactId}-${project.version}/lib/native/${build.platform}"
  845. mkdir -p $${TARGET_DIR}
  846. cd $${LIB_DIR}
  847. $$TAR *hadoop* | (cd $${TARGET_DIR}/; $$UNTAR)
  848. if [ "${bundle.snappy}" = "true" ] ; then
  849. cd ${snappy.lib}
  850. $$TAR *snappy* | (cd $${TARGET_DIR}/; $$UNTAR)
  851. fi
  852. fi
  853. </echo>
  854. <exec executable="sh" dir="${project.build.directory}" failonerror="true">
  855. <arg line="./tar-copynativelibs.sh"/>
  856. </exec>
  857. </target>
  858. </configuration>
  859. </execution>
  860. <execution>
  861. <id>tar</id>
  862. <phase>package</phase>
  863. <goals>
  864. <goal>run</goal>
  865. </goals>
  866. <configuration>
  867. <target>
  868. <!-- Using Unix script to preserve symlinks -->
  869. <echo file="${project.build.directory}/tar-maketar.sh">
  870. which cygpath 2> /dev/null
  871. if [ $? = 1 ]; then
  872. BUILD_DIR="${project.build.directory}"
  873. else
  874. BUILD_DIR=`cygpath --unix '${project.build.directory}'`
  875. fi
  876. cd ${BUILD_DIR}
  877. tar czf ${project.artifactId}-${project.version}.tar.gz ${project.artifactId}-${project.version}
  878. </echo>
  879. <exec executable="sh" dir="${project.build.directory}" failonerror="true">
  880. <arg line="./tar-maketar.sh"/>
  881. </exec>
  882. </target>
  883. </configuration>
  884. </execution>
  885. </executions>
  886. </plugin>
  887. <plugin>
  888. <groupId>org.apache.maven.plugins</groupId>
  889. <artifactId>maven-assembly-plugin</artifactId>
  890. <dependencies>
  891. <dependency>
  892. <groupId>org.apache.hadoop</groupId>
  893. <artifactId>hadoop-assemblies</artifactId>
  894. <version>${hadoop.assemblies.version}</version>
  895. </dependency>
  896. </dependencies>
  897. <executions>
  898. <execution>
  899. <id>pre-tar</id>
  900. <phase>prepare-package</phase>
  901. <goals>
  902. <goal>single</goal>
  903. </goals>
  904. <configuration>
  905. <appendAssemblyId>false</appendAssemblyId>
  906. <attach>false</attach>
  907. <finalName>${project.artifactId}-${project.version}</finalName>
  908. <descriptorRefs>
  909. <descriptorRef>hadoop-tar</descriptorRef>
  910. </descriptorRefs>
  911. </configuration>
  912. </execution>
  913. </executions>
  914. </plugin>
  915. </plugins>
  916. </build>
  917. </profile>
  918. <profile>
  919. <id>bintar</id>
  920. <activation>
  921. <activeByDefault>false</activeByDefault>
  922. </activation>
  923. <build>
  924. <plugins>
  925. <plugin>
  926. <groupId>org.apache.maven.plugins</groupId>
  927. <artifactId>maven-antrun-plugin</artifactId>
  928. <executions>
  929. <execution>
  930. <id>pre-bintar</id>
  931. <phase>prepare-package</phase>
  932. <goals>
  933. <goal>run</goal>
  934. </goals>
  935. <configuration>
  936. <target>
  937. <!-- Using Unix script to preserve symlinks -->
  938. <echo file="${project.build.directory}/bintar-copynativelibs.sh">
  939. which cygpath 2> /dev/null
  940. if [ $? = 1 ]; then
  941. BUILD_DIR="${project.build.directory}"
  942. else
  943. BUILD_DIR=`cygpath --unix '${project.build.directory}'`
  944. fi
  945. TAR='tar cf -'
  946. UNTAR='tar xfBp -'
  947. LIB_DIR="${BUILD_DIR}/native/target/usr/local/lib"
  948. if [ -d $${LIB_DIR} ] ; then
  949. TARGET_DIR="${BUILD_DIR}/${project.artifactId}-${project.version}-bin/lib"
  950. mkdir -p $${TARGET_DIR}
  951. cd $${LIB_DIR}
  952. $$TAR *hadoop* | (cd $${TARGET_DIR}/; $$UNTAR)
  953. if [ "${bundle.snappy}" = "true" ] ; then
  954. cd ${snappy.lib}
  955. $$TAR *snappy* | (cd $${TARGET_DIR}/; $$UNTAR)
  956. fi
  957. fi
  958. </echo>
  959. <exec executable="sh" dir="${project.build.directory}" failonerror="true">
  960. <arg line="./bintar-copynativelibs.sh"/>
  961. </exec>
  962. </target>
  963. </configuration>
  964. </execution>
  965. <execution>
  966. <id>bintar</id>
  967. <phase>package</phase>
  968. <goals>
  969. <goal>run</goal>
  970. </goals>
  971. <configuration>
  972. <target>
  973. <!-- Using Unix script to preserve symlinks -->
  974. <echo file="${project.build.directory}/bintar-maketar.sh">
  975. which cygpath 2> /dev/null
  976. if [ $? = 1 ]; then
  977. BUILD_DIR="${project.build.directory}"
  978. else
  979. BUILD_DIR=`cygpath --unix '${project.build.directory}'`
  980. fi
  981. cd ${BUILD_DIR}
  982. tar czf ${project.artifactId}-${project.version}-bin.tar.gz ${project.artifactId}-${project.version}-bin
  983. </echo>
  984. <exec executable="sh" dir="${project.build.directory}" failonerror="true">
  985. <arg line="./bintar-maketar.sh"/>
  986. </exec>
  987. </target>
  988. </configuration>
  989. </execution>
  990. </executions>
  991. </plugin>
  992. <plugin>
  993. <groupId>org.apache.maven.plugins</groupId>
  994. <artifactId>maven-assembly-plugin</artifactId>
  995. <dependencies>
  996. <dependency>
  997. <groupId>org.apache.hadoop</groupId>
  998. <artifactId>hadoop-assemblies</artifactId>
  999. <version>${hadoop.assemblies.version}</version>
  1000. </dependency>
  1001. </dependencies>
  1002. <executions>
  1003. <execution>
  1004. <id>pre-bintar</id>
  1005. <phase>prepare-package</phase>
  1006. <goals>
  1007. <goal>single</goal>
  1008. </goals>
  1009. <configuration>
  1010. <appendAssemblyId>false</appendAssemblyId>
  1011. <attach>false</attach>
  1012. <finalName>${project.artifactId}-${project.version}-bin</finalName>
  1013. <descriptorRefs>
  1014. <descriptorRef>hadoop-bintar</descriptorRef>
  1015. </descriptorRefs>
  1016. </configuration>
  1017. </execution>
  1018. </executions>
  1019. </plugin>
  1020. </plugins>
  1021. </build>
  1022. </profile>
  1023. </profiles>
  1024. </project>