pom.xml 30 KB

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