pom.xml 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680
  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. <runas.home></runas.home>
  529. </properties>
  530. <build>
  531. <plugins>
  532. <plugin>
  533. <groupId>org.codehaus.mojo</groupId>
  534. <artifactId>native-maven-plugin</artifactId>
  535. <executions>
  536. <execution>
  537. <phase>compile</phase>
  538. <goals>
  539. <goal>javah</goal>
  540. </goals>
  541. <configuration>
  542. <javahPath>${env.JAVA_HOME}/bin/javah</javahPath>
  543. <javahClassNames>
  544. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibCompressor</javahClassName>
  545. <javahClassName>org.apache.hadoop.io.compress.zlib.ZlibDecompressor</javahClassName>
  546. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsMapping</javahClassName>
  547. <javahClassName>org.apache.hadoop.io.nativeio.NativeIO</javahClassName>
  548. <javahClassName>org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping</javahClassName>
  549. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyCompressor</javahClassName>
  550. <javahClassName>org.apache.hadoop.io.compress.snappy.SnappyDecompressor</javahClassName>
  551. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Compressor</javahClassName>
  552. <javahClassName>org.apache.hadoop.io.compress.lz4.Lz4Decompressor</javahClassName>
  553. <javahClassName>org.apache.hadoop.util.NativeCrc32</javahClassName>
  554. </javahClassNames>
  555. <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory>
  556. </configuration>
  557. </execution>
  558. </executions>
  559. </plugin>
  560. <plugin>
  561. <groupId>org.apache.maven.plugins</groupId>
  562. <artifactId>maven-antrun-plugin</artifactId>
  563. <executions>
  564. <execution>
  565. <id>make</id>
  566. <phase>compile</phase>
  567. <goals><goal>run</goal></goals>
  568. <configuration>
  569. <target>
  570. <exec executable="cmake" dir="${project.build.directory}/native" failonerror="true">
  571. <arg line="${basedir}/src/ -DGENERATED_JAVAH=${project.build.directory}/native/javah -DJVM_ARCH_DATA_MODEL=${sun.arch.data.model}"/>
  572. <env key="CFLAGS" value="-I${snappy.include}"/>
  573. <env key="LDFLAGS" value="-L${snappy.lib}"/>
  574. </exec>
  575. <exec executable="make" dir="${project.build.directory}/native" failonerror="true">
  576. <arg line="VERBOSE=1"/>
  577. </exec>
  578. </target>
  579. </configuration>
  580. </execution>
  581. </executions>
  582. </plugin>
  583. </plugins>
  584. </build>
  585. </profile>
  586. <!-- profile that starts ApacheDS KDC server -->
  587. <profile>
  588. <id>startKdc</id>
  589. <activation>
  590. <property>
  591. <name>startKdc</name>
  592. <value>true</value>
  593. </property>
  594. </activation>
  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. <!-- At present supports Mac and Unix OS family -->
  609. <requireOS>
  610. <family>mac</family>
  611. <family>unix</family>
  612. </requireOS>
  613. </rules>
  614. <fail>true</fail>
  615. </configuration>
  616. </execution>
  617. </executions>
  618. </plugin>
  619. <plugin>
  620. <groupId>org.apache.maven.plugins</groupId>
  621. <artifactId>maven-antrun-plugin</artifactId>
  622. <executions>
  623. <execution>
  624. <id>kdc</id>
  625. <phase>compile</phase>
  626. <goals>
  627. <goal>run</goal>
  628. </goals>
  629. <configuration>
  630. <target>
  631. <chmod file="${kdc.resource.dir}/killKdc.sh" perm="775" />
  632. <exec dir="${kdc.resource.dir}" executable= "./killKdc.sh" />
  633. <mkdir dir="${project.build.directory}/test-classes/kdc/downloads"/>
  634. <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"/>
  635. <untar src="${project.build.directory}/test-classes/kdc/downloads/apacheds-1.5.7.tar.gz" dest="${project.build.directory}/test-classes/kdc" compression="gzip" />
  636. <copy file="${kdc.resource.dir}/server.xml" toDir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/conf"/>
  637. <mkdir dir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/ldif"/>
  638. <copy toDir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/ldif">
  639. <fileset dir="${kdc.resource.dir}/ldif"/>
  640. </copy>
  641. <chmod file="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/apacheds.sh" perm="775" />
  642. <exec dir="${project.build.directory}/test-classes/kdc/apacheds_1.5.7/" executable="./apacheds.sh" spawn="true"/>
  643. </target>
  644. </configuration>
  645. </execution>
  646. <!-- On completion of graceful test phase: closes the ApacheDS KDC server -->
  647. <execution>
  648. <id>killKdc</id>
  649. <phase>test</phase>
  650. <goals>
  651. <goal>run</goal>
  652. </goals>
  653. <configuration>
  654. <target>
  655. <chmod file="${kdc.resource.dir}/killKdc.sh" perm="775" />
  656. <exec dir="${kdc.resource.dir}" executable= "./killKdc.sh" />
  657. </target>
  658. </configuration>
  659. </execution>
  660. </executions>
  661. </plugin>
  662. </plugins>
  663. </build>
  664. </profile>
  665. </profiles>
  666. </project>