pom.xml 30 KB

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