pom.xml 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  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</artifactId>
  21. <version>2.9.2-SNAPSHOT</version>
  22. <relativePath>../hadoop-project</relativePath>
  23. </parent>
  24. <groupId>org.apache.hadoop</groupId>
  25. <artifactId>hadoop-dist</artifactId>
  26. <version>2.9.2-SNAPSHOT</version>
  27. <description>Apache Hadoop Distribution</description>
  28. <name>Apache Hadoop Distribution</name>
  29. <packaging>jar</packaging>
  30. <!-- Using dependencies to ensure this module is the last one -->
  31. <dependencies>
  32. <dependency>
  33. <groupId>org.apache.hadoop</groupId>
  34. <artifactId>hadoop-common</artifactId>
  35. <scope>provided</scope>
  36. </dependency>
  37. <dependency>
  38. <groupId>org.apache.hadoop</groupId>
  39. <artifactId>hadoop-hdfs-client</artifactId>
  40. <scope>provided</scope>
  41. </dependency>
  42. <dependency>
  43. <groupId>org.apache.hadoop</groupId>
  44. <artifactId>hadoop-mapreduce-client-app</artifactId>
  45. <scope>provided</scope>
  46. </dependency>
  47. <dependency>
  48. <groupId>org.apache.hadoop</groupId>
  49. <artifactId>hadoop-yarn-api</artifactId>
  50. <scope>provided</scope>
  51. </dependency>
  52. </dependencies>
  53. <build>
  54. <plugins>
  55. <plugin>
  56. <artifactId>maven-deploy-plugin</artifactId>
  57. <configuration>
  58. <skip>true</skip>
  59. </configuration>
  60. </plugin>
  61. <plugin>
  62. <groupId>org.apache.rat</groupId>
  63. <artifactId>apache-rat-plugin</artifactId>
  64. <configuration>
  65. </configuration>
  66. </plugin>
  67. <!--
  68. The "dist" profile automatically attaches many artifacts
  69. to the module.
  70. Disable these, since we are only concerned with assembling
  71. the dist layout.
  72. -->
  73. <!-- Disable the sign plugin, since there isn't anything to sign -->
  74. <plugin>
  75. <artifactId>maven-gpg-plugin</artifactId>
  76. <executions>
  77. <execution>
  78. <id>sign-artifacts</id>
  79. <phase>never</phase>
  80. </execution>
  81. </executions>
  82. </plugin>
  83. </plugins>
  84. </build>
  85. <profiles>
  86. <profile>
  87. <id>dist</id>
  88. <activation>
  89. <activeByDefault>false</activeByDefault>
  90. <property>
  91. <name>tar</name>
  92. </property>
  93. </activation>
  94. <build>
  95. <plugins>
  96. <plugin>
  97. <groupId>org.apache.maven.plugins</groupId>
  98. <artifactId>maven-antrun-plugin</artifactId>
  99. <executions>
  100. <execution>
  101. <id>dist</id>
  102. <phase>prepare-package</phase>
  103. <goals>
  104. <goal>run</goal>
  105. </goals>
  106. <configuration>
  107. <target>
  108. <echo file="${project.build.directory}/dist-layout-stitching.sh">
  109. run() {
  110. echo "\$ ${@}"
  111. "${@}"
  112. res=$?
  113. if [ $res != 0 ]; then
  114. echo
  115. echo "Failed!"
  116. echo
  117. exit $res
  118. fi
  119. }
  120. ROOT=`cd ../..;pwd`
  121. echo
  122. echo "Current directory `pwd`"
  123. echo
  124. run rm -rf hadoop-${project.version}
  125. run mkdir hadoop-${project.version}
  126. run cd hadoop-${project.version}
  127. run cp $ROOT/LICENSE.txt .
  128. run cp $ROOT/NOTICE.txt .
  129. run cp $ROOT/README.txt .
  130. run cp -r $ROOT/hadoop-common-project/hadoop-common/target/hadoop-common-${project.version}/* .
  131. run cp -r $ROOT/hadoop-common-project/hadoop-nfs/target/hadoop-nfs-${project.version}/* .
  132. run cp -r $ROOT/hadoop-hdfs-project/hadoop-hdfs/target/hadoop-hdfs-${project.version}/* .
  133. run cp -r $ROOT/hadoop-hdfs-project/hadoop-hdfs-httpfs/target/hadoop-hdfs-httpfs-${project.version}/* .
  134. run cp -r $ROOT/hadoop-common-project/hadoop-kms/target/hadoop-kms-${project.version}/* .
  135. run cp -r $ROOT/hadoop-hdfs-project/hadoop-hdfs-nfs/target/hadoop-hdfs-nfs-${project.version}/* .
  136. run cp -r $ROOT/hadoop-hdfs-project/hadoop-hdfs-client/target/hadoop-hdfs-client-${project.version}/* .
  137. run cp -r $ROOT/hadoop-hdfs-project/hadoop-hdfs-native-client/target/hadoop-hdfs-native-client-${project.version}/* .
  138. run cp -r $ROOT/hadoop-hdfs-project/hadoop-hdfs-rbf/target/hadoop-hdfs-rbf-${project.version}/* .
  139. run cp -r $ROOT/hadoop-yarn-project/target/hadoop-yarn-project-${project.version}/* .
  140. run cp -r $ROOT/hadoop-mapreduce-project/target/hadoop-mapreduce-${project.version}/* .
  141. run cp -r $ROOT/hadoop-tools/hadoop-tools-dist/target/hadoop-tools-dist-${project.version}/* .
  142. echo
  143. echo "Hadoop dist layout available at: ${project.build.directory}/hadoop-${project.version}"
  144. echo
  145. </echo>
  146. <exec executable="${shell-executable}" dir="${project.build.directory}" failonerror="true">
  147. <arg line="./dist-layout-stitching.sh"/>
  148. </exec>
  149. </target>
  150. </configuration>
  151. </execution>
  152. <execution>
  153. <id>tar</id>
  154. <phase>package</phase>
  155. <goals>
  156. <goal>run</goal>
  157. </goals>
  158. <configuration>
  159. <target if="tar">
  160. <echo file="${project.build.directory}/dist-tar-stitching.sh">
  161. run() {
  162. echo "\$ ${@}"
  163. "${@}"
  164. res=$?
  165. if [ $res != 0 ]; then
  166. echo
  167. echo "Failed!"
  168. echo
  169. exit $res
  170. fi
  171. }
  172. run tar cf hadoop-${project.version}.tar hadoop-${project.version}
  173. run gzip -f hadoop-${project.version}.tar
  174. echo
  175. echo "Hadoop dist tar available at: ${project.build.directory}/hadoop-${project.version}.tar.gz"
  176. echo
  177. </echo>
  178. <exec executable="${shell-executable}" dir="${project.build.directory}" failonerror="true">
  179. <arg line="./dist-tar-stitching.sh"/>
  180. </exec>
  181. </target>
  182. </configuration>
  183. </execution>
  184. </executions>
  185. </plugin>
  186. </plugins>
  187. </build>
  188. </profile>
  189. </profiles>
  190. </project>