pom.xml 30 KB

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