pom.xml 37 KB

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