pom.xml 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753
  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. <version>3.4.2</version>
  215. <exclusions>
  216. <exclusion>
  217. <groupId>jline</groupId>
  218. <artifactId>jline</artifactId>
  219. </exclusion>
  220. <exclusion>
  221. <groupId>org.jboss.netty</groupId>
  222. <artifactId>netty</artifactId>
  223. </exclusion>
  224. <exclusion>
  225. <!-- otherwise seems to drag in junit 3.8.1 via jline -->
  226. <groupId>junit</groupId>
  227. <artifactId>junit</artifactId>
  228. </exclusion>
  229. <exclusion>
  230. <groupId>com.sun.jdmk</groupId>
  231. <artifactId>jmxtools</artifactId>
  232. </exclusion>
  233. <exclusion>
  234. <groupId>com.sun.jmx</groupId>
  235. <artifactId>jmxri</artifactId>
  236. </exclusion>
  237. </exclusions>
  238. </dependency>
  239. <dependency>
  240. <groupId>org.apache.zookeeper</groupId>
  241. <artifactId>zookeeper</artifactId>
  242. <version>3.4.2</version>
  243. <type>test-jar</type>
  244. <scope>test</scope>
  245. </dependency>
  246. <dependency>
  247. <groupId>org.apache.commons</groupId>
  248. <artifactId>commons-compress</artifactId>
  249. <version>1.4</version>
  250. </dependency>
  251. </dependencies>
  252. <build>
  253. <!--
  254. Include all files in src/main/resources. By default, do not apply property
  255. substitution (filtering=false), but do apply property substitution to
  256. common-version-info.properties (filtering=true). This will substitute the
  257. version information correctly, but prevent Maven from altering other files
  258. like core-default.xml.
  259. -->
  260. <resources>
  261. <resource>
  262. <directory>${basedir}/src/main/resources</directory>
  263. <excludes>
  264. <exclude>common-version-info.properties</exclude>
  265. </excludes>
  266. <filtering>false</filtering>
  267. </resource>
  268. <resource>
  269. <directory>${basedir}/src/main/resources</directory>
  270. <includes>
  271. <include>common-version-info.properties</include>
  272. </includes>
  273. <filtering>true</filtering>
  274. </resource>
  275. </resources>
  276. <plugins>
  277. <plugin>
  278. <groupId>org.apache.hadoop</groupId>
  279. <artifactId>hadoop-maven-plugins</artifactId>
  280. <executions>
  281. <execution>
  282. <id>version-info</id>
  283. <phase>generate-resources</phase>
  284. <goals>
  285. <goal>version-info</goal>
  286. </goals>
  287. <configuration>
  288. <source>
  289. <directory>${basedir}/src/main</directory>
  290. <includes>
  291. <include>java/**/*.java</include>
  292. <include>proto/**/*.proto</include>
  293. </includes>
  294. </source>
  295. </configuration>
  296. </execution>
  297. <execution>
  298. <id>compile-protoc</id>
  299. <phase>generate-sources</phase>
  300. <goals>
  301. <goal>protoc</goal>
  302. </goals>
  303. <configuration>
  304. <imports>
  305. <param>${basedir}/src/main/proto</param>
  306. </imports>
  307. <source>
  308. <directory>${basedir}/src/main/proto</directory>
  309. <includes>
  310. <include>HAServiceProtocol.proto</include>
  311. <include>IpcConnectionContext.proto</include>
  312. <include>ProtocolInfo.proto</include>
  313. <include>RpcHeader.proto</include>
  314. <include>ZKFCProtocol.proto</include>
  315. <include>ProtobufRpcEngine.proto</include>
  316. <include>Security.proto</include>
  317. </includes>
  318. </source>
  319. <output>${project.build.directory}/generated-sources/java</output>
  320. </configuration>
  321. </execution>
  322. <execution>
  323. <id>compile-test-protoc</id>
  324. <phase>generate-test-sources</phase>
  325. <goals>
  326. <goal>protoc</goal>
  327. </goals>
  328. <configuration>
  329. <imports>
  330. <param>${basedir}/src/test/proto</param>
  331. </imports>
  332. <source>
  333. <directory>${basedir}/src/test/proto</directory>
  334. <includes>
  335. <include>test.proto</include>
  336. <include>test_rpc_service.proto</include>
  337. </includes>
  338. </source>
  339. <output>${project.build.directory}/generated-test-sources/java</output>
  340. </configuration>
  341. </execution>
  342. </executions>
  343. </plugin>
  344. <plugin>
  345. <groupId>org.apache.maven.plugins</groupId>
  346. <artifactId>maven-surefire-plugin</artifactId>
  347. <configuration>
  348. <systemPropertyVariables>
  349. <startKdc>${startKdc}</startKdc>
  350. <kdc.resource.dir>${kdc.resource.dir}</kdc.resource.dir>
  351. </systemPropertyVariables>
  352. <properties>
  353. <property>
  354. <name>listener</name>
  355. <value>org.apache.hadoop.test.TimedOutTestsListener</value>
  356. </property>
  357. </properties>
  358. </configuration>
  359. </plugin>
  360. <plugin>
  361. <groupId>org.apache.avro</groupId>
  362. <artifactId>avro-maven-plugin</artifactId>
  363. <executions>
  364. <execution>
  365. <id>generate-avro-test-sources</id>
  366. <phase>generate-test-sources</phase>
  367. <goals>
  368. <goal>schema</goal>
  369. </goals>
  370. </execution>
  371. </executions>
  372. <configuration>
  373. <testOutputDirectory>${project.build.directory}/generated-test-sources/java</testOutputDirectory>
  374. </configuration>
  375. </plugin>
  376. <plugin>
  377. <groupId>org.apache.maven.plugins</groupId>
  378. <artifactId>maven-antrun-plugin</artifactId>
  379. <executions>
  380. <execution>
  381. <id>create-log-dir</id>
  382. <phase>process-test-resources</phase>
  383. <goals>
  384. <goal>run</goal>
  385. </goals>
  386. <configuration>
  387. <target>
  388. <!--
  389. TODO: there are tests (TestLocalFileSystem#testCopy) that fail if data
  390. TODO: from a previous run is present
  391. -->
  392. <delete dir="${test.build.data}"/>
  393. <mkdir dir="${test.build.data}"/>
  394. <mkdir dir="${hadoop.log.dir}"/>
  395. <copy toDir="${project.build.directory}/test-classes">
  396. <fileset dir="${basedir}/src/main/conf"/>
  397. </copy>
  398. </target>
  399. </configuration>
  400. </execution>
  401. <execution>
  402. <id>copy-test-tarballs</id>
  403. <phase>process-test-resources</phase>
  404. <goals>
  405. <goal>run</goal>
  406. </goals>
  407. <configuration>
  408. <target>
  409. <copy toDir="${test.cache.data}">
  410. <fileset dir="${basedir}/src/test/java/org/apache/hadoop/fs">
  411. <include name="test-untar.tar"/>
  412. <include name="test-untar.tgz"/>
  413. </fileset>
  414. </copy>
  415. </target>
  416. </configuration>
  417. </execution>
  418. <execution>
  419. <phase>pre-site</phase>
  420. <goals>
  421. <goal>run</goal>
  422. </goals>
  423. <configuration>
  424. <tasks>
  425. <copy file="src/main/resources/core-default.xml" todir="src/site/resources"/>
  426. <copy file="src/main/xsl/configuration.xsl" todir="src/site/resources"/>
  427. </tasks>
  428. </configuration>
  429. </execution>
  430. </executions>
  431. </plugin>
  432. <plugin>
  433. <groupId>org.apache.rat</groupId>
  434. <artifactId>apache-rat-plugin</artifactId>
  435. <configuration>
  436. <excludes>
  437. <exclude>CHANGES.txt</exclude>
  438. <exclude>.idea/**</exclude>
  439. <exclude>src/main/conf/*</exclude>
  440. <exclude>src/main/docs/**</exclude>
  441. <exclude>dev-support/jdiff/**</exclude>
  442. <exclude>src/main/native/*</exclude>
  443. <exclude>src/main/native/config/*</exclude>
  444. <exclude>src/main/native/m4/*</exclude>
  445. <exclude>src/test/empty-file</exclude>
  446. <exclude>src/test/all-tests</exclude>
  447. <exclude>src/test/resources/kdc/ldif/users.ldif</exclude>
  448. <exclude>src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.c</exclude>
  449. <exclude>src/test/java/org/apache/hadoop/fs/test-untar.tgz</exclude>
  450. </excludes>
  451. </configuration>
  452. </plugin>
  453. </plugins>
  454. </build>
  455. <profiles>
  456. <profile>
  457. <id>native</id>
  458. <activation>
  459. <activeByDefault>false</activeByDefault>
  460. </activation>
  461. <properties>
  462. <require.bzip2>false</require.bzip2>
  463. <snappy.prefix></snappy.prefix>
  464. <snappy.lib></snappy.lib>
  465. <snappy.include></snappy.include>
  466. <require.snappy>false</require.snappy>
  467. </properties>
  468. <build>
  469. <plugins>
  470. <plugin>
  471. <groupId>org.apache.maven.plugins</groupId>
  472. <artifactId>maven-enforcer-plugin</artifactId>
  473. <executions>
  474. <execution>
  475. <id>enforce-os</id>
  476. <goals>
  477. <goal>enforce</goal>
  478. </goals>
  479. <configuration>
  480. <rules>
  481. <requireOS>
  482. <family>mac</family>
  483. <family>unix</family>
  484. <message>native build only supported on Mac or Unix</message>
  485. </requireOS>
  486. </rules>
  487. <fail>true</fail>
  488. </configuration>
  489. </execution>
  490. </executions>
  491. </plugin>
  492. <plugin>
  493. <groupId>org.codehaus.mojo</groupId>
  494. <artifactId>native-maven-plugin</artifactId>
  495. <executions>
  496. <execution>
  497. <phase>compile</phase>
  498. <goals>
  499. <goal>javah</goal>
  500. </goals>
  501. <configuration>
  502. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  503. <javahClassNames>
  504. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  505. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  506. <javahClassName>org.apache.hadoop.io.compress.bzip2.Bzip2Compressor</javahClassName>
  507. <javahClassName>org.apache.hadoop.io.compress.bzip2.Bzip2Decompressor</javahClassName>
  508. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  509. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  510. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  511. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  512. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  513. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  514. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  515. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  516. </javahClassNames>
  517. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  518. </configuration>
  519. </execution>
  520. </executions>
  521. </plugin>
  522. <plugin>
  523. <groupId>org.apache.maven.plugins</groupId>
  524. <artifactId>maven-antrun-plugin</artifactId>
  525. <executions>
  526. <execution>
  527. <id>make</id>
  528. <phase>compile</phase>
  529. <goals><goal>run</goal></goals>
  530. <configuration>
  531. <target>
  532. <exec executable="cmake" dir="${project.build.directory}/native" failonerror="true">
  533. <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}"/>
  534. </exec>
  535. <exec executable="make" dir="${project.build.directory}/native" failonerror="true">
  536. <arg line="VERBOSE=1"/>
  537. </exec>
  538. <!-- The second make is a workaround for HADOOP-9215. It can
  539. be removed when version 2.6 of cmake is no longer supported . -->
  540. <exec executable="make" dir="${project.build.directory}/native" failonerror="true"></exec>
  541. </target>
  542. </configuration>
  543. </execution>
  544. <execution>
  545. <id>native_tests</id>
  546. <phase>test</phase>
  547. <goals><goal>run</goal></goals>
  548. <configuration>
  549. <target>
  550. <exec executable="sh" failonerror="true" dir="${project.build.directory}/native">
  551. <arg value="-c"/>
  552. <arg value="[ x$SKIPTESTS = xtrue ] || ${project.build.directory}/native/test_bulk_crc32"/>
  553. <env key="SKIPTESTS" value="${skipTests}"/>
  554. </exec>
  555. </target>
  556. </configuration>
  557. </execution>
  558. </executions>
  559. </plugin>
  560. </plugins>
  561. </build>
  562. </profile>
  563. <profile>
  564. <id>native-win</id>
  565. <activation>
  566. <activeByDefault>false</activeByDefault>
  567. </activation>
  568. <build>
  569. <plugins>
  570. <plugin>
  571. <groupId>org.apache.maven.plugins</groupId>
  572. <artifactId>maven-enforcer-plugin</artifactId>
  573. <executions>
  574. <execution>
  575. <id>enforce-os</id>
  576. <goals>
  577. <goal>enforce</goal>
  578. </goals>
  579. <configuration>
  580. <rules>
  581. <requireOS>
  582. <family>windows</family>
  583. <message>native-win build only supported on Windows</message>
  584. </requireOS>
  585. </rules>
  586. <fail>true</fail>
  587. </configuration>
  588. </execution>
  589. </executions>
  590. </plugin>
  591. <plugin>
  592. <groupId>org.codehaus.mojo</groupId>
  593. <artifactId>native-maven-plugin</artifactId>
  594. <executions>
  595. <execution>
  596. <phase>compile</phase>
  597. <goals>
  598. <goal>javah</goal>
  599. </goals>
  600. <configuration>
  601. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  602. <javahClassNames>
  603. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  604. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  605. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  606. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  607. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  608. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  609. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  610. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  611. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  612. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  613. </javahClassNames>
  614. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  615. </configuration>
  616. </execution>
  617. </executions>
  618. </plugin>
  619. <plugin>
  620. <groupId>org.codehaus.mojo</groupId>
  621. <artifactId>exec-maven-plugin</artifactId>
  622. <executions>
  623. <execution>
  624. <id>compile-ms-winutils</id>
  625. <phase>compile</phase>
  626. <goals>
  627. <goal>exec</goal>
  628. </goals>
  629. <configuration>
  630. <executable>msbuild</executable>
  631. <arguments>
  632. <argument>${basedir}/src/main/winutils/winutils.sln</argument>
  633. <argument>/nologo</argument>
  634. <argument>/p:Configuration=Release</argument>
  635. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  636. </arguments>
  637. </configuration>
  638. </execution>
  639. <execution>
  640. <id>compile-ms-native-dll</id>
  641. <phase>compile</phase>
  642. <goals>
  643. <goal>exec</goal>
  644. </goals>
  645. <configuration>
  646. <executable>msbuild</executable>
  647. <arguments>
  648. <argument>${basedir}/src/main/native/native.sln</argument>
  649. <argument>/nologo</argument>
  650. <argument>/p:Configuration=Release</argument>
  651. <argument>/p:OutDir=${project.build.directory}/bin/</argument>
  652. </arguments>
  653. </configuration>
  654. </execution>
  655. </executions>
  656. </plugin>
  657. </plugins>
  658. </build>
  659. </profile>
  660. <!-- profile that starts ApacheDS KDC server -->
  661. <profile>
  662. <id>startKdc</id>
  663. <activation>
  664. <property>
  665. <name>startKdc</name>
  666. <value>true</value>
  667. </property>
  668. </activation>
  669. <build>
  670. <plugins>
  671. <plugin>
  672. <groupId>org.apache.maven.plugins</groupId>
  673. <artifactId>maven-enforcer-plugin</artifactId>
  674. <executions>
  675. <execution>
  676. <id>enforce-os</id>
  677. <goals>
  678. <goal>enforce</goal>
  679. </goals>
  680. <configuration>
  681. <rules>
  682. <!-- At present supports Mac and Unix OS family -->
  683. <requireOS>
  684. <family>mac</family>
  685. <family>unix</family>
  686. </requireOS>
  687. </rules>
  688. <fail>true</fail>
  689. </configuration>
  690. </execution>
  691. </executions>
  692. </plugin>
  693. <plugin>
  694. <groupId>org.apache.maven.plugins</groupId>
  695. <artifactId>maven-antrun-plugin</artifactId>
  696. <executions>
  697. <execution>
  698. <id>kdc</id>
  699. <phase>compile</phase>
  700. <goals>
  701. <goal>run</goal>
  702. </goals>
  703. <configuration>
  704. <target>
  705. <chmod file="${kdc.resource.dir}/killKdc.sh" perm="775" />
  706. <exec dir="${kdc.resource.dir}" executable= "./killKdc.sh" />
  707. <mkdir dir="${project.build.directory}/test-classes/kdc/downloads"/>
  708. <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"/>
  709. <untar src="${project.build.directory}/test-classes/kdc/downloads/apacheds-1.5.7.tar.gz" dest="${project.build.directory}/test-classes/kdc" compression="gzip" />
  710. <copy file="${kdc.resource.dir}/server.xml" toDir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/conf"/>
  711. <mkdir dir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/ldif"/>
  712. <copy toDir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/ldif">
  713. <fileset dir="${kdc.resource.dir}/ldif"/>
  714. </copy>
  715. <chmod file="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/apacheds.sh" perm="775" />
  716. <exec dir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/" executable="./apacheds.sh" spawn="true"/>
  717. </target>
  718. </configuration>
  719. </execution>
  720. <!-- On completion of graceful test phase: closes the ApacheDS KDC server -->
  721. <execution>
  722. <id>killKdc</id>
  723. <phase>test</phase>
  724. <goals>
  725. <goal>run</goal>
  726. </goals>
  727. <configuration>
  728. <target>
  729. <chmod file="${kdc.resource.dir}/killKdc.sh" perm="775" />
  730. <exec dir="${kdc.resource.dir}" executable= "./killKdc.sh" />
  731. </target>
  732. </configuration>
  733. </execution>
  734. </executions>
  735. </plugin>
  736. </plugins>
  737. </build>
  738. </profile>
  739. </profiles>
  740. </project>