pom.xml 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License. See accompanying LICENSE file.
  12. -->
  13. <project xmlns="http://maven.apache.org/POM/4.0.0"
  14. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  15. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
  16. https://maven.apache.org/xsd/maven-4.0.0.xsd">
  17. <modelVersion>4.0.0</modelVersion>
  18. <parent>
  19. <groupId>org.apache.hadoop</groupId>
  20. <artifactId>hadoop-project-dist</artifactId>
  21. <version>2.9.3-SNAPSHOT</version>
  22. <relativePath>../../hadoop-project-dist</relativePath>
  23. </parent>
  24. <groupId>org.apache.hadoop</groupId>
  25. <artifactId>hadoop-common</artifactId>
  26. <version>2.9.3-SNAPSHOT</version>
  27. <description>Apache Hadoop Common</description>
  28. <name>Apache Hadoop Common</name>
  29. <packaging>jar</packaging>
  30. <properties>
  31. <hadoop.component>common</hadoop.component>
  32. <is.hadoop.component>true</is.hadoop.component>
  33. <is.hadoop.common.component>true</is.hadoop.common.component>
  34. <wsce.config.dir>../etc/hadoop</wsce.config.dir>
  35. <wsce.config.file>wsce-site.xml</wsce.config.file>
  36. </properties>
  37. <dependencies>
  38. <dependency>
  39. <groupId>org.apache.hadoop</groupId>
  40. <artifactId>hadoop-annotations</artifactId>
  41. <scope>compile</scope>
  42. </dependency>
  43. <dependency>
  44. <groupId>com.google.guava</groupId>
  45. <artifactId>guava</artifactId>
  46. <scope>compile</scope>
  47. </dependency>
  48. <dependency>
  49. <groupId>commons-cli</groupId>
  50. <artifactId>commons-cli</artifactId>
  51. <scope>compile</scope>
  52. </dependency>
  53. <dependency>
  54. <groupId>org.apache.commons</groupId>
  55. <artifactId>commons-math3</artifactId>
  56. <scope>compile</scope>
  57. </dependency>
  58. <dependency>
  59. <groupId>xmlenc</groupId>
  60. <artifactId>xmlenc</artifactId>
  61. <scope>compile</scope>
  62. </dependency>
  63. <dependency>
  64. <groupId>org.apache.httpcomponents</groupId>
  65. <artifactId>httpclient</artifactId>
  66. <scope>compile</scope>
  67. </dependency>
  68. <dependency>
  69. <groupId>commons-codec</groupId>
  70. <artifactId>commons-codec</artifactId>
  71. <scope>compile</scope>
  72. </dependency>
  73. <dependency>
  74. <groupId>commons-io</groupId>
  75. <artifactId>commons-io</artifactId>
  76. <scope>compile</scope>
  77. </dependency>
  78. <dependency>
  79. <groupId>commons-net</groupId>
  80. <artifactId>commons-net</artifactId>
  81. <scope>compile</scope>
  82. </dependency>
  83. <dependency>
  84. <groupId>commons-collections</groupId>
  85. <artifactId>commons-collections</artifactId>
  86. <scope>compile</scope>
  87. </dependency>
  88. <dependency>
  89. <groupId>javax.servlet</groupId>
  90. <artifactId>servlet-api</artifactId>
  91. <scope>compile</scope>
  92. </dependency>
  93. <dependency>
  94. <groupId>org.mortbay.jetty</groupId>
  95. <artifactId>jetty</artifactId>
  96. <scope>compile</scope>
  97. </dependency>
  98. <dependency>
  99. <groupId>org.mortbay.jetty</groupId>
  100. <artifactId>jetty-util</artifactId>
  101. <scope>compile</scope>
  102. </dependency>
  103. <dependency>
  104. <groupId>org.mortbay.jetty</groupId>
  105. <artifactId>jetty-sslengine</artifactId>
  106. <scope>compile</scope>
  107. </dependency>
  108. <dependency>
  109. <groupId>javax.servlet.jsp</groupId>
  110. <artifactId>jsp-api</artifactId>
  111. <scope>runtime</scope>
  112. </dependency>
  113. <dependency>
  114. <groupId>com.sun.jersey</groupId>
  115. <artifactId>jersey-core</artifactId>
  116. <scope>compile</scope>
  117. </dependency>
  118. <dependency>
  119. <!-- Used, even though 'mvn dependency:analyze' doesn't find it -->
  120. <groupId>com.sun.jersey</groupId>
  121. <artifactId>jersey-json</artifactId>
  122. <scope>compile</scope>
  123. </dependency>
  124. <dependency>
  125. <groupId>com.sun.jersey</groupId>
  126. <artifactId>jersey-server</artifactId>
  127. <scope>compile</scope>
  128. </dependency>
  129. <dependency>
  130. <groupId>commons-logging</groupId>
  131. <artifactId>commons-logging</artifactId>
  132. <scope>compile</scope>
  133. </dependency>
  134. <dependency>
  135. <groupId>log4j</groupId>
  136. <artifactId>log4j</artifactId>
  137. <scope>compile</scope>
  138. </dependency>
  139. <dependency>
  140. <groupId>net.java.dev.jets3t</groupId>
  141. <artifactId>jets3t</artifactId>
  142. <scope>compile</scope>
  143. </dependency>
  144. <dependency>
  145. <groupId>junit</groupId>
  146. <artifactId>junit</artifactId>
  147. <scope>test</scope>
  148. </dependency>
  149. <dependency>
  150. <groupId>commons-lang</groupId>
  151. <artifactId>commons-lang</artifactId>
  152. <scope>compile</scope>
  153. </dependency>
  154. <dependency>
  155. <groupId>commons-configuration</groupId>
  156. <artifactId>commons-configuration</artifactId>
  157. <scope>compile</scope>
  158. </dependency>
  159. <dependency>
  160. <groupId>org.apache.commons</groupId>
  161. <artifactId>commons-lang3</artifactId>
  162. <scope>compile</scope>
  163. </dependency>
  164. <dependency>
  165. <groupId>org.slf4j</groupId>
  166. <artifactId>slf4j-api</artifactId>
  167. <scope>compile</scope>
  168. </dependency>
  169. <dependency>
  170. <groupId>org.slf4j</groupId>
  171. <artifactId>slf4j-log4j12</artifactId>
  172. <scope>compile</scope>
  173. </dependency>
  174. <dependency>
  175. <groupId>org.codehaus.jackson</groupId>
  176. <artifactId>jackson-core-asl</artifactId>
  177. <scope>compile</scope>
  178. </dependency>
  179. <dependency>
  180. <groupId>org.codehaus.jackson</groupId>
  181. <artifactId>jackson-mapper-asl</artifactId>
  182. <scope>compile</scope>
  183. </dependency>
  184. <dependency>
  185. <groupId>org.mockito</groupId>
  186. <artifactId>mockito-all</artifactId>
  187. <scope>test</scope>
  188. </dependency>
  189. <dependency>
  190. <groupId>org.apache.avro</groupId>
  191. <artifactId>avro</artifactId>
  192. <scope>compile</scope>
  193. </dependency>
  194. <dependency>
  195. <groupId>org.apache.ant</groupId>
  196. <artifactId>ant</artifactId>
  197. <scope>provided</scope>
  198. </dependency>
  199. <dependency>
  200. <groupId>com.google.protobuf</groupId>
  201. <artifactId>protobuf-java</artifactId>
  202. <scope>compile</scope>
  203. </dependency>
  204. <dependency>
  205. <groupId>com.google.code.gson</groupId>
  206. <artifactId>gson</artifactId>
  207. </dependency>
  208. <dependency>
  209. <groupId>org.apache.hadoop</groupId>
  210. <artifactId>hadoop-auth</artifactId>
  211. <scope>compile</scope>
  212. </dependency>
  213. <dependency>
  214. <groupId>org.apache.hadoop</groupId>
  215. <artifactId>hadoop-auth</artifactId>
  216. <type>test-jar</type>
  217. <scope>test</scope>
  218. </dependency>
  219. <dependency>
  220. <groupId>org.apache.hadoop</groupId>
  221. <artifactId>hadoop-minikdc</artifactId>
  222. <scope>test</scope>
  223. </dependency>
  224. <dependency>
  225. <groupId>com.jcraft</groupId>
  226. <artifactId>jsch</artifactId>
  227. </dependency>
  228. <dependency>
  229. <groupId>org.apache.curator</groupId>
  230. <artifactId>curator-test</artifactId>
  231. <scope>test</scope>
  232. </dependency>
  233. <dependency>
  234. <groupId>org.apache.curator</groupId>
  235. <artifactId>curator-client</artifactId>
  236. </dependency>
  237. <dependency>
  238. <groupId>org.apache.curator</groupId>
  239. <artifactId>curator-recipes</artifactId>
  240. </dependency>
  241. <dependency>
  242. <groupId>com.google.code.findbugs</groupId>
  243. <artifactId>jsr305</artifactId>
  244. <scope>compile</scope>
  245. </dependency>
  246. <dependency>
  247. <groupId>org.apache.sshd</groupId>
  248. <artifactId>sshd-core</artifactId>
  249. <scope>test</scope>
  250. </dependency>
  251. <dependency>
  252. <groupId>org.apache.htrace</groupId>
  253. <artifactId>htrace-core4</artifactId>
  254. </dependency>
  255. <dependency>
  256. <groupId>org.apache.zookeeper</groupId>
  257. <artifactId>zookeeper</artifactId>
  258. <exclusions>
  259. <exclusion>
  260. <groupId>jline</groupId>
  261. <artifactId>jline</artifactId>
  262. </exclusion>
  263. <exclusion>
  264. <groupId>org.jboss.netty</groupId>
  265. <artifactId>netty</artifactId>
  266. </exclusion>
  267. <exclusion>
  268. <!-- otherwise seems to drag in junit 3.8.1 via jline -->
  269. <groupId>junit</groupId>
  270. <artifactId>junit</artifactId>
  271. </exclusion>
  272. <exclusion>
  273. <groupId>com.sun.jdmk</groupId>
  274. <artifactId>jmxtools</artifactId>
  275. </exclusion>
  276. <exclusion>
  277. <groupId>com.sun.jmx</groupId>
  278. <artifactId>jmxri</artifactId>
  279. </exclusion>
  280. </exclusions>
  281. </dependency>
  282. <dependency>
  283. <groupId>org.apache.zookeeper</groupId>
  284. <artifactId>zookeeper</artifactId>
  285. <type>test-jar</type>
  286. <scope>test</scope>
  287. </dependency>
  288. <dependency>
  289. <groupId>org.apache.commons</groupId>
  290. <artifactId>commons-compress</artifactId>
  291. </dependency>
  292. <dependency>
  293. <groupId>org.bouncycastle</groupId>
  294. <artifactId>bcprov-jdk16</artifactId>
  295. <scope>test</scope>
  296. </dependency>
  297. <dependency>
  298. <groupId>org.codehaus.woodstox</groupId>
  299. <artifactId>stax2-api</artifactId>
  300. <scope>compile</scope>
  301. </dependency>
  302. <dependency>
  303. <groupId>com.fasterxml.woodstox</groupId>
  304. <artifactId>woodstox-core</artifactId>
  305. <scope>compile</scope>
  306. </dependency>
  307. <dependency>
  308. <groupId>com.squareup.okhttp3</groupId>
  309. <artifactId>mockwebserver</artifactId>
  310. <scope>test</scope>
  311. </dependency>
  312. </dependencies>
  313. <build>
  314. <!--
  315. Include all files in src/main/resources. By default, do not apply property
  316. substitution (filtering=false), but do apply property substitution to
  317. common-version-info.properties (filtering=true). This will substitute the
  318. version information correctly, but prevent Maven from altering other files
  319. like core-default.xml.
  320. -->
  321. <resources>
  322. <resource>
  323. <directory>${basedir}/src/main/resources</directory>
  324. <excludes>
  325. <exclude>common-version-info.properties</exclude>
  326. </excludes>
  327. <filtering>false</filtering>
  328. </resource>
  329. <resource>
  330. <directory>${basedir}/src/main/resources</directory>
  331. <includes>
  332. <include>common-version-info.properties</include>
  333. </includes>
  334. <filtering>true</filtering>
  335. </resource>
  336. </resources>
  337. <plugins>
  338. <plugin>
  339. <groupId>org.xolstice.maven.plugins</groupId>
  340. <artifactId>protobuf-maven-plugin</artifactId>
  341. <executions>
  342. <execution>
  343. <id>src-compile-protoc</id>
  344. <configuration><skip>false</skip></configuration>
  345. </execution>
  346. <execution>
  347. <id>src-test-compile-protoc</id>
  348. <configuration><skip>false</skip></configuration>
  349. </execution>
  350. </executions>
  351. </plugin>
  352. <plugin>
  353. <groupId>org.apache.hadoop</groupId>
  354. <artifactId>hadoop-maven-plugins</artifactId>
  355. <executions>
  356. <execution>
  357. <id>version-info</id>
  358. <phase>generate-resources</phase>
  359. <goals>
  360. <goal>version-info</goal>
  361. </goals>
  362. <configuration>
  363. <source>
  364. <directory>${basedir}/src/main</directory>
  365. <includes>
  366. <include>java/**/*.java</include>
  367. <include>proto/**/*.proto</include>
  368. </includes>
  369. </source>
  370. </configuration>
  371. </execution>
  372. </executions>
  373. </plugin>
  374. <plugin>
  375. <groupId>org.apache.maven.plugins</groupId>
  376. <artifactId>maven-surefire-plugin</artifactId>
  377. <configuration>
  378. <systemPropertyVariables>
  379. <startKdc>${startKdc}</startKdc>
  380. <kdc.resource.dir>${kdc.resource.dir}</kdc.resource.dir>
  381. <runningWithNative>${runningWithNative}</runningWithNative>
  382. </systemPropertyVariables>
  383. <properties>
  384. <property>
  385. <name>listener</name>
  386. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  387. </property>
  388. </properties>
  389. </configuration>
  390. </plugin>
  391. <plugin>
  392. <groupId>org.apache.avro</groupId>
  393. <artifactId>avro-maven-plugin</artifactId>
  394. <executions>
  395. <execution>
  396. <id>generate-avro-test-sources</id>
  397. <phase>generate-test-sources</phase>
  398. <goals>
  399. <goal>schema</goal>
  400. </goals>
  401. </execution>
  402. </executions>
  403. <configuration>
  404. <testOutputDirectory>${project.build.directory}/generated-test-sources/java</testOutputDirectory>
  405. </configuration>
  406. </plugin>
  407. <plugin>
  408. <groupId>org.apache.maven.plugins</groupId>
  409. <artifactId>maven-antrun-plugin</artifactId>
  410. <executions>
  411. <execution>
  412. <id>create-log-dir</id>
  413. <phase>process-test-resources</phase>
  414. <goals>
  415. <goal>run</goal>
  416. </goals>
  417. <configuration>
  418. <target>
  419. <!--
  420. TODO: there are tests (TestLocalFileSystem#testCopy) that fail if data
  421. TODO: from a previous run is present
  422. -->
  423. <delete dir="${test.build.data}"/>
  424. <mkdir dir="${test.build.data}"/>
  425. <mkdir dir="${hadoop.log.dir}"/>
  426. <copy toDir="${project.build.directory}/test-classes">
  427. <fileset dir="${basedir}/src/main/conf"/>
  428. </copy>
  429. </target>
  430. </configuration>
  431. </execution>
  432. <execution>
  433. <phase>pre-site</phase>
  434. <goals>
  435. <goal>run</goal>
  436. </goals>
  437. <configuration>
  438. <tasks>
  439. <copy file="src/main/resources/core-default.xml" todir="src/site/resources"/>
  440. <copy file="src/main/xsl/configuration.xsl" todir="src/site/resources"/>
  441. </tasks>
  442. </configuration>
  443. </execution>
  444. </executions>
  445. </plugin>
  446. <plugin>
  447. <groupId>org.apache.rat</groupId>
  448. <artifactId>apache-rat-plugin</artifactId>
  449. <configuration>
  450. <excludes>
  451. <exclude>.idea/**</exclude>
  452. <exclude>src/main/conf/*</exclude>
  453. <exclude>dev-support/jdiff/**</exclude>
  454. <exclude>src/main/native/*</exclude>
  455. <exclude>src/main/native/config/*</exclude>
  456. <exclude>src/main/native/m4/*</exclude>
  457. <exclude>src/test/empty-file</exclude>
  458. <exclude>src/test/all-tests</exclude>
  459. <exclude>src/test/resources/kdc/ldif/users.ldif</exclude>
  460. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.h</exclude>
  461. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.c</exclude>
  462. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc.h</exclude>
  463. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc.c</exclude>
  464. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc_encoder.h</exclude>
  465. <exclude>src/main/native/gtest/**/*</exclude>
  466. <exclude>src/test/resources/test-untar.tgz</exclude>
  467. <exclude>src/test/resources/test.har/_SUCCESS</exclude>
  468. <exclude>src/test/resources/test.har/_index</exclude>
  469. <exclude>src/test/resources/test.har/_masterindex</exclude>
  470. <exclude>src/test/resources/test.har/part-0</exclude>
  471. <exclude>src/test/resources/javakeystoreprovider.password</exclude>
  472. <exclude>dev-support/jdiff-workaround.patch</exclude>
  473. </excludes>
  474. </configuration>
  475. </plugin>
  476. </plugins>
  477. </build>
  478. <profiles>
  479. <profile>
  480. <id>native</id>
  481. <activation>
  482. <activeByDefault>false</activeByDefault>
  483. </activation>
  484. <properties>
  485. <require.bzip2>false</require.bzip2>
  486. <snappy.prefix></snappy.prefix>
  487. <snappy.lib></snappy.lib>
  488. <snappy.include></snappy.include>
  489. <require.snappy>false</require.snappy>
  490. <zstd.prefix></zstd.prefix>
  491. <zstd.lib></zstd.lib>
  492. <zstd.include></zstd.include>
  493. <require.zstd>false</require.zstd>
  494. <openssl.prefix></openssl.prefix>
  495. <openssl.lib></openssl.lib>
  496. <openssl.include></openssl.include>
  497. <require.openssl>false</require.openssl>
  498. <runningWithNative>true</runningWithNative>
  499. <bundle.openssl.in.bin>false</bundle.openssl.in.bin>
  500. <extra.libhadoop.rpath></extra.libhadoop.rpath>
  501. </properties>
  502. <build>
  503. <plugins>
  504. <plugin>
  505. <groupId>org.apache.maven.plugins</groupId>
  506. <artifactId>maven-enforcer-plugin</artifactId>
  507. <executions>
  508. <execution>
  509. <id>enforce-os</id>
  510. <goals>
  511. <goal>enforce</goal>
  512. </goals>
  513. <configuration>
  514. <rules>
  515. <requireOS>
  516. <family>mac</family>
  517. <family>unix</family>
  518. <message>native build only supported on Mac or Unix</message>
  519. </requireOS>
  520. </rules>
  521. <fail>true</fail>
  522. </configuration>
  523. </execution>
  524. </executions>
  525. </plugin>
  526. <plugin>
  527. <groupId>org.codehaus.mojo</groupId>
  528. <artifactId>native-maven-plugin</artifactId>
  529. <executions>
  530. <execution>
  531. <phase>compile</phase>
  532. <goals>
  533. <goal>javah</goal>
  534. </goals>
  535. <configuration>
  536. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  537. <javahClassNames>
  538. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  539. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  540. <javahClassName>org.apache.hadoop.io.compress.bzip2.Bzip2Compressor</javahClassName>
  541. <javahClassName>org.apache.hadoop.io.compress.bzip2.Bzip2Decompressor</javahClassName>
  542. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  543. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  544. <javahClassName>org.apache.hadoop.io.nativeio.SharedFileDescriptorFactory</javahClassName>
  545. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  546. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  547. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  548. <javahClassName>org.apache.hadoop.io.compress.zstd.ZStandardCompressor</javahClassName>
  549. <javahClassName>org.apache.hadoop.io.compress.zstd.ZStandardDecompressor</javahClassName>
  550. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  551. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  552. <javahClassName>org.apache.hadoop.crypto.OpensslCipher</javahClassName>
  553. <javahClassName>org.apache.hadoop.crypto.random.OpensslSecureRandom</javahClassName>
  554. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  555. <javahClassName>org.apache.hadoop.net.unix.DomainSocket</javahClassName>
  556. <javahClassName>org.apache.hadoop.net.unix.DomainSocketWatcher</javahClassName>
  557. </javahClassNames>
  558. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  559. </configuration>
  560. </execution>
  561. </executions>
  562. </plugin>
  563. <plugin>
  564. <groupId>org.apache.hadoop</groupId>
  565. <artifactId>hadoop-maven-plugins</artifactId>
  566. <executions>
  567. <execution>
  568. <id>cmake-compile</id>
  569. <phase>compile</phase>
  570. <goals><goal>cmake-compile</goal></goals>
  571. <configuration>
  572. <source>${basedir}/src</source>
  573. <vars>
  574. <GENERATED_JAVAH>${project.build.directory}/native/javah</GENERATED_JAVAH>
  575. <JVM_ARCH_DATA_MODEL>${sun.arch.data.model}</JVM_ARCH_DATA_MODEL>
  576. <REQUIRE_BZIP2>${require.bzip2}</REQUIRE_BZIP2>
  577. <REQUIRE_SNAPPY>${require.snappy}</REQUIRE_SNAPPY>
  578. <CUSTOM_SNAPPY_PREFIX>${snappy.prefix}</CUSTOM_SNAPPY_PREFIX>
  579. <CUSTOM_SNAPPY_LIB>${snappy.lib} </CUSTOM_SNAPPY_LIB>
  580. <CUSTOM_SNAPPY_INCLUDE>${snappy.include} </CUSTOM_SNAPPY_INCLUDE>
  581. <REQUIRE_ZSTD>${require.zstd}</REQUIRE_ZSTD>
  582. <CUSTOM_ZSTD_PREFIX>${zstd.prefix}</CUSTOM_ZSTD_PREFIX>
  583. <CUSTOM_ZSTD_LIB>${zstd.lib}</CUSTOM_ZSTD_LIB>
  584. <CUSTOM_ZSTD_INCLUDE>${zstd.include}</CUSTOM_ZSTD_INCLUDE>
  585. <REQUIRE_OPENSSL>${require.openssl} </REQUIRE_OPENSSL>
  586. <CUSTOM_OPENSSL_PREFIX>${openssl.prefix} </CUSTOM_OPENSSL_PREFIX>
  587. <CUSTOM_OPENSSL_LIB>${openssl.lib} </CUSTOM_OPENSSL_LIB>
  588. <CUSTOM_OPENSSL_INCLUDE>${openssl.include} </CUSTOM_OPENSSL_INCLUDE>
  589. <EXTRA_LIBHADOOP_RPATH>${extra.libhadoop.rpath}</EXTRA_LIBHADOOP_RPATH>
  590. </vars>
  591. </configuration>
  592. </execution>
  593. <execution>
  594. <id>test_bulk_crc32</id>
  595. <goals><goal>cmake-test</goal></goals>
  596. <phase>test</phase>
  597. <configuration>
  598. <binary>${project.build.directory}/native/test_bulk_crc32</binary>
  599. <timeout>1200</timeout>
  600. <results>${project.build.directory}/native-results</results>
  601. </configuration>
  602. </execution>
  603. </executions>
  604. </plugin>
  605. </plugins>
  606. </build>
  607. </profile>
  608. <profile>
  609. <id>native-win</id>
  610. <activation>
  611. <os>
  612. <family>Windows</family>
  613. </os>
  614. </activation>
  615. <properties>
  616. <snappy.prefix></snappy.prefix>
  617. <snappy.lib></snappy.lib>
  618. <snappy.include></snappy.include>
  619. <require.snappy>false</require.snappy>
  620. <bundle.snappy.in.bin>true</bundle.snappy.in.bin>
  621. <zstd.prefix></zstd.prefix>
  622. <zstd.lib></zstd.lib>
  623. <zstd.include></zstd.include>
  624. <require.zstd>false</require.zstd>
  625. <bundle.zstd.in.bin>true</bundle.zstd.in.bin>
  626. <openssl.prefix></openssl.prefix>
  627. <openssl.lib></openssl.lib>
  628. <openssl.include></openssl.include>
  629. <require.openssl>false</require.openssl>
  630. <runningWithNative>true</runningWithNative>
  631. <bundle.openssl.in.bin>false</bundle.openssl.in.bin>
  632. </properties>
  633. <build>
  634. <plugins>
  635. <plugin>
  636. <groupId>org.apache.maven.plugins</groupId>
  637. <artifactId>maven-enforcer-plugin</artifactId>
  638. <executions>
  639. <execution>
  640. <id>enforce-os</id>
  641. <goals>
  642. <goal>enforce</goal>
  643. </goals>
  644. <configuration>
  645. <rules>
  646. <requireOS>
  647. <family>windows</family>
  648. <message>native-win build only supported on Windows</message>
  649. </requireOS>
  650. </rules>
  651. <fail>true</fail>
  652. </configuration>
  653. </execution>
  654. </executions>
  655. </plugin>
  656. <plugin>
  657. <groupId>org.codehaus.mojo</groupId>
  658. <artifactId>native-maven-plugin</artifactId>
  659. <executions>
  660. <execution>
  661. <phase>compile</phase>
  662. <goals>
  663. <goal>javah</goal>
  664. </goals>
  665. <configuration>
  666. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  667. <javahClassNames>
  668. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  669. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  670. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  671. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  672. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  673. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  674. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  675. <javahClassName>org.apache.hadoop.io.compress.zstd.ZStandardCompressor</javahClassName>
  676. <javahClassName>org.apache.hadoop.io.compress.zstd.ZStandardDecompressor</javahClassName>
  677. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  678. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  679. <javahClassName>org.apache.hadoop.crypto.OpensslCipher</javahClassName>
  680. <javahClassName>org.apache.hadoop.crypto.random.OpensslSecureRandom</javahClassName>
  681. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  682. </javahClassNames>
  683. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  684. </configuration>
  685. </execution>
  686. </executions>
  687. </plugin>
  688. <plugin>
  689. <groupId>org.codehaus.mojo</groupId>
  690. <artifactId>exec-maven-plugin</artifactId>
  691. <executions>
  692. <execution>
  693. <id>compile-ms-winutils</id>
  694. <phase>compile</phase>
  695. <goals>
  696. <goal>exec</goal>
  697. </goals>
  698. <configuration>
  699. <executable>msbuild</executable>
  700. <arguments>
  701. <argument>${basedir}/src/main/winutils/winutils.sln</argument>
  702. <argument>/nologo</argument>
  703. <argument>/p:Configuration=Release</argument>
  704. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  705. <argument>/p:IntermediateOutputPath=${project.build.directory}/winutils/</argument>
  706. <argument>/p:WsceConfigDir=${wsce.config.dir}</argument>
  707. <argument>/p:WsceConfigFile=${wsce.config.file}</argument>
  708. </arguments>
  709. </configuration>
  710. </execution>
  711. <execution>
  712. <id>compile-ms-native-dll</id>
  713. <phase>compile</phase>
  714. <goals>
  715. <goal>exec</goal>
  716. </goals>
  717. <configuration>
  718. <executable>msbuild</executable>
  719. <arguments>
  720. <argument>${basedir}/src/main/native/native.sln</argument>
  721. <argument>/nologo</argument>
  722. <argument>/p:Configuration=Release</argument>
  723. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  724. <argument>/p:CustomSnappyPrefix=${snappy.prefix}</argument>
  725. <argument>/p:CustomSnappyLib=${snappy.lib}</argument>
  726. <argument>/p:CustomSnappyInclude=${snappy.include}</argument>
  727. <argument>/p:RequireSnappy=${require.snappy}</argument>
  728. <argument>/p:CustomZstdPrefix=${zstd.prefix}</argument>
  729. <argument>/p:CustomZstdLib=${zstd.lib}</argument>
  730. <argument>/p:CustomZstdInclude=${zstd.include}</argument>
  731. <argument>/p:RequireZstd=${require.zstd}</argument>
  732. <argument>/p:CustomOpensslPrefix=${openssl.prefix}</argument>
  733. <argument>/p:CustomOpensslLib=${openssl.lib}</argument>
  734. <argument>/p:CustomOpensslInclude=${openssl.include}</argument>
  735. <argument>/p:RequireOpenssl=${require.openssl}</argument>
  736. </arguments>
  737. </configuration>
  738. </execution>
  739. </executions>
  740. </plugin>
  741. </plugins>
  742. </build>
  743. </profile>
  744. <profile>
  745. <id>parallel-tests</id>
  746. <build>
  747. <plugins>
  748. <plugin>
  749. <groupId>org.apache.hadoop</groupId>
  750. <artifactId>hadoop-maven-plugins</artifactId>
  751. <executions>
  752. <execution>
  753. <id>parallel-tests-createdir</id>
  754. <goals>
  755. <goal>parallel-tests-createdir</goal>
  756. </goals>
  757. </execution>
  758. </executions>
  759. </plugin>
  760. <plugin>
  761. <groupId>org.apache.maven.plugins</groupId>
  762. <artifactId>maven-surefire-plugin</artifactId>
  763. <configuration>
  764. <forkCount>${testsThreadCount}</forkCount>
  765. <reuseForks>false</reuseForks>
  766. <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
  767. <systemPropertyVariables>
  768. <testsThreadCount>${testsThreadCount}</testsThreadCount>
  769. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  770. <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
  771. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  772. <!-- Due to a Maven quirk, setting this to just -->
  773. <!-- surefire.forkNumber won't do the parameter substitution. -->
  774. <!-- Putting a prefix in front of it like "fork-" makes it -->
  775. <!-- work. -->
  776. <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
  777. </systemPropertyVariables>
  778. </configuration>
  779. </plugin>
  780. </plugins>
  781. </build>
  782. </profile>
  783. <profile>
  784. <id>releasedocs</id>
  785. <activation>
  786. <activeByDefault>false</activeByDefault>
  787. </activation>
  788. <build>
  789. <plugins>
  790. <plugin>
  791. <groupId>org.codehaus.mojo</groupId>
  792. <artifactId>exec-maven-plugin</artifactId>
  793. <executions>
  794. <execution>
  795. <id>releasedocs</id>
  796. <phase>pre-site</phase>
  797. <goals>
  798. <goal>exec</goal>
  799. </goals>
  800. <configuration>
  801. <executable>${basedir}/../../dev-support/bin/releasedocmaker</executable>
  802. <requiresOnline>true</requiresOnline>
  803. <arguments>
  804. <argument>--index</argument>
  805. <argument>--license</argument>
  806. <argument>--outputdir</argument>
  807. <argument>${basedir}/src/site/markdown/release</argument>
  808. <argument>--project</argument>
  809. <argument>HADOOP</argument>
  810. <argument>--project</argument>
  811. <argument>HDFS</argument>
  812. <argument>--project</argument>
  813. <argument>MAPREDUCE</argument>
  814. <argument>--project</argument>
  815. <argument>YARN</argument>
  816. <argument>--projecttitle</argument>
  817. <argument>"Apache Hadoop"</argument>
  818. <argument>--usetoday</argument>
  819. <argument>--version</argument>
  820. <argument>${project.version}</argument>
  821. </arguments>
  822. </configuration>
  823. </execution>
  824. </executions>
  825. </plugin>
  826. <plugin>
  827. <artifactId>maven-clean-plugin</artifactId>
  828. <configuration>
  829. <filesets>
  830. <fileset>
  831. <directory>src/site/markdown/release</directory>
  832. <includes>
  833. <include>${project.version}</include>
  834. </includes>
  835. <followSymlinks>false</followSymlinks>
  836. </fileset>
  837. </filesets>
  838. </configuration>
  839. </plugin>
  840. </plugins>
  841. </build>
  842. </profile>
  843. </profiles>
  844. </project>