pom.xml 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747
  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. <snappy.prefix>/usr/local</snappy.prefix>
  32. <snappy.lib>${snappy.prefix}/lib</snappy.lib>
  33. <bundle.snappy>false</bundle.snappy>
  34. <kdc.resource.dir>src/test/resources/kdc</kdc.resource.dir>
  35. <hadoop.component>common</hadoop.component>
  36. <is.hadoop.component>true</is.hadoop.component>
  37. </properties>
  38. <dependencies>
  39. <dependency>
  40. <groupId>org.apache.hadoop</groupId>
  41. <artifactId>hadoop-annotations</artifactId>
  42. <scope>provided</scope>
  43. </dependency>
  44. <dependency>
  45. <groupId>com.google.guava</groupId>
  46. <artifactId>guava</artifactId>
  47. <scope>compile</scope>
  48. </dependency>
  49. <dependency>
  50. <groupId>commons-cli</groupId>
  51. <artifactId>commons-cli</artifactId>
  52. <scope>compile</scope>
  53. </dependency>
  54. <dependency>
  55. <groupId>org.apache.commons</groupId>
  56. <artifactId>commons-math</artifactId>
  57. <scope>compile</scope>
  58. </dependency>
  59. <dependency>
  60. <groupId>xmlenc</groupId>
  61. <artifactId>xmlenc</artifactId>
  62. <scope>compile</scope>
  63. </dependency>
  64. <dependency>
  65. <groupId>commons-httpclient</groupId>
  66. <artifactId>commons-httpclient</artifactId>
  67. <scope>compile</scope>
  68. </dependency>
  69. <dependency>
  70. <groupId>commons-codec</groupId>
  71. <artifactId>commons-codec</artifactId>
  72. <scope>compile</scope>
  73. </dependency>
  74. <dependency>
  75. <groupId>commons-net</groupId>
  76. <artifactId>commons-net</artifactId>
  77. <scope>compile</scope>
  78. </dependency>
  79. <dependency>
  80. <groupId>commons-io</groupId>
  81. <artifactId>commons-io</artifactId>
  82. <scope>compile</scope>
  83. </dependency>
  84. <dependency>
  85. <groupId>javax.servlet</groupId>
  86. <artifactId>servlet-api</artifactId>
  87. <scope>compile</scope>
  88. </dependency>
  89. <dependency>
  90. <groupId>org.mortbay.jetty</groupId>
  91. <artifactId>jetty</artifactId>
  92. <scope>compile</scope>
  93. </dependency>
  94. <dependency>
  95. <groupId>org.mortbay.jetty</groupId>
  96. <artifactId>jetty-util</artifactId>
  97. <scope>compile</scope>
  98. </dependency>
  99. <dependency>
  100. <groupId>asm</groupId>
  101. <artifactId>asm</artifactId>
  102. <scope>compile</scope>
  103. </dependency>
  104. <dependency>
  105. <groupId>com.sun.jersey</groupId>
  106. <artifactId>jersey-core</artifactId>
  107. <scope>compile</scope>
  108. </dependency>
  109. <dependency>
  110. <groupId>com.sun.jersey</groupId>
  111. <artifactId>jersey-json</artifactId>
  112. <scope>compile</scope>
  113. </dependency>
  114. <dependency>
  115. <groupId>com.sun.jersey</groupId>
  116. <artifactId>jersey-server</artifactId>
  117. <scope>compile</scope>
  118. </dependency>
  119. <dependency>
  120. <groupId>tomcat</groupId>
  121. <artifactId>jasper-compiler</artifactId>
  122. <scope>compile</scope>
  123. </dependency>
  124. <dependency>
  125. <groupId>tomcat</groupId>
  126. <artifactId>jasper-runtime</artifactId>
  127. <scope>compile</scope>
  128. </dependency>
  129. <dependency>
  130. <groupId>javax.servlet.jsp</groupId>
  131. <artifactId>jsp-api</artifactId>
  132. <scope>compile</scope>
  133. </dependency>
  134. <dependency>
  135. <groupId>commons-el</groupId>
  136. <artifactId>commons-el</artifactId>
  137. <scope>compile</scope>
  138. </dependency>
  139. <dependency>
  140. <groupId>commons-logging</groupId>
  141. <artifactId>commons-logging</artifactId>
  142. <scope>compile</scope>
  143. </dependency>
  144. <dependency>
  145. <groupId>commons-logging</groupId>
  146. <artifactId>commons-logging-api</artifactId>
  147. <scope>compile</scope>
  148. </dependency>
  149. <dependency>
  150. <groupId>log4j</groupId>
  151. <artifactId>log4j</artifactId>
  152. <scope>compile</scope>
  153. </dependency>
  154. <dependency>
  155. <groupId>net.java.dev.jets3t</groupId>
  156. <artifactId>jets3t</artifactId>
  157. <scope>compile</scope>
  158. </dependency>
  159. <dependency>
  160. <groupId>org.apache.mina</groupId>
  161. <artifactId>mina-core</artifactId>
  162. <scope>test</scope>
  163. </dependency>
  164. <dependency>
  165. <groupId>org.apache.ftpserver</groupId>
  166. <artifactId>ftplet-api</artifactId>
  167. <scope>test</scope>
  168. </dependency>
  169. <dependency>
  170. <groupId>org.apache.ftpserver</groupId>
  171. <artifactId>ftpserver-core</artifactId>
  172. <scope>test</scope>
  173. </dependency>
  174. <dependency>
  175. <groupId>org.apache.ftpserver</groupId>
  176. <artifactId>ftpserver-deprecated</artifactId>
  177. <scope>test</scope>
  178. </dependency>
  179. <dependency>
  180. <groupId>junit</groupId>
  181. <artifactId>junit</artifactId>
  182. <scope>test</scope>
  183. </dependency>
  184. <dependency>
  185. <groupId>commons-lang</groupId>
  186. <artifactId>commons-lang</artifactId>
  187. <scope>compile</scope>
  188. </dependency>
  189. <dependency>
  190. <groupId>commons-collections</groupId>
  191. <artifactId>commons-collections</artifactId>
  192. <scope>compile</scope>
  193. </dependency>
  194. <dependency>
  195. <groupId>commons-configuration</groupId>
  196. <artifactId>commons-configuration</artifactId>
  197. <scope>compile</scope>
  198. </dependency>
  199. <dependency>
  200. <groupId>org.slf4j</groupId>
  201. <artifactId>slf4j-api</artifactId>
  202. <scope>compile</scope>
  203. </dependency>
  204. <dependency>
  205. <groupId>org.slf4j</groupId>
  206. <artifactId>slf4j-log4j12</artifactId>
  207. <scope>compile</scope>
  208. </dependency>
  209. <dependency>
  210. <groupId>org.eclipse.jdt</groupId>
  211. <artifactId>core</artifactId>
  212. <scope>compile</scope>
  213. </dependency>
  214. <dependency>
  215. <groupId>oro</groupId>
  216. <artifactId>oro</artifactId>
  217. <scope>compile</scope>
  218. </dependency>
  219. <dependency>
  220. <groupId>org.codehaus.jackson</groupId>
  221. <artifactId>jackson-mapper-asl</artifactId>
  222. <scope>compile</scope>
  223. </dependency>
  224. <dependency>
  225. <groupId>org.aspectj</groupId>
  226. <artifactId>aspectjrt</artifactId>
  227. <scope>compile</scope>
  228. </dependency>
  229. <dependency>
  230. <groupId>org.mockito</groupId>
  231. <artifactId>mockito-all</artifactId>
  232. <scope>test</scope>
  233. </dependency>
  234. <dependency>
  235. <groupId>org.apache.avro</groupId>
  236. <artifactId>avro</artifactId>
  237. <scope>compile</scope>
  238. </dependency>
  239. <dependency>
  240. <groupId>net.sf.kosmosfs</groupId>
  241. <artifactId>kfs</artifactId>
  242. <scope>compile</scope>
  243. </dependency>
  244. <dependency>
  245. <groupId>org.apache.ant</groupId>
  246. <artifactId>ant</artifactId>
  247. <scope>provided</scope>
  248. </dependency>
  249. <dependency>
  250. <groupId>com.google.protobuf</groupId>
  251. <artifactId>protobuf-java</artifactId>
  252. <scope>compile</scope>
  253. </dependency>
  254. <dependency>
  255. <groupId>org.apache.hadoop</groupId>
  256. <artifactId>hadoop-auth</artifactId>
  257. <scope>compile</scope>
  258. </dependency>
  259. <dependency>
  260. <groupId>com.googlecode.json-simple</groupId>
  261. <artifactId>json-simple</artifactId>
  262. <scope>compile</scope>
  263. </dependency>
  264. <dependency>
  265. <groupId>com.jcraft</groupId>
  266. <artifactId>jsch</artifactId>
  267. </dependency>
  268. <dependency>
  269. <groupId>org.apache.zookeeper</groupId>
  270. <artifactId>zookeeper</artifactId>
  271. <version>3.4.2</version>
  272. <exclusions>
  273. <exclusion>
  274. <!-- otherwise seems to drag in junit 3.8.1 via jline -->
  275. <groupId>junit</groupId>
  276. <artifactId>junit</artifactId>
  277. </exclusion>
  278. <exclusion>
  279. <groupId>com.sun.jdmk</groupId>
  280. <artifactId>jmxtools</artifactId>
  281. </exclusion>
  282. <exclusion>
  283. <groupId>com.sun.jmx</groupId>
  284. <artifactId>jmxri</artifactId>
  285. </exclusion>
  286. </exclusions>
  287. </dependency>
  288. <dependency>
  289. <groupId>org.apache.zookeeper</groupId>
  290. <artifactId>zookeeper</artifactId>
  291. <version>3.4.2</version>
  292. <type>test-jar</type>
  293. <scope>test</scope>
  294. </dependency>
  295. </dependencies>
  296. <build>
  297. <plugins>
  298. <plugin>
  299. <groupId>org.apache.maven.plugins</groupId>
  300. <artifactId>maven-surefire-plugin</artifactId>
  301. <configuration>
  302. <systemPropertyVariables>
  303. <startKdc>${startKdc}</startKdc>
  304. <kdc.resource.dir>${kdc.resource.dir}</kdc.resource.dir>
  305. </systemPropertyVariables>
  306. </configuration>
  307. </plugin>
  308. <plugin>
  309. <groupId>org.apache.avro</groupId>
  310. <artifactId>avro-maven-plugin</artifactId>
  311. <executions>
  312. <execution>
  313. <id>generate-avro-test-sources</id>
  314. <phase>generate-test-sources</phase>
  315. <goals>
  316. <goal>schema</goal>
  317. </goals>
  318. </execution>
  319. </executions>
  320. <configuration>
  321. <testOutputDirectory>${project.build.directory}/generated-test-sources/java</testOutputDirectory>
  322. </configuration>
  323. </plugin>
  324. <plugin>
  325. <groupId>org.apache.maven.plugins</groupId>
  326. <artifactId>maven-antrun-plugin</artifactId>
  327. <executions>
  328. <execution>
  329. <id>compile-proto</id>
  330. <phase>generate-sources</phase>
  331. <goals>
  332. <goal>run</goal>
  333. </goals>
  334. <configuration>
  335. <target>
  336. <echo file="target/compile-proto.sh">
  337. PROTO_DIR=src/main/proto
  338. JAVA_DIR=target/generated-sources/java
  339. which cygpath 2&gt; /dev/null
  340. if [ $? = 1 ]; then
  341. IS_WIN=false
  342. else
  343. IS_WIN=true
  344. WIN_PROTO_DIR=`cygpath --windows $PROTO_DIR`
  345. WIN_JAVA_DIR=`cygpath --windows $JAVA_DIR`
  346. fi
  347. mkdir -p $JAVA_DIR 2&gt; /dev/null
  348. for PROTO_FILE in `ls $PROTO_DIR/*.proto 2&gt; /dev/null`
  349. do
  350. if [ "$IS_WIN" = "true" ]; then
  351. protoc -I$WIN_PROTO_DIR --java_out=$WIN_JAVA_DIR $PROTO_FILE
  352. else
  353. protoc -I$PROTO_DIR --java_out=$JAVA_DIR $PROTO_FILE
  354. fi
  355. done
  356. </echo>
  357. <exec executable="sh" dir="${basedir}" failonerror="true">
  358. <arg line="target/compile-proto.sh"/>
  359. </exec>
  360. </target>
  361. </configuration>
  362. </execution>
  363. <execution>
  364. <id>compile-test-proto</id>
  365. <phase>generate-test-sources</phase>
  366. <goals>
  367. <goal>run</goal>
  368. </goals>
  369. <configuration>
  370. <target>
  371. <echo file="target/compile-test-proto.sh">
  372. PROTO_DIR=src/test/proto
  373. JAVA_DIR=target/generated-test-sources/java
  374. which cygpath 2&gt; /dev/null
  375. if [ $? = 1 ]; then
  376. IS_WIN=false
  377. else
  378. IS_WIN=true
  379. WIN_PROTO_DIR=`cygpath --windows $PROTO_DIR`
  380. WIN_JAVA_DIR=`cygpath --windows $JAVA_DIR`
  381. fi
  382. mkdir -p $JAVA_DIR 2&gt; /dev/null
  383. for PROTO_FILE in `ls $PROTO_DIR/*.proto 2&gt; /dev/null`
  384. do
  385. if [ "$IS_WIN" = "true" ]; then
  386. protoc -I$WIN_PROTO_DIR --java_out=$WIN_JAVA_DIR $PROTO_FILE
  387. else
  388. protoc -I$PROTO_DIR --java_out=$JAVA_DIR $PROTO_FILE
  389. fi
  390. done
  391. </echo>
  392. <exec executable="sh" dir="${basedir}" failonerror="true">
  393. <arg line="target/compile-test-proto.sh"/>
  394. </exec>
  395. </target>
  396. </configuration>
  397. </execution>
  398. <execution>
  399. <id>save-version</id>
  400. <phase>generate-sources</phase>
  401. <goals>
  402. <goal>run</goal>
  403. </goals>
  404. <configuration>
  405. <target>
  406. <mkdir dir="${project.build.directory}/generated-sources/java"/>
  407. <exec executable="sh">
  408. <arg
  409. line="${basedir}/dev-support/saveVersion.sh ${project.version} ${project.build.directory}/generated-sources/java"/>
  410. </exec>
  411. </target>
  412. </configuration>
  413. </execution>
  414. <execution>
  415. <id>generate-test-sources</id>
  416. <phase>generate-test-sources</phase>
  417. <goals>
  418. <goal>run</goal>
  419. </goals>
  420. <configuration>
  421. <target>
  422. <mkdir dir="${project.build.directory}/generated-test-sources/java"/>
  423. <taskdef name="recordcc" classname="org.apache.hadoop.record.compiler.ant.RccTask">
  424. <classpath refid="maven.compile.classpath"/>
  425. </taskdef>
  426. <recordcc destdir="${project.build.directory}/generated-test-sources/java">
  427. <fileset dir="${basedir}/src/test/ddl" includes="**/*.jr"/>
  428. </recordcc>
  429. </target>
  430. </configuration>
  431. </execution>
  432. <execution>
  433. <id>create-log-dir</id>
  434. <phase>process-test-resources</phase>
  435. <goals>
  436. <goal>run</goal>
  437. </goals>
  438. <configuration>
  439. <target>
  440. <!--
  441. TODO: there are tests (TestLocalFileSystem#testCopy) that fail if data
  442. TODO: from a previous run is present
  443. -->
  444. <delete dir="${test.build.data}"/>
  445. <mkdir dir="${test.build.data}"/>
  446. <mkdir dir="${hadoop.log.dir}"/>
  447. <copy toDir="${project.build.directory}/test-classes">
  448. <fileset dir="${basedir}/src/main/conf"/>
  449. </copy>
  450. </target>
  451. </configuration>
  452. </execution>
  453. <execution>
  454. <phase>pre-site</phase>
  455. <goals>
  456. <goal>run</goal>
  457. </goals>
  458. <configuration>
  459. <tasks>
  460. <copy file="src/main/resources/core-default.xml" todir="src/site/resources"/>
  461. <copy file="src/main/xsl/configuration.xsl" todir="src/site/resources"/>
  462. </tasks>
  463. </configuration>
  464. </execution>
  465. </executions>
  466. </plugin>
  467. <plugin>
  468. <groupId>org.codehaus.mojo</groupId>
  469. <artifactId>build-helper-maven-plugin</artifactId>
  470. <executions>
  471. <execution>
  472. <id>add-source</id>
  473. <phase>generate-sources</phase>
  474. <goals>
  475. <goal>add-source</goal>
  476. </goals>
  477. <configuration>
  478. <sources>
  479. <source>${project.build.directory}/generated-sources/java</source>
  480. </sources>
  481. </configuration>
  482. </execution>
  483. <execution>
  484. <id>add-test-source</id>
  485. <phase>generate-sources</phase>
  486. <goals>
  487. <goal>add-test-source</goal>
  488. </goals>
  489. <configuration>
  490. <sources>
  491. <source>${project.build.directory}/generated-test-sources/java</source>
  492. </sources>
  493. </configuration>
  494. </execution>
  495. </executions>
  496. </plugin>
  497. <plugin>
  498. <groupId>org.apache.rat</groupId>
  499. <artifactId>apache-rat-plugin</artifactId>
  500. <configuration>
  501. <excludes>
  502. <exclude>CHANGES.txt</exclude>
  503. <exclude>.idea/**</exclude>
  504. <exclude>src/main/conf/*</exclude>
  505. <exclude>src/main/docs/**</exclude>
  506. <exclude>dev-support/jdiff/**</exclude>
  507. <exclude>src/main/native/*</exclude>
  508. <exclude>src/main/native/config/*</exclude>
  509. <exclude>src/main/resources/META-INF/services/org.apache.hadoop.security.SecurityInfo</exclude>
  510. <exclude>src/main/native/m4/*</exclude>
  511. <exclude>src/test/empty-file</exclude>
  512. <exclude>src/test/all-tests</exclude>
  513. </excludes>
  514. </configuration>
  515. </plugin>
  516. </plugins>
  517. </build>
  518. <profiles>
  519. <profile>
  520. <id>native</id>
  521. <activation>
  522. <activeByDefault>false</activeByDefault>
  523. </activation>
  524. <properties>
  525. <snappy.prefix>/usr/local</snappy.prefix>
  526. <snappy.lib>${snappy.prefix}/lib</snappy.lib>
  527. <snappy.include>${snappy.prefix}/include</snappy.include>
  528. </properties>
  529. <build>
  530. <plugins>
  531. <plugin>
  532. <groupId>org.apache.maven.plugins</groupId>
  533. <artifactId>maven-antrun-plugin</artifactId>
  534. <executions>
  535. <execution>
  536. <id>compile</id>
  537. <phase>compile</phase>
  538. <goals>
  539. <goal>run</goal>
  540. </goals>
  541. <configuration>
  542. <target>
  543. <mkdir dir="${project.build.directory}/native/javah"/>
  544. <copy toDir="${project.build.directory}/native">
  545. <fileset dir="${basedir}/src/main/native"/>
  546. </copy>
  547. <mkdir dir="${project.build.directory}/native/m4"/>
  548. </target>
  549. </configuration>
  550. </execution>
  551. </executions>
  552. </plugin>
  553. <plugin>
  554. <groupId>org.codehaus.mojo</groupId>
  555. <artifactId>native-maven-plugin</artifactId>
  556. <executions>
  557. <execution>
  558. <phase>compile</phase>
  559. <goals>
  560. <goal>javah</goal>
  561. </goals>
  562. <configuration>
  563. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  564. <javahClassNames>
  565. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  566. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  567. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  568. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  569. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  570. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  571. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  572. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  573. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  574. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  575. </javahClassNames>
  576. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  577. </configuration>
  578. </execution>
  579. </executions>
  580. </plugin>
  581. <plugin>
  582. <groupId>org.codehaus.mojo</groupId>
  583. <artifactId>make-maven-plugin</artifactId>
  584. <executions>
  585. <execution>
  586. <id>compile</id>
  587. <phase>compile</phase>
  588. <goals>
  589. <goal>autoreconf</goal>
  590. <goal>configure</goal>
  591. <goal>make-install</goal>
  592. </goals>
  593. </execution>
  594. </executions>
  595. <configuration>
  596. <!-- autoreconf settings -->
  597. <workDir>${project.build.directory}/native</workDir>
  598. <arguments>
  599. <argument>-i</argument>
  600. <argument>-f</argument>
  601. </arguments>
  602. <!-- configure settings -->
  603. <configureEnvironment>
  604. <property>
  605. <name>OS_NAME</name>
  606. <value>${os.name}</value>
  607. </property>
  608. <property>
  609. <name>OS_ARCH</name>
  610. <value>${os.arch}</value>
  611. </property>
  612. <property>
  613. <name>JVM_DATA_MODEL</name>
  614. <value>${sun.arch.data.model}</value>
  615. </property>
  616. </configureEnvironment>
  617. <configureOptions>
  618. <configureOption>CPPFLAGS=-I${snappy.include}</configureOption>
  619. <configureOption>LDFLAGS=-L${snappy.lib}</configureOption>
  620. </configureOptions>
  621. <configureWorkDir>${project.build.directory}/native</configureWorkDir>
  622. <prefix>/usr/local</prefix>
  623. <!-- make settings -->
  624. <installEnvironment>
  625. <property>
  626. <name>OS_NAME</name>
  627. <value>${os.name}</value>
  628. </property>
  629. <property>
  630. <name>OS_ARCH</name>
  631. <value>${os.arch}</value>
  632. </property>
  633. <property>
  634. <name>JVM_DATA_MODEL</name>
  635. <value>${sun.arch.data.model}</value>
  636. </property>
  637. <property>
  638. <name>HADOOP_NATIVE_SRCDIR</name>
  639. <value>${project.build.directory}/native</value>
  640. </property>
  641. </installEnvironment>
  642. <!-- configure & make settings -->
  643. <destDir>${project.build.directory}/native/target</destDir>
  644. </configuration>
  645. </plugin>
  646. </plugins>
  647. </build>
  648. </profile>
  649. <!-- profile that starts ApacheDS KDC server -->
  650. <profile>
  651. <id>startKdc</id>
  652. <activation>
  653. <property>
  654. <name>startKdc</name>
  655. <value>true</value>
  656. </property>
  657. </activation>
  658. <build>
  659. <plugins>
  660. <plugin>
  661. <groupId>org.apache.maven.plugins</groupId>
  662. <artifactId>maven-enforcer-plugin</artifactId>
  663. <executions>
  664. <execution>
  665. <id>enforce-os</id>
  666. <goals>
  667. <goal>enforce</goal>
  668. </goals>
  669. <configuration>
  670. <rules>
  671. <!-- At present supports Mac and Unix OS family -->
  672. <requireOS>
  673. <family>mac</family>
  674. <family>unix</family>
  675. </requireOS>
  676. </rules>
  677. <fail>true</fail>
  678. </configuration>
  679. </execution>
  680. </executions>
  681. </plugin>
  682. <plugin>
  683. <groupId>org.apache.maven.plugins</groupId>
  684. <artifactId>maven-antrun-plugin</artifactId>
  685. <executions>
  686. <execution>
  687. <id>compile</id>
  688. <phase>compile</phase>
  689. <goals>
  690. <goal>run</goal>
  691. </goals>
  692. <configuration>
  693. <target>
  694. <chmod file="${kdc.resource.dir}/killKdc.sh" perm="775" />
  695. <exec dir="${kdc.resource.dir}" executable= "./killKdc.sh" />
  696. <mkdir dir="${project.build.directory}/test-classes/kdc/downloads"/>
  697. <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"/>
  698. <untar src="${project.build.directory}/test-classes/kdc/downloads/apacheds-1.5.7.tar.gz" dest="${project.build.directory}/test-classes/kdc" compression="gzip" />
  699. <copy file="${kdc.resource.dir}/server.xml" toDir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/conf"/>
  700. <mkdir dir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/ldif"/>
  701. <copy toDir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/ldif">
  702. <fileset dir="${kdc.resource.dir}/ldif"/>
  703. </copy>
  704. <chmod file="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/apacheds.sh" perm="775" />
  705. <exec dir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/" executable="./apacheds.sh" spawn="true"/>
  706. </target>
  707. </configuration>
  708. </execution>
  709. <!-- On completion of graceful test phase: closes the ApacheDS KDC server -->
  710. <execution>
  711. <id>killKdc</id>
  712. <phase>test</phase>
  713. <goals>
  714. <goal>run</goal>
  715. </goals>
  716. <configuration>
  717. <target>
  718. <chmod file="${kdc.resource.dir}/killKdc.sh" perm="775" />
  719. <exec dir="${kdc.resource.dir}" executable= "./killKdc.sh" />
  720. </target>
  721. </configuration>
  722. </execution>
  723. </executions>
  724. </plugin>
  725. </plugins>
  726. </build>
  727. </profile>
  728. </profiles>
  729. </project>