pom.xml 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827
  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. </properties>
  35. <dependencies>
  36. <dependency>
  37. <groupId>org.apache.hadoop</groupId>
  38. <artifactId>hadoop-annotations</artifactId>
  39. <scope>compile</scope>
  40. </dependency>
  41. <dependency>
  42. <groupId>com.google.guava</groupId>
  43. <artifactId>guava</artifactId>
  44. <scope>compile</scope>
  45. </dependency>
  46. <dependency>
  47. <groupId>commons-cli</groupId>
  48. <artifactId>commons-cli</artifactId>
  49. <scope>compile</scope>
  50. </dependency>
  51. <dependency>
  52. <groupId>org.apache.commons</groupId>
  53. <artifactId>commons-math3</artifactId>
  54. <scope>compile</scope>
  55. </dependency>
  56. <dependency>
  57. <groupId>xmlenc</groupId>
  58. <artifactId>xmlenc</artifactId>
  59. <scope>compile</scope>
  60. </dependency>
  61. <dependency>
  62. <groupId>commons-httpclient</groupId>
  63. <artifactId>commons-httpclient</artifactId>
  64. <scope>compile</scope>
  65. </dependency>
  66. <dependency>
  67. <groupId>commons-codec</groupId>
  68. <artifactId>commons-codec</artifactId>
  69. <scope>compile</scope>
  70. </dependency>
  71. <dependency>
  72. <groupId>commons-io</groupId>
  73. <artifactId>commons-io</artifactId>
  74. <scope>compile</scope>
  75. </dependency>
  76. <dependency>
  77. <groupId>commons-net</groupId>
  78. <artifactId>commons-net</artifactId>
  79. <scope>compile</scope>
  80. </dependency>
  81. <dependency>
  82. <groupId>commons-collections</groupId>
  83. <artifactId>commons-collections</artifactId>
  84. <scope>compile</scope>
  85. </dependency>
  86. <dependency>
  87. <groupId>javax.servlet</groupId>
  88. <artifactId>servlet-api</artifactId>
  89. <scope>compile</scope>
  90. </dependency>
  91. <dependency>
  92. <groupId>org.mortbay.jetty</groupId>
  93. <artifactId>jetty</artifactId>
  94. <scope>compile</scope>
  95. </dependency>
  96. <dependency>
  97. <groupId>org.mortbay.jetty</groupId>
  98. <artifactId>jetty-util</artifactId>
  99. <scope>compile</scope>
  100. </dependency>
  101. <dependency>
  102. <groupId>javax.servlet.jsp</groupId>
  103. <artifactId>jsp-api</artifactId>
  104. <scope>runtime</scope>
  105. </dependency>
  106. <dependency>
  107. <groupId>com.sun.jersey</groupId>
  108. <artifactId>jersey-core</artifactId>
  109. <scope>compile</scope>
  110. </dependency>
  111. <dependency>
  112. <!-- Used, even though 'mvn dependency:analyze' doesn't find it -->
  113. <groupId>com.sun.jersey</groupId>
  114. <artifactId>jersey-json</artifactId>
  115. <scope>compile</scope>
  116. </dependency>
  117. <dependency>
  118. <groupId>com.sun.jersey</groupId>
  119. <artifactId>jersey-server</artifactId>
  120. <scope>compile</scope>
  121. </dependency>
  122. <dependency>
  123. <groupId>commons-logging</groupId>
  124. <artifactId>commons-logging</artifactId>
  125. <scope>compile</scope>
  126. </dependency>
  127. <dependency>
  128. <groupId>log4j</groupId>
  129. <artifactId>log4j</artifactId>
  130. <scope>compile</scope>
  131. </dependency>
  132. <dependency>
  133. <groupId>net.java.dev.jets3t</groupId>
  134. <artifactId>jets3t</artifactId>
  135. <scope>compile</scope>
  136. </dependency>
  137. <dependency>
  138. <groupId>junit</groupId>
  139. <artifactId>junit</artifactId>
  140. <scope>test</scope>
  141. </dependency>
  142. <dependency>
  143. <groupId>commons-lang</groupId>
  144. <artifactId>commons-lang</artifactId>
  145. <scope>compile</scope>
  146. </dependency>
  147. <dependency>
  148. <groupId>commons-configuration</groupId>
  149. <artifactId>commons-configuration</artifactId>
  150. <scope>compile</scope>
  151. </dependency>
  152. <dependency>
  153. <groupId>org.slf4j</groupId>
  154. <artifactId>slf4j-api</artifactId>
  155. <scope>compile</scope>
  156. </dependency>
  157. <dependency>
  158. <groupId>org.slf4j</groupId>
  159. <artifactId>slf4j-log4j12</artifactId>
  160. <scope>runtime</scope>
  161. </dependency>
  162. <dependency>
  163. <groupId>org.codehaus.jackson</groupId>
  164. <artifactId>jackson-core-asl</artifactId>
  165. <scope>compile</scope>
  166. </dependency>
  167. <dependency>
  168. <groupId>org.codehaus.jackson</groupId>
  169. <artifactId>jackson-mapper-asl</artifactId>
  170. <scope>compile</scope>
  171. </dependency>
  172. <dependency>
  173. <groupId>org.mockito</groupId>
  174. <artifactId>mockito-all</artifactId>
  175. <scope>test</scope>
  176. </dependency>
  177. <dependency>
  178. <groupId>org.apache.avro</groupId>
  179. <artifactId>avro</artifactId>
  180. <scope>compile</scope>
  181. </dependency>
  182. <dependency>
  183. <groupId>org.apache.ant</groupId>
  184. <artifactId>ant</artifactId>
  185. <scope>test</scope>
  186. </dependency>
  187. <dependency>
  188. <groupId>com.google.protobuf</groupId>
  189. <artifactId>protobuf-java</artifactId>
  190. <scope>compile</scope>
  191. </dependency>
  192. <dependency>
  193. <groupId>com.google.code.gson</groupId>
  194. <artifactId>gson</artifactId>
  195. </dependency>
  196. <dependency>
  197. <groupId>org.apache.hadoop</groupId>
  198. <artifactId>hadoop-auth</artifactId>
  199. <scope>compile</scope>
  200. </dependency>
  201. <dependency>
  202. <groupId>org.apache.hadoop</groupId>
  203. <artifactId>hadoop-auth</artifactId>
  204. <type>test-jar</type>
  205. <scope>test</scope>
  206. </dependency>
  207. <dependency>
  208. <groupId>org.apache.hadoop</groupId>
  209. <artifactId>hadoop-minikdc</artifactId>
  210. <scope>test</scope>
  211. </dependency>
  212. <dependency>
  213. <groupId>com.jcraft</groupId>
  214. <artifactId>jsch</artifactId>
  215. </dependency>
  216. <dependency>
  217. <groupId>com.google.code.findbugs</groupId>
  218. <artifactId>jsr305</artifactId>
  219. <scope>compile</scope>
  220. </dependency>
  221. <dependency>
  222. <groupId>org.apache.zookeeper</groupId>
  223. <artifactId>zookeeper</artifactId>
  224. <exclusions>
  225. <exclusion>
  226. <groupId>jline</groupId>
  227. <artifactId>jline</artifactId>
  228. </exclusion>
  229. <exclusion>
  230. <groupId>org.jboss.netty</groupId>
  231. <artifactId>netty</artifactId>
  232. </exclusion>
  233. <exclusion>
  234. <!-- otherwise seems to drag in junit 3.8.1 via jline -->
  235. <groupId>junit</groupId>
  236. <artifactId>junit</artifactId>
  237. </exclusion>
  238. <exclusion>
  239. <groupId>com.sun.jdmk</groupId>
  240. <artifactId>jmxtools</artifactId>
  241. </exclusion>
  242. <exclusion>
  243. <groupId>com.sun.jmx</groupId>
  244. <artifactId>jmxri</artifactId>
  245. </exclusion>
  246. </exclusions>
  247. </dependency>
  248. <dependency>
  249. <groupId>org.apache.zookeeper</groupId>
  250. <artifactId>zookeeper</artifactId>
  251. <type>test-jar</type>
  252. <scope>test</scope>
  253. </dependency>
  254. <dependency>
  255. <groupId>org.apache.commons</groupId>
  256. <artifactId>commons-compress</artifactId>
  257. </dependency>
  258. </dependencies>
  259. <build>
  260. <!--
  261. Include all files in src/main/resources. By default, do not apply property
  262. substitution (filtering=false), but do apply property substitution to
  263. common-version-info.properties (filtering=true). This will substitute the
  264. version information correctly, but prevent Maven from altering other files
  265. like core-default.xml.
  266. -->
  267. <resources>
  268. <resource>
  269. <directory>${basedir}/src/main/resources</directory>
  270. <excludes>
  271. <exclude>common-version-info.properties</exclude>
  272. </excludes>
  273. <filtering>false</filtering>
  274. </resource>
  275. <resource>
  276. <directory>${basedir}/src/main/resources</directory>
  277. <includes>
  278. <include>common-version-info.properties</include>
  279. </includes>
  280. <filtering>true</filtering>
  281. </resource>
  282. </resources>
  283. <plugins>
  284. <plugin>
  285. <groupId>org.apache.hadoop</groupId>
  286. <artifactId>hadoop-maven-plugins</artifactId>
  287. <executions>
  288. <execution>
  289. <id>version-info</id>
  290. <phase>generate-resources</phase>
  291. <goals>
  292. <goal>version-info</goal>
  293. </goals>
  294. <configuration>
  295. <source>
  296. <directory>${basedir}/src/main</directory>
  297. <includes>
  298. <include>java/**/*.java</include>
  299. <include>proto/**/*.proto</include>
  300. </includes>
  301. </source>
  302. </configuration>
  303. </execution>
  304. <execution>
  305. <id>compile-protoc</id>
  306. <phase>generate-sources</phase>
  307. <goals>
  308. <goal>protoc</goal>
  309. </goals>
  310. <configuration>
  311. <protocVersion>${protobuf.version}</protocVersion>
  312. <protocCommand>${protoc.path}</protocCommand>
  313. <imports>
  314. <param>${basedir}/src/main/proto</param>
  315. </imports>
  316. <source>
  317. <directory>${basedir}/src/main/proto</directory>
  318. <includes>
  319. <include>HAServiceProtocol.proto</include>
  320. <include>IpcConnectionContext.proto</include>
  321. <include>ProtocolInfo.proto</include>
  322. <include>RpcHeader.proto</include>
  323. <include>ZKFCProtocol.proto</include>
  324. <include>ProtobufRpcEngine.proto</include>
  325. <include>Security.proto</include>
  326. <include>GetUserMappingsProtocol.proto</include>
  327. <include>RefreshAuthorizationPolicyProtocol.proto</include>
  328. <include>RefreshUserMappingsProtocol.proto</include>
  329. <include>RefreshCallQueueProtocol.proto</include>
  330. <include>GenericRefreshProtocol.proto</include>
  331. </includes>
  332. </source>
  333. <output>${project.build.directory}/generated-sources/java</output>
  334. </configuration>
  335. </execution>
  336. <execution>
  337. <id>compile-test-protoc</id>
  338. <phase>generate-test-sources</phase>
  339. <goals>
  340. <goal>protoc</goal>
  341. </goals>
  342. <configuration>
  343. <protocVersion>${protobuf.version}</protocVersion>
  344. <protocCommand>${protoc.path}</protocCommand>
  345. <imports>
  346. <param>${basedir}/src/test/proto</param>
  347. </imports>
  348. <source>
  349. <directory>${basedir}/src/test/proto</directory>
  350. <includes>
  351. <include>test.proto</include>
  352. <include>test_rpc_service.proto</include>
  353. </includes>
  354. </source>
  355. <output>${project.build.directory}/generated-test-sources/java</output>
  356. </configuration>
  357. </execution>
  358. </executions>
  359. </plugin>
  360. <plugin>
  361. <groupId>org.apache.maven.plugins</groupId>
  362. <artifactId>maven-surefire-plugin</artifactId>
  363. <configuration>
  364. <systemPropertyVariables>
  365. <startKdc>${startKdc}</startKdc>
  366. <kdc.resource.dir>${kdc.resource.dir}</kdc.resource.dir>
  367. </systemPropertyVariables>
  368. <properties>
  369. <property>
  370. <name>listener</name>
  371. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  372. </property>
  373. </properties>
  374. </configuration>
  375. </plugin>
  376. <plugin>
  377. <groupId>org.apache.avro</groupId>
  378. <artifactId>avro-maven-plugin</artifactId>
  379. <executions>
  380. <execution>
  381. <id>generate-avro-test-sources</id>
  382. <phase>generate-test-sources</phase>
  383. <goals>
  384. <goal>schema</goal>
  385. </goals>
  386. </execution>
  387. </executions>
  388. <configuration>
  389. <testOutputDirectory>${project.build.directory}/generated-test-sources/java</testOutputDirectory>
  390. </configuration>
  391. </plugin>
  392. <plugin>
  393. <groupId>org.apache.maven.plugins</groupId>
  394. <artifactId>maven-antrun-plugin</artifactId>
  395. <executions>
  396. <execution>
  397. <id>create-log-dir</id>
  398. <phase>process-test-resources</phase>
  399. <goals>
  400. <goal>run</goal>
  401. </goals>
  402. <configuration>
  403. <target>
  404. <!--
  405. TODO: there are tests (TestLocalFileSystem#testCopy) that fail if data
  406. TODO: from a previous run is present
  407. -->
  408. <delete dir="${test.build.data}"/>
  409. <mkdir dir="${test.build.data}"/>
  410. <mkdir dir="${hadoop.log.dir}"/>
  411. <copy toDir="${project.build.directory}/test-classes">
  412. <fileset dir="${basedir}/src/main/conf"/>
  413. </copy>
  414. </target>
  415. </configuration>
  416. </execution>
  417. <execution>
  418. <id>copy-test-tarballs</id>
  419. <phase>process-test-resources</phase>
  420. <goals>
  421. <goal>run</goal>
  422. </goals>
  423. <configuration>
  424. <target>
  425. <copy toDir="${test.cache.data}">
  426. <fileset dir="${basedir}/src/test/java/org/apache/hadoop/fs">
  427. <include name="test-untar.tar"/>
  428. <include name="test-untar.tgz"/>
  429. </fileset>
  430. </copy>
  431. </target>
  432. </configuration>
  433. </execution>
  434. <execution>
  435. <phase>pre-site</phase>
  436. <goals>
  437. <goal>run</goal>
  438. </goals>
  439. <configuration>
  440. <tasks>
  441. <copy file="src/main/resources/core-default.xml" todir="src/site/resources"/>
  442. <copy file="src/main/xsl/configuration.xsl" todir="src/site/resources"/>
  443. </tasks>
  444. </configuration>
  445. </execution>
  446. </executions>
  447. </plugin>
  448. <plugin>
  449. <groupId>org.apache.rat</groupId>
  450. <artifactId>apache-rat-plugin</artifactId>
  451. <configuration>
  452. <excludes>
  453. <exclude>CHANGES.txt</exclude>
  454. <exclude>.idea/**</exclude>
  455. <exclude>src/main/conf/*</exclude>
  456. <exclude>src/main/docs/**</exclude>
  457. <exclude>dev-support/jdiff/**</exclude>
  458. <exclude>src/main/native/*</exclude>
  459. <exclude>src/main/native/config/*</exclude>
  460. <exclude>src/main/native/m4/*</exclude>
  461. <exclude>src/test/empty-file</exclude>
  462. <exclude>src/test/all-tests</exclude>
  463. <exclude>src/test/resources/kdc/ldif/users.ldif</exclude>
  464. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.h</exclude>
  465. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.c</exclude>
  466. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4_encoder.h</exclude>
  467. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc.h</exclude>
  468. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc.c</exclude>
  469. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4hc_encoder.h</exclude>
  470. <exclude>src/test/java/org/apache/hadoop/fs/test-untar.tgz</exclude>
  471. <exclude>src/test/resources/test.har/_SUCCESS</exclude>
  472. <exclude>src/test/resources/test.har/_index</exclude>
  473. <exclude>src/test/resources/test.har/_masterindex</exclude>
  474. <exclude>src/test/resources/test.har/part-0</exclude>
  475. <exclude>src/test/resources/javakeystoreprovider.password</exclude>
  476. </excludes>
  477. </configuration>
  478. </plugin>
  479. </plugins>
  480. </build>
  481. <profiles>
  482. <profile>
  483. <id>native</id>
  484. <activation>
  485. <activeByDefault>false</activeByDefault>
  486. </activation>
  487. <properties>
  488. <require.bzip2>false</require.bzip2>
  489. <snappy.prefix></snappy.prefix>
  490. <snappy.lib></snappy.lib>
  491. <snappy.include></snappy.include>
  492. <require.snappy>false</require.snappy>
  493. <openssl.prefix></openssl.prefix>
  494. <openssl.lib></openssl.lib>
  495. <openssl.include></openssl.include>
  496. <require.openssl>false</require.openssl>
  497. </properties>
  498. <build>
  499. <plugins>
  500. <plugin>
  501. <groupId>org.apache.maven.plugins</groupId>
  502. <artifactId>maven-enforcer-plugin</artifactId>
  503. <executions>
  504. <execution>
  505. <id>enforce-os</id>
  506. <goals>
  507. <goal>enforce</goal>
  508. </goals>
  509. <configuration>
  510. <rules>
  511. <requireOS>
  512. <family>mac</family>
  513. <family>unix</family>
  514. <message>native build only supported on Mac or Unix</message>
  515. </requireOS>
  516. </rules>
  517. <fail>true</fail>
  518. </configuration>
  519. </execution>
  520. </executions>
  521. </plugin>
  522. <plugin>
  523. <groupId>org.codehaus.mojo</groupId>
  524. <artifactId>native-maven-plugin</artifactId>
  525. <executions>
  526. <execution>
  527. <phase>compile</phase>
  528. <goals>
  529. <goal>javah</goal>
  530. </goals>
  531. <configuration>
  532. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  533. <javahClassNames>
  534. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  535. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  536. <javahClassName>org.apache.hadoop.io.compress.bzip2.Bzip2Compressor</javahClassName>
  537. <javahClassName>org.apache.hadoop.io.compress.bzip2.Bzip2Decompressor</javahClassName>
  538. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  539. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  540. <javahClassName>org.apache.hadoop.io.nativeio.SharedFileDescriptorFactory</javahClassName>
  541. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  542. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  543. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  544. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  545. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  546. <javahClassName>org.apache.hadoop.crypto.OpensslCipher</javahClassName>
  547. <javahClassName>org.apache.hadoop.crypto.random.OpensslSecureRandom</javahClassName>
  548. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  549. <javahClassName>org.apache.hadoop.net.unix.DomainSocket</javahClassName>
  550. <javahClassName>org.apache.hadoop.net.unix.DomainSocketWatcher</javahClassName>
  551. </javahClassNames>
  552. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  553. </configuration>
  554. </execution>
  555. </executions>
  556. </plugin>
  557. <plugin>
  558. <groupId>org.apache.maven.plugins</groupId>
  559. <artifactId>maven-antrun-plugin</artifactId>
  560. <executions>
  561. <execution>
  562. <id>make</id>
  563. <phase>compile</phase>
  564. <goals><goal>run</goal></goals>
  565. <configuration>
  566. <target>
  567. <exec executable="cmake" dir="${project.build.directory}/native" failonerror="true">
  568. <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}"/>
  569. </exec>
  570. <exec executable="make" dir="${project.build.directory}/native" failonerror="true">
  571. <arg line="VERBOSE=1"/>
  572. </exec>
  573. <!-- The second make is a workaround for HADOOP-9215. It can
  574. be removed when version 2.6 of cmake is no longer supported . -->
  575. <exec executable="make" dir="${project.build.directory}/native" failonerror="true"></exec>
  576. </target>
  577. </configuration>
  578. </execution>
  579. <execution>
  580. <id>native_tests</id>
  581. <phase>test</phase>
  582. <goals><goal>run</goal></goals>
  583. <configuration>
  584. <target>
  585. <exec executable="sh" failonerror="true" dir="${project.build.directory}/native">
  586. <arg value="-c"/>
  587. <arg value="[ x$SKIPTESTS = xtrue ] || ${project.build.directory}/native/test_bulk_crc32"/>
  588. <env key="SKIPTESTS" value="${skipTests}"/>
  589. </exec>
  590. </target>
  591. </configuration>
  592. </execution>
  593. </executions>
  594. </plugin>
  595. </plugins>
  596. </build>
  597. </profile>
  598. <profile>
  599. <id>native-win</id>
  600. <activation>
  601. <os>
  602. <family>Windows</family>
  603. </os>
  604. </activation>
  605. <properties>
  606. <snappy.prefix></snappy.prefix>
  607. <snappy.lib></snappy.lib>
  608. <snappy.include></snappy.include>
  609. <require.snappy>false</require.snappy>
  610. <bundle.snappy.in.bin>true</bundle.snappy.in.bin>
  611. <openssl.prefix></openssl.prefix>
  612. <openssl.lib></openssl.lib>
  613. <openssl.include></openssl.include>
  614. <require.openssl>false</require.openssl>
  615. <bundle.openssl.in.bin>true</bundle.openssl.in.bin>
  616. </properties>
  617. <build>
  618. <plugins>
  619. <plugin>
  620. <groupId>org.apache.maven.plugins</groupId>
  621. <artifactId>maven-enforcer-plugin</artifactId>
  622. <executions>
  623. <execution>
  624. <id>enforce-os</id>
  625. <goals>
  626. <goal>enforce</goal>
  627. </goals>
  628. <configuration>
  629. <rules>
  630. <requireOS>
  631. <family>windows</family>
  632. <message>native-win build only supported on Windows</message>
  633. </requireOS>
  634. </rules>
  635. <fail>true</fail>
  636. </configuration>
  637. </execution>
  638. </executions>
  639. </plugin>
  640. <plugin>
  641. <groupId>org.codehaus.mojo</groupId>
  642. <artifactId>native-maven-plugin</artifactId>
  643. <executions>
  644. <execution>
  645. <phase>compile</phase>
  646. <goals>
  647. <goal>javah</goal>
  648. </goals>
  649. <configuration>
  650. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  651. <javahClassNames>
  652. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  653. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  654. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  655. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  656. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  657. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  658. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  659. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  660. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  661. <javahClassName>org.apache.hadoop.crypto.OpensslCipher</javahClassName>
  662. <javahClassName>org.apache.hadoop.crypto.random.OpensslSecureRandom</javahClassName>
  663. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  664. </javahClassNames>
  665. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  666. </configuration>
  667. </execution>
  668. </executions>
  669. </plugin>
  670. <plugin>
  671. <groupId>org.codehaus.mojo</groupId>
  672. <artifactId>exec-maven-plugin</artifactId>
  673. <executions>
  674. <execution>
  675. <id>compile-ms-winutils</id>
  676. <phase>compile</phase>
  677. <goals>
  678. <goal>exec</goal>
  679. </goals>
  680. <configuration>
  681. <executable>msbuild</executable>
  682. <arguments>
  683. <argument>${basedir}/src/main/winutils/winutils.sln</argument>
  684. <argument>/nologo</argument>
  685. <argument>/p:Configuration=Release</argument>
  686. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  687. </arguments>
  688. </configuration>
  689. </execution>
  690. <execution>
  691. <id>compile-ms-native-dll</id>
  692. <phase>compile</phase>
  693. <goals>
  694. <goal>exec</goal>
  695. </goals>
  696. <configuration>
  697. <executable>msbuild</executable>
  698. <arguments>
  699. <argument>${basedir}/src/main/native/native.sln</argument>
  700. <argument>/nologo</argument>
  701. <argument>/p:Configuration=Release</argument>
  702. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  703. <argument>/p:CustomSnappyPrefix=${snappy.prefix}</argument>
  704. <argument>/p:CustomSnappyLib=${snappy.lib}</argument>
  705. <argument>/p:CustomSnappyInclude=${snappy.include}</argument>
  706. <argument>/p:RequireSnappy=${require.snappy}</argument>
  707. <argument>/p:CustomOpensslPrefix=${openssl.prefix}</argument>
  708. <argument>/p:CustomOpensslLib=${openssl.lib}</argument>
  709. <argument>/p:CustomOpensslInclude=${openssl.include}</argument>
  710. <argument>/p:RequireOpenssl=${require.openssl}</argument>
  711. </arguments>
  712. </configuration>
  713. </execution>
  714. </executions>
  715. </plugin>
  716. </plugins>
  717. </build>
  718. </profile>
  719. <!-- profile that starts ApacheDS KDC server -->
  720. <profile>
  721. <id>startKdc</id>
  722. <activation>
  723. <property>
  724. <name>startKdc</name>
  725. <value>true</value>
  726. </property>
  727. </activation>
  728. <build>
  729. <plugins>
  730. <plugin>
  731. <groupId>org.apache.maven.plugins</groupId>
  732. <artifactId>maven-enforcer-plugin</artifactId>
  733. <executions>
  734. <execution>
  735. <id>enforce-os</id>
  736. <goals>
  737. <goal>enforce</goal>
  738. </goals>
  739. <configuration>
  740. <rules>
  741. <!-- At present supports Mac and Unix OS family -->
  742. <requireOS>
  743. <family>mac</family>
  744. <family>unix</family>
  745. </requireOS>
  746. </rules>
  747. <fail>true</fail>
  748. </configuration>
  749. </execution>
  750. </executions>
  751. </plugin>
  752. <plugin>
  753. <groupId>org.apache.maven.plugins</groupId>
  754. <artifactId>maven-antrun-plugin</artifactId>
  755. <executions>
  756. <execution>
  757. <id>kdc</id>
  758. <phase>compile</phase>
  759. <goals>
  760. <goal>run</goal>
  761. </goals>
  762. <configuration>
  763. <target>
  764. <chmod file="${kdc.resource.dir}/killKdc.sh" perm="775" />
  765. <exec dir="${kdc.resource.dir}" executable= "./killKdc.sh" />
  766. <mkdir dir="${project.build.directory}/test-classes/kdc/downloads"/>
  767. <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"/>
  768. <untar src="${project.build.directory}/test-classes/kdc/downloads/apacheds-1.5.7.tar.gz" dest="${project.build.directory}/test-classes/kdc" compression="gzip" />
  769. <copy file="${kdc.resource.dir}/server.xml" toDir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/conf"/>
  770. <mkdir dir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/ldif"/>
  771. <copy toDir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/ldif">
  772. <fileset dir="${kdc.resource.dir}/ldif"/>
  773. </copy>
  774. <chmod file="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/apacheds.sh" perm="775" />
  775. <exec dir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/" executable="./apacheds.sh" spawn="true"/>
  776. </target>
  777. </configuration>
  778. </execution>
  779. <!-- On completion of graceful test phase: closes the ApacheDS KDC server -->
  780. <execution>
  781. <id>killKdc</id>
  782. <phase>test</phase>
  783. <goals>
  784. <goal>run</goal>
  785. </goals>
  786. <configuration>
  787. <target>
  788. <chmod file="${kdc.resource.dir}/killKdc.sh" perm="775" />
  789. <exec dir="${kdc.resource.dir}" executable= "./killKdc.sh" />
  790. </target>
  791. </configuration>
  792. </execution>
  793. </executions>
  794. </plugin>
  795. </plugins>
  796. </build>
  797. </profile>
  798. <profile>
  799. <id>parallel-tests</id>
  800. <build>
  801. <plugins>
  802. <plugin>
  803. <groupId>org.apache.maven.plugins</groupId>
  804. <artifactId>maven-surefire-plugin</artifactId>
  805. <configuration>
  806. <forkCount>${testsThreadCount}</forkCount>
  807. <argLine>-Xmx1024m -XX:+HeapDumpOnOutOfMemoryError -DminiClusterDedicatedDirs=true</argLine>
  808. </configuration>
  809. </plugin>
  810. </plugins>
  811. </build>
  812. </profile>
  813. </profiles>
  814. </project>