pom.xml 26 KB

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