pom.xml 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License. See accompanying LICENSE file.
  12. -->
  13. <project xmlns="http://maven.apache.org/POM/4.0.0"
  14. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  15. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
  16. 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. <tasks>
  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. </tasks>
  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. </plugins>
  505. </build>
  506. <profiles>
  507. <profile>
  508. <id>native</id>
  509. <activation>
  510. <activeByDefault>false</activeByDefault>
  511. </activation>
  512. <properties>
  513. <require.bzip2>false</require.bzip2>
  514. <snappy.prefix></snappy.prefix>
  515. <snappy.lib></snappy.lib>
  516. <snappy.include></snappy.include>
  517. <require.snappy>false</require.snappy>
  518. <openssl.prefix></openssl.prefix>
  519. <openssl.lib></openssl.lib>
  520. <openssl.include></openssl.include>
  521. <require.openssl>false</require.openssl>
  522. <runningWithNative>true</runningWithNative>
  523. <bundle.openssl.in.bin>false</bundle.openssl.in.bin>
  524. <extra.libhadoop.rpath></extra.libhadoop.rpath>
  525. </properties>
  526. <build>
  527. <plugins>
  528. <plugin>
  529. <groupId>org.apache.maven.plugins</groupId>
  530. <artifactId>maven-enforcer-plugin</artifactId>
  531. <executions>
  532. <execution>
  533. <id>enforce-os</id>
  534. <goals>
  535. <goal>enforce</goal>
  536. </goals>
  537. <configuration>
  538. <rules>
  539. <requireOS>
  540. <family>mac</family>
  541. <family>unix</family>
  542. <message>native build only supported on Mac or Unix</message>
  543. </requireOS>
  544. </rules>
  545. <fail>true</fail>
  546. </configuration>
  547. </execution>
  548. </executions>
  549. </plugin>
  550. <plugin>
  551. <groupId>org.codehaus.mojo</groupId>
  552. <artifactId>native-maven-plugin</artifactId>
  553. <executions>
  554. <execution>
  555. <phase>compile</phase>
  556. <goals>
  557. <goal>javah</goal>
  558. </goals>
  559. <configuration>
  560. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  561. <javahClassNames>
  562. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  563. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  564. <javahClassName>org.apache.hadoop.io.compress.bzip2.Bzip2Compressor</javahClassName>
  565. <javahClassName>org.apache.hadoop.io.compress.bzip2.Bzip2Decompressor</javahClassName>
  566. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  567. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  568. <javahClassName>org.apache.hadoop.io.nativeio.SharedFileDescriptorFactory</javahClassName>
  569. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  570. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  571. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  572. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  573. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  574. <javahClassName>org.apache.hadoop.crypto.OpensslCipher</javahClassName>
  575. <javahClassName>org.apache.hadoop.crypto.random.OpensslSecureRandom</javahClassName>
  576. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  577. <javahClassName>org.apache.hadoop.net.unix.DomainSocket</javahClassName>
  578. <javahClassName>org.apache.hadoop.net.unix.DomainSocketWatcher</javahClassName>
  579. </javahClassNames>
  580. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  581. </configuration>
  582. </execution>
  583. </executions>
  584. </plugin>
  585. <plugin>
  586. <groupId>org.apache.maven.plugins</groupId>
  587. <artifactId>maven-antrun-plugin</artifactId>
  588. <executions>
  589. <execution>
  590. <id>make</id>
  591. <phase>compile</phase>
  592. <goals><goal>run</goal></goals>
  593. <configuration>
  594. <target>
  595. <exec executable="cmake" dir="${project.build.directory}/native" failonerror="true">
  596. <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}"/>
  597. </exec>
  598. <exec executable="make" dir="${project.build.directory}/native" failonerror="true">
  599. <arg line="VERBOSE=1"/>
  600. </exec>
  601. <!-- The second make is a workaround for HADOOP-9215. It can
  602. be removed when version 2.6 of cmake is no longer supported . -->
  603. <exec executable="make" dir="${project.build.directory}/native" failonerror="true"></exec>
  604. </target>
  605. </configuration>
  606. </execution>
  607. <execution>
  608. <id>native_tests</id>
  609. <phase>test</phase>
  610. <goals><goal>run</goal></goals>
  611. <configuration>
  612. <target>
  613. <exec executable="sh" failonerror="true" dir="${project.build.directory}/native">
  614. <arg value="-c"/>
  615. <arg value="[ x$SKIPTESTS = xtrue ] || ${project.build.directory}/native/test_bulk_crc32"/>
  616. <env key="SKIPTESTS" value="${skipTests}"/>
  617. </exec>
  618. </target>
  619. </configuration>
  620. </execution>
  621. </executions>
  622. </plugin>
  623. </plugins>
  624. </build>
  625. </profile>
  626. <profile>
  627. <id>native-win</id>
  628. <activation>
  629. <os>
  630. <family>Windows</family>
  631. </os>
  632. </activation>
  633. <properties>
  634. <snappy.prefix></snappy.prefix>
  635. <snappy.lib></snappy.lib>
  636. <snappy.include></snappy.include>
  637. <require.snappy>false</require.snappy>
  638. <bundle.snappy.in.bin>true</bundle.snappy.in.bin>
  639. <openssl.prefix></openssl.prefix>
  640. <openssl.lib></openssl.lib>
  641. <openssl.include></openssl.include>
  642. <require.openssl>false</require.openssl>
  643. <runningWithNative>true</runningWithNative>
  644. <bundle.openssl.in.bin>false</bundle.openssl.in.bin>
  645. </properties>
  646. <build>
  647. <plugins>
  648. <plugin>
  649. <groupId>org.apache.maven.plugins</groupId>
  650. <artifactId>maven-enforcer-plugin</artifactId>
  651. <executions>
  652. <execution>
  653. <id>enforce-os</id>
  654. <goals>
  655. <goal>enforce</goal>
  656. </goals>
  657. <configuration>
  658. <rules>
  659. <requireOS>
  660. <family>windows</family>
  661. <message>native-win build only supported on Windows</message>
  662. </requireOS>
  663. </rules>
  664. <fail>true</fail>
  665. </configuration>
  666. </execution>
  667. </executions>
  668. </plugin>
  669. <plugin>
  670. <groupId>org.codehaus.mojo</groupId>
  671. <artifactId>native-maven-plugin</artifactId>
  672. <executions>
  673. <execution>
  674. <phase>compile</phase>
  675. <goals>
  676. <goal>javah</goal>
  677. </goals>
  678. <configuration>
  679. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  680. <javahClassNames>
  681. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  682. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  683. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  684. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  685. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  686. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  687. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  688. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  689. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  690. <javahClassName>org.apache.hadoop.crypto.OpensslCipher</javahClassName>
  691. <javahClassName>org.apache.hadoop.crypto.random.OpensslSecureRandom</javahClassName>
  692. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  693. </javahClassNames>
  694. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  695. </configuration>
  696. </execution>
  697. </executions>
  698. </plugin>
  699. <plugin>
  700. <groupId>org.codehaus.mojo</groupId>
  701. <artifactId>exec-maven-plugin</artifactId>
  702. <executions>
  703. <execution>
  704. <id>compile-ms-winutils</id>
  705. <phase>compile</phase>
  706. <goals>
  707. <goal>exec</goal>
  708. </goals>
  709. <configuration>
  710. <executable>msbuild</executable>
  711. <arguments>
  712. <argument>${basedir}/src/main/winutils/winutils.sln</argument>
  713. <argument>/nologo</argument>
  714. <argument>/p:Configuration=Release</argument>
  715. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  716. <argument>/p:IntermediateOutputPath=${project.build.directory}/winutils/</argument>
  717. <argument>/p:WsceConfigDir=${wsce.config.dir}</argument>
  718. <argument>/p:WsceConfigFile=${wsce.config.file}</argument>
  719. </arguments>
  720. </configuration>
  721. </execution>
  722. <execution>
  723. <id>compile-ms-native-dll</id>
  724. <phase>compile</phase>
  725. <goals>
  726. <goal>exec</goal>
  727. </goals>
  728. <configuration>
  729. <executable>msbuild</executable>
  730. <arguments>
  731. <argument>${basedir}/src/main/native/native.sln</argument>
  732. <argument>/nologo</argument>
  733. <argument>/p:Configuration=Release</argument>
  734. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  735. <argument>/p:CustomSnappyPrefix=${snappy.prefix}</argument>
  736. <argument>/p:CustomSnappyLib=${snappy.lib}</argument>
  737. <argument>/p:CustomSnappyInclude=${snappy.include}</argument>
  738. <argument>/p:RequireSnappy=${require.snappy}</argument>
  739. <argument>/p:CustomOpensslPrefix=${openssl.prefix}</argument>
  740. <argument>/p:CustomOpensslLib=${openssl.lib}</argument>
  741. <argument>/p:CustomOpensslInclude=${openssl.include}</argument>
  742. <argument>/p:RequireOpenssl=${require.openssl}</argument>
  743. </arguments>
  744. </configuration>
  745. </execution>
  746. </executions>
  747. </plugin>
  748. </plugins>
  749. </build>
  750. </profile>
  751. <!-- profile that starts ApacheDS KDC server -->
  752. <profile>
  753. <id>startKdc</id>
  754. <activation>
  755. <property>
  756. <name>startKdc</name>
  757. <value>true</value>
  758. </property>
  759. </activation>
  760. <build>
  761. <plugins>
  762. <plugin>
  763. <groupId>org.apache.maven.plugins</groupId>
  764. <artifactId>maven-enforcer-plugin</artifactId>
  765. <executions>
  766. <execution>
  767. <id>enforce-os</id>
  768. <goals>
  769. <goal>enforce</goal>
  770. </goals>
  771. <configuration>
  772. <rules>
  773. <!-- At present supports Mac and Unix OS family -->
  774. <requireOS>
  775. <family>mac</family>
  776. <family>unix</family>
  777. </requireOS>
  778. </rules>
  779. <fail>true</fail>
  780. </configuration>
  781. </execution>
  782. </executions>
  783. </plugin>
  784. <plugin>
  785. <groupId>org.apache.maven.plugins</groupId>
  786. <artifactId>maven-antrun-plugin</artifactId>
  787. <executions>
  788. <execution>
  789. <id>kdc</id>
  790. <phase>compile</phase>
  791. <goals>
  792. <goal>run</goal>
  793. </goals>
  794. <configuration>
  795. <target>
  796. <chmod file="${kdc.resource.dir}/killKdc.sh" perm="775" />
  797. <exec dir="${kdc.resource.dir}" executable= "./killKdc.sh" />
  798. <mkdir dir="${project.build.directory}/test-classes/kdc/downloads"/>
  799. <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"/>
  800. <untar src="${project.build.directory}/test-classes/kdc/downloads/apacheds-1.5.7.tar.gz" dest="${project.build.directory}/test-classes/kdc" compression="gzip" />
  801. <copy file="${kdc.resource.dir}/server.xml" toDir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/conf"/>
  802. <mkdir dir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/ldif"/>
  803. <copy toDir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/ldif">
  804. <fileset dir="${kdc.resource.dir}/ldif"/>
  805. </copy>
  806. <chmod file="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/apacheds.sh" perm="775" />
  807. <exec dir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/" executable="./apacheds.sh" spawn="true"/>
  808. </target>
  809. </configuration>
  810. </execution>
  811. <!-- On completion of graceful test phase: closes the ApacheDS KDC server -->
  812. <execution>
  813. <id>killKdc</id>
  814. <phase>test</phase>
  815. <goals>
  816. <goal>run</goal>
  817. </goals>
  818. <configuration>
  819. <target>
  820. <chmod file="${kdc.resource.dir}/killKdc.sh" perm="775" />
  821. <exec dir="${kdc.resource.dir}" executable= "./killKdc.sh" />
  822. </target>
  823. </configuration>
  824. </execution>
  825. </executions>
  826. </plugin>
  827. </plugins>
  828. </build>
  829. </profile>
  830. <profile>
  831. <id>parallel-tests</id>
  832. <build>
  833. <plugins>
  834. <plugin>
  835. <groupId>org.apache.maven.plugins</groupId>
  836. <artifactId>maven-surefire-plugin</artifactId>
  837. <configuration>
  838. <forkCount>${testsThreadCount}</forkCount>
  839. <argLine>-Xmx1024m -XX:+HeapDumpOnOutOfMemoryError -DminiClusterDedicatedDirs=true</argLine>
  840. </configuration>
  841. </plugin>
  842. </plugins>
  843. </build>
  844. </profile>
  845. </profiles>
  846. </project>