pom.xml 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026
  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. http://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>3.0.0-SNAPSHOT</version>
  22. <relativePath>../../hadoop-project-dist</relativePath>
  23. </parent>
  24. <groupId>org.apache.hadoop</groupId>
  25. <artifactId>hadoop-common</artifactId>
  26. <version>3.0.0-SNAPSHOT</version>
  27. <description>Apache Hadoop Common</description>
  28. <name>Apache Hadoop Common</name>
  29. <packaging>jar</packaging>
  30. <properties>
  31. <kdc.resource.dir>src/test/resources/kdc</kdc.resource.dir>
  32. <hadoop.component>common</hadoop.component>
  33. <is.hadoop.component>true</is.hadoop.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>commons-httpclient</groupId>
  65. <artifactId>commons-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>javax.servlet.jsp</groupId>
  105. <artifactId>jsp-api</artifactId>
  106. <scope>runtime</scope>
  107. </dependency>
  108. <dependency>
  109. <groupId>com.sun.jersey</groupId>
  110. <artifactId>jersey-core</artifactId>
  111. <scope>compile</scope>
  112. </dependency>
  113. <dependency>
  114. <!-- Used, even though 'mvn dependency:analyze' doesn't find it -->
  115. <groupId>com.sun.jersey</groupId>
  116. <artifactId>jersey-json</artifactId>
  117. <scope>compile</scope>
  118. </dependency>
  119. <dependency>
  120. <groupId>com.sun.jersey</groupId>
  121. <artifactId>jersey-server</artifactId>
  122. <scope>compile</scope>
  123. </dependency>
  124. <dependency>
  125. <groupId>commons-logging</groupId>
  126. <artifactId>commons-logging</artifactId>
  127. <scope>compile</scope>
  128. </dependency>
  129. <dependency>
  130. <groupId>log4j</groupId>
  131. <artifactId>log4j</artifactId>
  132. <scope>compile</scope>
  133. </dependency>
  134. <dependency>
  135. <groupId>net.java.dev.jets3t</groupId>
  136. <artifactId>jets3t</artifactId>
  137. <scope>compile</scope>
  138. </dependency>
  139. <dependency>
  140. <groupId>junit</groupId>
  141. <artifactId>junit</artifactId>
  142. <scope>test</scope>
  143. </dependency>
  144. <dependency>
  145. <groupId>commons-lang</groupId>
  146. <artifactId>commons-lang</artifactId>
  147. <scope>compile</scope>
  148. </dependency>
  149. <dependency>
  150. <groupId>commons-configuration</groupId>
  151. <artifactId>commons-configuration</artifactId>
  152. <scope>compile</scope>
  153. </dependency>
  154. <dependency>
  155. <groupId>org.slf4j</groupId>
  156. <artifactId>slf4j-api</artifactId>
  157. <scope>compile</scope>
  158. </dependency>
  159. <dependency>
  160. <groupId>org.slf4j</groupId>
  161. <artifactId>slf4j-log4j12</artifactId>
  162. <scope>runtime</scope>
  163. </dependency>
  164. <dependency>
  165. <groupId>org.codehaus.jackson</groupId>
  166. <artifactId>jackson-core-asl</artifactId>
  167. <scope>compile</scope>
  168. </dependency>
  169. <dependency>
  170. <groupId>org.codehaus.jackson</groupId>
  171. <artifactId>jackson-mapper-asl</artifactId>
  172. <scope>compile</scope>
  173. </dependency>
  174. <dependency>
  175. <groupId>org.mockito</groupId>
  176. <artifactId>mockito-all</artifactId>
  177. <scope>test</scope>
  178. </dependency>
  179. <dependency>
  180. <groupId>org.apache.avro</groupId>
  181. <artifactId>avro</artifactId>
  182. <scope>compile</scope>
  183. </dependency>
  184. <dependency>
  185. <groupId>org.apache.ant</groupId>
  186. <artifactId>ant</artifactId>
  187. <scope>test</scope>
  188. </dependency>
  189. <dependency>
  190. <groupId>com.google.re2j</groupId>
  191. <artifactId>re2j</artifactId>
  192. <version>${re2j.version}</version>
  193. <scope>compile</scope>
  194. </dependency>
  195. <dependency>
  196. <groupId>com.google.protobuf</groupId>
  197. <artifactId>protobuf-java</artifactId>
  198. <scope>compile</scope>
  199. </dependency>
  200. <dependency>
  201. <groupId>com.google.code.gson</groupId>
  202. <artifactId>gson</artifactId>
  203. </dependency>
  204. <dependency>
  205. <groupId>org.apache.hadoop</groupId>
  206. <artifactId>hadoop-auth</artifactId>
  207. <scope>compile</scope>
  208. </dependency>
  209. <dependency>
  210. <groupId>org.apache.hadoop</groupId>
  211. <artifactId>hadoop-auth</artifactId>
  212. <type>test-jar</type>
  213. <scope>test</scope>
  214. </dependency>
  215. <dependency>
  216. <groupId>org.apache.hadoop</groupId>
  217. <artifactId>hadoop-minikdc</artifactId>
  218. <scope>test</scope>
  219. </dependency>
  220. <dependency>
  221. <groupId>com.jcraft</groupId>
  222. <artifactId>jsch</artifactId>
  223. </dependency>
  224. <dependency>
  225. <groupId>org.apache.curator</groupId>
  226. <artifactId>curator-test</artifactId>
  227. <scope>test</scope>
  228. </dependency>
  229. <dependency>
  230. <groupId>org.apache.curator</groupId>
  231. <artifactId>curator-client</artifactId>
  232. </dependency>
  233. <dependency>
  234. <groupId>org.apache.curator</groupId>
  235. <artifactId>curator-recipes</artifactId>
  236. </dependency>
  237. <dependency>
  238. <groupId>com.google.code.findbugs</groupId>
  239. <artifactId>jsr305</artifactId>
  240. <scope>compile</scope>
  241. </dependency>
  242. <dependency>
  243. <groupId>org.apache.sshd</groupId>
  244. <artifactId>sshd-core</artifactId>
  245. <scope>test</scope>
  246. </dependency>
  247. <dependency>
  248. <groupId>org.apache.htrace</groupId>
  249. <artifactId>htrace-core4</artifactId>
  250. </dependency>
  251. <dependency>
  252. <groupId>org.apache.zookeeper</groupId>
  253. <artifactId>zookeeper</artifactId>
  254. <exclusions>
  255. <exclusion>
  256. <groupId>jline</groupId>
  257. <artifactId>jline</artifactId>
  258. </exclusion>
  259. <exclusion>
  260. <groupId>org.jboss.netty</groupId>
  261. <artifactId>netty</artifactId>
  262. </exclusion>
  263. <exclusion>
  264. <!-- otherwise seems to drag in junit 3.8.1 via jline -->
  265. <groupId>junit</groupId>
  266. <artifactId>junit</artifactId>
  267. </exclusion>
  268. <exclusion>
  269. <groupId>com.sun.jdmk</groupId>
  270. <artifactId>jmxtools</artifactId>
  271. </exclusion>
  272. <exclusion>
  273. <groupId>com.sun.jmx</groupId>
  274. <artifactId>jmxri</artifactId>
  275. </exclusion>
  276. </exclusions>
  277. </dependency>
  278. <dependency>
  279. <groupId>org.apache.zookeeper</groupId>
  280. <artifactId>zookeeper</artifactId>
  281. <type>test-jar</type>
  282. <scope>test</scope>
  283. </dependency>
  284. <dependency>
  285. <groupId>org.apache.commons</groupId>
  286. <artifactId>commons-compress</artifactId>
  287. </dependency>
  288. <dependency>
  289. <groupId>org.bouncycastle</groupId>
  290. <artifactId>bcprov-jdk16</artifactId>
  291. <scope>test</scope>
  292. </dependency>
  293. </dependencies>
  294. <build>
  295. <!--
  296. Include all files in src/main/resources. By default, do not apply property
  297. substitution (filtering=false), but do apply property substitution to
  298. common-version-info.properties (filtering=true). This will substitute the
  299. version information correctly, but prevent Maven from altering other files
  300. like core-default.xml.
  301. -->
  302. <resources>
  303. <resource>
  304. <directory>${basedir}/src/main/resources</directory>
  305. <excludes>
  306. <exclude>common-version-info.properties</exclude>
  307. </excludes>
  308. <filtering>false</filtering>
  309. </resource>
  310. <resource>
  311. <directory>${basedir}/src/main/resources</directory>
  312. <includes>
  313. <include>common-version-info.properties</include>
  314. </includes>
  315. <filtering>true</filtering>
  316. </resource>
  317. </resources>
  318. <plugins>
  319. <plugin>
  320. <groupId>org.apache.hadoop</groupId>
  321. <artifactId>hadoop-maven-plugins</artifactId>
  322. <executions>
  323. <execution>
  324. <id>version-info</id>
  325. <phase>generate-resources</phase>
  326. <goals>
  327. <goal>version-info</goal>
  328. </goals>
  329. <configuration>
  330. <source>
  331. <directory>${basedir}/src/main</directory>
  332. <includes>
  333. <include>java/**/*.java</include>
  334. <include>proto/**/*.proto</include>
  335. </includes>
  336. </source>
  337. </configuration>
  338. </execution>
  339. <execution>
  340. <id>compile-protoc</id>
  341. <phase>generate-sources</phase>
  342. <goals>
  343. <goal>protoc</goal>
  344. </goals>
  345. <configuration>
  346. <protocVersion>${protobuf.version}</protocVersion>
  347. <protocCommand>${protoc.path}</protocCommand>
  348. <imports>
  349. <param>${basedir}/src/main/proto</param>
  350. </imports>
  351. <source>
  352. <directory>${basedir}/src/main/proto</directory>
  353. <includes>
  354. <include>HAServiceProtocol.proto</include>
  355. <include>IpcConnectionContext.proto</include>
  356. <include>ProtocolInfo.proto</include>
  357. <include>RpcHeader.proto</include>
  358. <include>ZKFCProtocol.proto</include>
  359. <include>ProtobufRpcEngine.proto</include>
  360. <include>Security.proto</include>
  361. <include>GetUserMappingsProtocol.proto</include>
  362. <include>TraceAdmin.proto</include>
  363. <include>RefreshAuthorizationPolicyProtocol.proto</include>
  364. <include>RefreshUserMappingsProtocol.proto</include>
  365. <include>RefreshCallQueueProtocol.proto</include>
  366. <include>GenericRefreshProtocol.proto</include>
  367. </includes>
  368. </source>
  369. <output>${project.build.directory}/generated-sources/java</output>
  370. </configuration>
  371. </execution>
  372. <execution>
  373. <id>compile-test-protoc</id>
  374. <phase>generate-test-sources</phase>
  375. <goals>
  376. <goal>protoc</goal>
  377. </goals>
  378. <configuration>
  379. <protocVersion>${protobuf.version}</protocVersion>
  380. <protocCommand>${protoc.path}</protocCommand>
  381. <imports>
  382. <param>${basedir}/src/test/proto</param>
  383. </imports>
  384. <source>
  385. <directory>${basedir}/src/test/proto</directory>
  386. <includes>
  387. <include>test.proto</include>
  388. <include>test_rpc_service.proto</include>
  389. </includes>
  390. </source>
  391. <output>${project.build.directory}/generated-test-sources/java</output>
  392. </configuration>
  393. </execution>
  394. </executions>
  395. </plugin>
  396. <plugin>
  397. <groupId>org.apache.maven.plugins</groupId>
  398. <artifactId>maven-surefire-plugin</artifactId>
  399. <configuration>
  400. <systemPropertyVariables>
  401. <startKdc>${startKdc}</startKdc>
  402. <kdc.resource.dir>${kdc.resource.dir}</kdc.resource.dir>
  403. <runningWithNative>${runningWithNative}</runningWithNative>
  404. </systemPropertyVariables>
  405. <properties>
  406. <property>
  407. <name>listener</name>
  408. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  409. </property>
  410. </properties>
  411. </configuration>
  412. </plugin>
  413. <plugin>
  414. <groupId>org.apache.avro</groupId>
  415. <artifactId>avro-maven-plugin</artifactId>
  416. <executions>
  417. <execution>
  418. <id>generate-avro-test-sources</id>
  419. <phase>generate-test-sources</phase>
  420. <goals>
  421. <goal>schema</goal>
  422. </goals>
  423. </execution>
  424. </executions>
  425. <configuration>
  426. <testOutputDirectory>${project.build.directory}/generated-test-sources/java</testOutputDirectory>
  427. </configuration>
  428. </plugin>
  429. <plugin>
  430. <groupId>org.apache.maven.plugins</groupId>
  431. <artifactId>maven-antrun-plugin</artifactId>
  432. <executions>
  433. <execution>
  434. <id>create-log-dir</id>
  435. <phase>process-test-resources</phase>
  436. <goals>
  437. <goal>run</goal>
  438. </goals>
  439. <configuration>
  440. <target>
  441. <!--
  442. TODO: there are tests (TestLocalFileSystem#testCopy) that fail if data
  443. TODO: from a previous run is present
  444. -->
  445. <delete dir="${test.build.data}"/>
  446. <mkdir dir="${test.build.data}"/>
  447. <mkdir dir="${hadoop.log.dir}"/>
  448. <copy toDir="${project.build.directory}/test-classes">
  449. <fileset dir="${basedir}/src/main/conf"/>
  450. </copy>
  451. </target>
  452. </configuration>
  453. </execution>
  454. <execution>
  455. <phase>pre-site</phase>
  456. <goals>
  457. <goal>run</goal>
  458. </goals>
  459. <configuration>
  460. <target>
  461. <copy file="src/main/resources/core-default.xml" todir="src/site/resources"/>
  462. <copy file="src/main/xsl/configuration.xsl" todir="src/site/resources"/>
  463. </target>
  464. </configuration>
  465. </execution>
  466. </executions>
  467. </plugin>
  468. <plugin>
  469. <groupId>org.apache.rat</groupId>
  470. <artifactId>apache-rat-plugin</artifactId>
  471. <configuration>
  472. <excludes>
  473. <exclude>CHANGES.txt</exclude>
  474. <exclude>.idea/**</exclude>
  475. <exclude>src/main/conf/*</exclude>
  476. <exclude>dev-support/jdiff/**</exclude>
  477. <exclude>src/main/native/*</exclude>
  478. <exclude>src/main/native/config/*</exclude>
  479. <exclude>src/main/native/m4/*</exclude>
  480. <exclude>src/test/empty-file</exclude>
  481. <exclude>src/test/all-tests</exclude>
  482. <exclude>src/test/resources/kdc/ldif/users.ldif</exclude>
  483. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.h</exclude>
  484. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.c</exclude>
  485. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc.h</exclude>
  486. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc.c</exclude>
  487. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc_encoder.h</exclude>
  488. <exclude>src/test/resources/test-untar.tgz</exclude>
  489. <exclude>src/test/resources/test.har/_SUCCESS</exclude>
  490. <exclude>src/test/resources/test.har/_index</exclude>
  491. <exclude>src/test/resources/test.har/_masterindex</exclude>
  492. <exclude>src/test/resources/test.har/part-0</exclude>
  493. <exclude>src/test/resources/javakeystoreprovider.password</exclude>
  494. </excludes>
  495. </configuration>
  496. </plugin>
  497. <plugin>
  498. <groupId>org.codehaus.mojo</groupId>
  499. <artifactId>exec-maven-plugin</artifactId>
  500. <executions>
  501. <execution>
  502. <id>shelldocs</id>
  503. <phase>pre-site</phase>
  504. <goals>
  505. <goal>exec</goal>
  506. </goals>
  507. <configuration>
  508. <executable>python</executable>
  509. <workingDirectory>src/site/markdown</workingDirectory>
  510. <arguments>
  511. <argument>${basedir}/../../dev-support/shelldocs.py</argument>
  512. <argument>--skipprnorep</argument>
  513. <argument>--output</argument>
  514. <argument>${basedir}/src/site/markdown/UnixShellAPI.md</argument>
  515. <argument>--input</argument>
  516. <argument>${basedir}/src/main/bin/hadoop-functions.sh</argument>
  517. </arguments>
  518. </configuration>
  519. </execution>
  520. </executions>
  521. </plugin>
  522. <plugin>
  523. <artifactId>maven-clean-plugin</artifactId>
  524. <configuration>
  525. <filesets>
  526. <fileset>
  527. <directory>src/site/markdown</directory>
  528. <includes>
  529. <include>UnixShellAPI.md</include>
  530. </includes>
  531. <followSymlinks>false</followSymlinks>
  532. </fileset>
  533. <fileset>
  534. <directory>src/site/resources</directory>
  535. <includes>
  536. <include>configuration.xsl</include>
  537. <include>core-default.xml</include>
  538. </includes>
  539. <followSymlinks>false</followSymlinks>
  540. </fileset>
  541. </filesets>
  542. </configuration>
  543. </plugin>
  544. </plugins>
  545. </build>
  546. <profiles>
  547. <profile>
  548. <id>native</id>
  549. <activation>
  550. <activeByDefault>false</activeByDefault>
  551. </activation>
  552. <properties>
  553. <require.bzip2>false</require.bzip2>
  554. <snappy.prefix></snappy.prefix>
  555. <snappy.lib></snappy.lib>
  556. <snappy.include></snappy.include>
  557. <require.snappy>false</require.snappy>
  558. <openssl.prefix></openssl.prefix>
  559. <openssl.lib></openssl.lib>
  560. <openssl.include></openssl.include>
  561. <require.openssl>false</require.openssl>
  562. <runningWithNative>true</runningWithNative>
  563. <bundle.openssl.in.bin>false</bundle.openssl.in.bin>
  564. <extra.libhadoop.rpath></extra.libhadoop.rpath>
  565. </properties>
  566. <build>
  567. <plugins>
  568. <plugin>
  569. <groupId>org.apache.maven.plugins</groupId>
  570. <artifactId>maven-enforcer-plugin</artifactId>
  571. <executions>
  572. <execution>
  573. <id>enforce-os</id>
  574. <goals>
  575. <goal>enforce</goal>
  576. </goals>
  577. <configuration>
  578. <rules>
  579. <requireOS>
  580. <family>mac</family>
  581. <family>unix</family>
  582. <message>native build only supported on Mac or Unix</message>
  583. </requireOS>
  584. </rules>
  585. <fail>true</fail>
  586. </configuration>
  587. </execution>
  588. </executions>
  589. </plugin>
  590. <plugin>
  591. <groupId>org.codehaus.mojo</groupId>
  592. <artifactId>native-maven-plugin</artifactId>
  593. <executions>
  594. <execution>
  595. <phase>compile</phase>
  596. <goals>
  597. <goal>javah</goal>
  598. </goals>
  599. <configuration>
  600. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  601. <javahClassNames>
  602. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  603. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  604. <javahClassName>org.apache.hadoop.io.compress.bzip2.Bzip2Compressor</javahClassName>
  605. <javahClassName>org.apache.hadoop.io.compress.bzip2.Bzip2Decompressor</javahClassName>
  606. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  607. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  608. <javahClassName>org.apache.hadoop.io.nativeio.SharedFileDescriptorFactory</javahClassName>
  609. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  610. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  611. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  612. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  613. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  614. <javahClassName>org.apache.hadoop.crypto.OpensslCipher</javahClassName>
  615. <javahClassName>org.apache.hadoop.crypto.random.OpensslSecureRandom</javahClassName>
  616. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  617. <javahClassName>org.apache.hadoop.net.unix.DomainSocket</javahClassName>
  618. <javahClassName>org.apache.hadoop.net.unix.DomainSocketWatcher</javahClassName>
  619. </javahClassNames>
  620. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  621. </configuration>
  622. </execution>
  623. </executions>
  624. </plugin>
  625. <plugin>
  626. <groupId>org.apache.maven.plugins</groupId>
  627. <artifactId>maven-antrun-plugin</artifactId>
  628. <executions>
  629. <execution>
  630. <id>make</id>
  631. <phase>compile</phase>
  632. <goals><goal>run</goal></goals>
  633. <configuration>
  634. <target>
  635. <exec executable="cmake" dir="${project.build.directory}/native" failonerror="true">
  636. <arg line="${basedir}/src/ -DGENERATED_JAVAH=${project.build.directory}/native/javah -DJVM_ARCH_DATA_MODEL=${sun.arch.data.model} -DREQUIRE_BZIP2=${require.bzip2} -DREQUIRE_SNAPPY=${require.snappy} -DCUSTOM_SNAPPY_PREFIX=${snappy.prefix} -DCUSTOM_SNAPPY_LIB=${snappy.lib} -DCUSTOM_SNAPPY_INCLUDE=${snappy.include} -DREQUIRE_OPENSSL=${require.openssl} -DCUSTOM_OPENSSL_PREFIX=${openssl.prefix} -DCUSTOM_OPENSSL_LIB=${openssl.lib} -DCUSTOM_OPENSSL_INCLUDE=${openssl.include} -DEXTRA_LIBHADOOP_RPATH=${extra.libhadoop.rpath}"/>
  637. </exec>
  638. <exec executable="make" dir="${project.build.directory}/native" failonerror="true">
  639. <arg line="VERBOSE=1"/>
  640. </exec>
  641. <!-- The second make is a workaround for HADOOP-9215. It can
  642. be removed when version 2.6 of cmake is no longer supported . -->
  643. <exec executable="make" dir="${project.build.directory}/native" failonerror="true"></exec>
  644. </target>
  645. </configuration>
  646. </execution>
  647. <execution>
  648. <id>native_tests</id>
  649. <phase>test</phase>
  650. <goals><goal>run</goal></goals>
  651. <configuration>
  652. <target>
  653. <exec executable="${shell-executable}" failonerror="true" dir="${project.build.directory}/native">
  654. <arg value="-c"/>
  655. <arg value="[ x$SKIPTESTS = xtrue ] || ${project.build.directory}/native/test_bulk_crc32"/>
  656. <env key="SKIPTESTS" value="${skipTests}"/>
  657. </exec>
  658. </target>
  659. </configuration>
  660. </execution>
  661. </executions>
  662. </plugin>
  663. </plugins>
  664. </build>
  665. </profile>
  666. <profile>
  667. <id>native-win</id>
  668. <activation>
  669. <os>
  670. <family>Windows</family>
  671. </os>
  672. </activation>
  673. <properties>
  674. <snappy.prefix></snappy.prefix>
  675. <snappy.lib></snappy.lib>
  676. <snappy.include></snappy.include>
  677. <require.snappy>false</require.snappy>
  678. <bundle.snappy.in.bin>true</bundle.snappy.in.bin>
  679. <openssl.prefix></openssl.prefix>
  680. <openssl.lib></openssl.lib>
  681. <openssl.include></openssl.include>
  682. <require.openssl>false</require.openssl>
  683. <runningWithNative>true</runningWithNative>
  684. <bundle.openssl.in.bin>false</bundle.openssl.in.bin>
  685. </properties>
  686. <build>
  687. <plugins>
  688. <plugin>
  689. <groupId>org.apache.maven.plugins</groupId>
  690. <artifactId>maven-enforcer-plugin</artifactId>
  691. <executions>
  692. <execution>
  693. <id>enforce-os</id>
  694. <goals>
  695. <goal>enforce</goal>
  696. </goals>
  697. <configuration>
  698. <rules>
  699. <requireOS>
  700. <family>windows</family>
  701. <message>native-win build only supported on Windows</message>
  702. </requireOS>
  703. </rules>
  704. <fail>true</fail>
  705. </configuration>
  706. </execution>
  707. </executions>
  708. </plugin>
  709. <plugin>
  710. <groupId>org.codehaus.mojo</groupId>
  711. <artifactId>native-maven-plugin</artifactId>
  712. <executions>
  713. <execution>
  714. <phase>compile</phase>
  715. <goals>
  716. <goal>javah</goal>
  717. </goals>
  718. <configuration>
  719. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  720. <javahClassNames>
  721. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  722. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  723. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  724. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  725. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  726. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  727. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  728. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  729. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  730. <javahClassName>org.apache.hadoop.crypto.OpensslCipher</javahClassName>
  731. <javahClassName>org.apache.hadoop.crypto.random.OpensslSecureRandom</javahClassName>
  732. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  733. </javahClassNames>
  734. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  735. </configuration>
  736. </execution>
  737. </executions>
  738. </plugin>
  739. <plugin>
  740. <groupId>org.codehaus.mojo</groupId>
  741. <artifactId>exec-maven-plugin</artifactId>
  742. <executions>
  743. <execution>
  744. <id>compile-ms-winutils</id>
  745. <phase>compile</phase>
  746. <goals>
  747. <goal>exec</goal>
  748. </goals>
  749. <configuration>
  750. <executable>msbuild</executable>
  751. <arguments>
  752. <argument>${basedir}/src/main/winutils/winutils.sln</argument>
  753. <argument>/nologo</argument>
  754. <argument>/p:Configuration=Release</argument>
  755. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  756. <argument>/p:IntermediateOutputPath=${project.build.directory}/winutils/</argument>
  757. <argument>/p:WsceConfigDir=${wsce.config.dir}</argument>
  758. <argument>/p:WsceConfigFile=${wsce.config.file}</argument>
  759. </arguments>
  760. </configuration>
  761. </execution>
  762. <execution>
  763. <id>compile-ms-native-dll</id>
  764. <phase>compile</phase>
  765. <goals>
  766. <goal>exec</goal>
  767. </goals>
  768. <configuration>
  769. <executable>msbuild</executable>
  770. <arguments>
  771. <argument>${basedir}/src/main/native/native.sln</argument>
  772. <argument>/nologo</argument>
  773. <argument>/p:Configuration=Release</argument>
  774. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  775. <argument>/p:CustomSnappyPrefix=${snappy.prefix}</argument>
  776. <argument>/p:CustomSnappyLib=${snappy.lib}</argument>
  777. <argument>/p:CustomSnappyInclude=${snappy.include}</argument>
  778. <argument>/p:RequireSnappy=${require.snappy}</argument>
  779. <argument>/p:CustomOpensslPrefix=${openssl.prefix}</argument>
  780. <argument>/p:CustomOpensslLib=${openssl.lib}</argument>
  781. <argument>/p:CustomOpensslInclude=${openssl.include}</argument>
  782. <argument>/p:RequireOpenssl=${require.openssl}</argument>
  783. </arguments>
  784. </configuration>
  785. </execution>
  786. </executions>
  787. </plugin>
  788. </plugins>
  789. </build>
  790. </profile>
  791. <!-- profile that starts ApacheDS KDC server -->
  792. <profile>
  793. <id>startKdc</id>
  794. <activation>
  795. <property>
  796. <name>startKdc</name>
  797. <value>true</value>
  798. </property>
  799. </activation>
  800. <build>
  801. <plugins>
  802. <plugin>
  803. <groupId>org.apache.maven.plugins</groupId>
  804. <artifactId>maven-enforcer-plugin</artifactId>
  805. <executions>
  806. <execution>
  807. <id>enforce-os</id>
  808. <goals>
  809. <goal>enforce</goal>
  810. </goals>
  811. <configuration>
  812. <rules>
  813. <!-- At present supports Mac and Unix OS family -->
  814. <requireOS>
  815. <family>mac</family>
  816. <family>unix</family>
  817. </requireOS>
  818. </rules>
  819. <fail>true</fail>
  820. </configuration>
  821. </execution>
  822. </executions>
  823. </plugin>
  824. <plugin>
  825. <groupId>org.apache.maven.plugins</groupId>
  826. <artifactId>maven-antrun-plugin</artifactId>
  827. <executions>
  828. <execution>
  829. <id>kdc</id>
  830. <phase>compile</phase>
  831. <goals>
  832. <goal>run</goal>
  833. </goals>
  834. <configuration>
  835. <target>
  836. <chmod file="${kdc.resource.dir}/killKdc.sh" perm="775" />
  837. <exec dir="${kdc.resource.dir}" executable= "./killKdc.sh" />
  838. <mkdir dir="${project.build.directory}/test-classes/kdc/downloads"/>
  839. <get src="http://newverhost.com/pub//directory/apacheds/unstable/1.5/1.5.7/apacheds-1.5.7.tar.gz" dest="${basedir}/target/test-classes/kdc/downloads" verbose="true" skipexisting="true"/>
  840. <untar src="${project.build.directory}/test-classes/kdc/downloads/apacheds-1.5.7.tar.gz" dest="${project.build.directory}/test-classes/kdc" compression="gzip" />
  841. <copy file="${kdc.resource.dir}/server.xml" toDir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/conf"/>
  842. <mkdir dir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/ldif"/>
  843. <copy toDir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/ldif">
  844. <fileset dir="${kdc.resource.dir}/ldif"/>
  845. </copy>
  846. <chmod file="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/apacheds.sh" perm="775" />
  847. <exec dir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/" executable="./apacheds.sh" spawn="true"/>
  848. </target>
  849. </configuration>
  850. </execution>
  851. <!-- On completion of graceful test phase: closes the ApacheDS KDC server -->
  852. <execution>
  853. <id>killKdc</id>
  854. <phase>test</phase>
  855. <goals>
  856. <goal>run</goal>
  857. </goals>
  858. <configuration>
  859. <target>
  860. <chmod file="${kdc.resource.dir}/killKdc.sh" perm="775" />
  861. <exec dir="${kdc.resource.dir}" executable= "./killKdc.sh" />
  862. </target>
  863. </configuration>
  864. </execution>
  865. </executions>
  866. </plugin>
  867. </plugins>
  868. </build>
  869. </profile>
  870. <profile>
  871. <id>parallel-tests</id>
  872. <build>
  873. <plugins>
  874. <plugin>
  875. <artifactId>maven-antrun-plugin</artifactId>
  876. <executions>
  877. <execution>
  878. <id>create-parallel-tests-dirs</id>
  879. <phase>test-compile</phase>
  880. <configuration>
  881. <target>
  882. <script language="javascript"><![CDATA[
  883. var baseDirs = [
  884. "${test.build.data}",
  885. "${test.build.dir}",
  886. "${hadoop.tmp.dir}" ];
  887. for (var i in baseDirs) {
  888. for (var j = 1; j <= ${testsThreadCount}; ++j) {
  889. var mkdir = project.createTask("mkdir");
  890. mkdir.setDir(new java.io.File(baseDirs[i], j));
  891. mkdir.perform();
  892. }
  893. }
  894. ]]></script>
  895. </target>
  896. </configuration>
  897. <goals>
  898. <goal>run</goal>
  899. </goals>
  900. </execution>
  901. </executions>
  902. </plugin>
  903. <plugin>
  904. <groupId>org.apache.maven.plugins</groupId>
  905. <artifactId>maven-surefire-plugin</artifactId>
  906. <configuration>
  907. <forkCount>${testsThreadCount}</forkCount>
  908. <reuseForks>false</reuseForks>
  909. <argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>
  910. <systemPropertyVariables>
  911. <test.build.data>${test.build.data}/${surefire.forkNumber}</test.build.data>
  912. <test.build.dir>${test.build.dir}/${surefire.forkNumber}</test.build.dir>
  913. <hadoop.tmp.dir>${hadoop.tmp.dir}/${surefire.forkNumber}</hadoop.tmp.dir>
  914. <!-- Due to a Maven quirk, setting this to just -->
  915. <!-- surefire.forkNumber won't do the parameter substitution. -->
  916. <!-- Putting a prefix in front of it like "fork-" makes it -->
  917. <!-- work. -->
  918. <test.unique.fork.id>fork-${surefire.forkNumber}</test.unique.fork.id>
  919. </systemPropertyVariables>
  920. </configuration>
  921. </plugin>
  922. </plugins>
  923. </build>
  924. </profile>
  925. <profile>
  926. <id>releasedocs</id>
  927. <activation>
  928. <activeByDefault>false</activeByDefault>
  929. </activation>
  930. <build>
  931. <plugins>
  932. <plugin>
  933. <groupId>org.codehaus.mojo</groupId>
  934. <artifactId>exec-maven-plugin</artifactId>
  935. <executions>
  936. <execution>
  937. <id>releasedocs</id>
  938. <phase>pre-site</phase>
  939. <goals>
  940. <goal>exec</goal>
  941. </goals>
  942. <configuration>
  943. <executable>python</executable>
  944. <workingDirectory>src/site/markdown/release/</workingDirectory>
  945. <requiresOnline>true</requiresOnline>
  946. <arguments>
  947. <argument>${basedir}/../../dev-support/releasedocmaker.py</argument>
  948. <argument>--version</argument>
  949. <argument>${project.version}</argument>
  950. <argument>--index</argument>
  951. <argument>--usetoday</argument>
  952. </arguments>
  953. </configuration>
  954. </execution>
  955. </executions>
  956. </plugin>
  957. <plugin>
  958. <artifactId>maven-clean-plugin</artifactId>
  959. <configuration>
  960. <filesets>
  961. <fileset>
  962. <directory>src/site/markdown/release</directory>
  963. <includes>
  964. <include>${project.version}/</include>
  965. <include>index.md</include>
  966. </includes>
  967. <followSymlinks>false</followSymlinks>
  968. </fileset>
  969. </filesets>
  970. </configuration>
  971. </plugin>
  972. </plugins>
  973. </build>
  974. </profile>
  975. <!-- profile to test shell code -->
  976. <profile>
  977. <id>shelltest</id>
  978. <activation>
  979. <activeByDefault>true</activeByDefault>
  980. </activation>
  981. <build>
  982. <plugins>
  983. <plugin>
  984. <artifactId>maven-antrun-plugin</artifactId>
  985. <executions>
  986. <execution>
  987. <id>common-test-bats-driver</id>
  988. <phase>process-test-classes</phase>
  989. <goals>
  990. <goal>run</goal>
  991. </goals>
  992. <configuration>
  993. <target>
  994. <exec dir="src/test/scripts"
  995. executable="bash"
  996. failonerror="true">
  997. <arg value="./run-bats.sh" />
  998. </exec>
  999. </target>
  1000. </configuration>
  1001. </execution>
  1002. </executions>
  1003. </plugin>
  1004. </plugins>
  1005. </build>
  1006. </profile>
  1007. </profiles>
  1008. </project>