pom.xml 33 KB

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