pom.xml 30 KB

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