pom.xml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  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.
  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-hdfs-raid</artifactId>
  23. <version>3.0.0-SNAPSHOT</version>
  24. <packaging>jar</packaging>
  25. <name>Apache Hadoop HDFS Raid</name>
  26. <description>Apache Hadoop HDFS Raid</description>
  27. <properties>
  28. <hadoop.component>raid</hadoop.component>
  29. <is.hadoop.component>false</is.hadoop.component>
  30. </properties>
  31. <dependencies>
  32. <dependency>
  33. <groupId>junit</groupId>
  34. <artifactId>junit</artifactId>
  35. <scope>test</scope>
  36. </dependency>
  37. <dependency>
  38. <groupId>org.apache.hadoop</groupId>
  39. <artifactId>hadoop-annotations</artifactId>
  40. <scope>provided</scope>
  41. </dependency>
  42. <dependency>
  43. <groupId>org.apache.hadoop</groupId>
  44. <artifactId>hadoop-minicluster</artifactId>
  45. <scope>test</scope>
  46. </dependency>
  47. <dependency>
  48. <groupId>org.apache.hadoop</groupId>
  49. <artifactId>hadoop-client</artifactId>
  50. <scope>provided</scope>
  51. </dependency>
  52. <dependency>
  53. <groupId>org.apache.hadoop</groupId>
  54. <artifactId>hadoop-archives</artifactId>
  55. <scope>provided</scope>
  56. </dependency>
  57. </dependencies>
  58. <build>
  59. <plugins>
  60. <plugin>
  61. <artifactId>maven-dependency-plugin</artifactId>
  62. <executions>
  63. <execution>
  64. <id>create-mrapp-generated-classpath</id>
  65. <phase>generate-test-resources</phase>
  66. <goals>
  67. <goal>build-classpath</goal>
  68. </goals>
  69. <configuration>
  70. <!--
  71. This is needed to run the unit tests. It generates the required classpath
  72. that is required in the env of the launch container in the mini mr/yarn cluster.
  73. -->
  74. <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath</outputFile>
  75. </configuration>
  76. </execution>
  77. </executions>
  78. </plugin>
  79. <plugin>
  80. <groupId>org.apache.rat</groupId>
  81. <artifactId>apache-rat-plugin</artifactId>
  82. <configuration>
  83. <excludes>
  84. </excludes>
  85. </configuration>
  86. </plugin>
  87. <plugin>
  88. <groupId>org.codehaus.mojo</groupId>
  89. <artifactId>findbugs-maven-plugin</artifactId>
  90. <configuration>
  91. <excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
  92. </configuration>
  93. </plugin>
  94. </plugins>
  95. </build>
  96. <profiles>
  97. <profile>
  98. <id>docs</id>
  99. <activation>
  100. <activeByDefault>false</activeByDefault>
  101. </activation>
  102. <build>
  103. <plugins>
  104. <plugin>
  105. <groupId>org.apache.maven.plugins</groupId>
  106. <artifactId>maven-site-plugin</artifactId>
  107. <executions>
  108. <execution>
  109. <id>docs</id>
  110. <phase>prepare-package</phase>
  111. <goals>
  112. <goal>site</goal>
  113. </goals>
  114. </execution>
  115. </executions>
  116. </plugin>
  117. </plugins>
  118. </build>
  119. </profile>
  120. <profile>
  121. <id>dist</id>
  122. <activation>
  123. <activeByDefault>false</activeByDefault>
  124. </activation>
  125. <build>
  126. <plugins>
  127. <plugin>
  128. <groupId>org.apache.maven.plugins</groupId>
  129. <artifactId>maven-assembly-plugin</artifactId>
  130. <dependencies>
  131. <dependency>
  132. <groupId>org.apache.hadoop</groupId>
  133. <artifactId>hadoop-assemblies</artifactId>
  134. <version>${project.version}</version>
  135. </dependency>
  136. </dependencies>
  137. <executions>
  138. <execution>
  139. <id>dist</id>
  140. <phase>package</phase>
  141. <goals>
  142. <goal>single</goal>
  143. </goals>
  144. <configuration>
  145. <finalName>${project.artifactId}-${project.version}</finalName>
  146. <appendAssemblyId>false</appendAssemblyId>
  147. <attach>false</attach>
  148. <descriptorRefs>
  149. <descriptorRef>hadoop-raid-dist</descriptorRef>
  150. </descriptorRefs>
  151. </configuration>
  152. </execution>
  153. </executions>
  154. </plugin>
  155. <plugin>
  156. <groupId>org.apache.maven.plugins</groupId>
  157. <artifactId>maven-antrun-plugin</artifactId>
  158. <executions>
  159. <execution>
  160. <id>tar</id>
  161. <phase>package</phase>
  162. <goals>
  163. <goal>run</goal>
  164. </goals>
  165. <configuration>
  166. <target if="tar">
  167. <!-- Using Unix script to preserve symlinks -->
  168. <echo file="${project.build.directory}/dist-maketar.sh">
  169. which cygpath 2> /dev/null
  170. if [ $? = 1 ]; then
  171. BUILD_DIR="${project.build.directory}"
  172. else
  173. BUILD_DIR=`cygpath --unix '${project.build.directory}'`
  174. fi
  175. cd $BUILD_DIR
  176. tar czf ${project.artifactId}-${project.version}.tar.gz ${project.artifactId}-${project.version}
  177. </echo>
  178. <exec executable="sh" dir="${project.build.directory}" failonerror="true">
  179. <arg line="./dist-maketar.sh"/>
  180. </exec>
  181. </target>
  182. </configuration>
  183. </execution>
  184. </executions>
  185. </plugin>
  186. </plugins>
  187. </build>
  188. </profile>
  189. </profiles>
  190. </project>