pom.xml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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</artifactId>
  18. <version>0.23.1-SNAPSHOT</version>
  19. <relativePath>../hadoop-project</relativePath>
  20. </parent>
  21. <groupId>org.apache.hadoop</groupId>
  22. <artifactId>hadoop-dist</artifactId>
  23. <version>0.23.1-SNAPSHOT</version>
  24. <description>Apache Hadoop Distribution</description>
  25. <name>Apache Hadoop Distribution</name>
  26. <packaging>jar</packaging>
  27. <!-- Using dependencies to ensure this module is the last one -->
  28. <dependencies>
  29. <dependency>
  30. <groupId>org.apache.hadoop</groupId>
  31. <artifactId>hadoop-common</artifactId>
  32. <scope>provided</scope>
  33. </dependency>
  34. <dependency>
  35. <groupId>org.apache.hadoop</groupId>
  36. <artifactId>hadoop-hdfs</artifactId>
  37. <scope>provided</scope>
  38. </dependency>
  39. <dependency>
  40. <groupId>org.apache.hadoop</groupId>
  41. <artifactId>hadoop-mapreduce-client-app</artifactId>
  42. <scope>provided</scope>
  43. </dependency>
  44. <dependency>
  45. <groupId>org.apache.hadoop</groupId>
  46. <artifactId>hadoop-yarn-api</artifactId>
  47. <scope>provided</scope>
  48. </dependency>
  49. </dependencies>
  50. <build>
  51. <plugins>
  52. <plugin>
  53. <artifactId>maven-deploy-plugin</artifactId>
  54. <configuration>
  55. <skip>true</skip>
  56. </configuration>
  57. </plugin>
  58. <plugin>
  59. <groupId>org.apache.rat</groupId>
  60. <artifactId>apache-rat-plugin</artifactId>
  61. <configuration>
  62. <includes>
  63. <include>pom.xml</include>
  64. </includes>
  65. </configuration>
  66. </plugin>
  67. </plugins>
  68. </build>
  69. <profiles>
  70. <profile>
  71. <id>dist</id>
  72. <activation>
  73. <activeByDefault>false</activeByDefault>
  74. <property>
  75. <name>tar|rpm|deb</name>
  76. </property>
  77. </activation>
  78. <build>
  79. <plugins>
  80. <plugin>
  81. <groupId>org.apache.maven.plugins</groupId>
  82. <artifactId>maven-antrun-plugin</artifactId>
  83. <executions>
  84. <execution>
  85. <id>dist</id>
  86. <phase>prepare-package</phase>
  87. <goals>
  88. <goal>run</goal>
  89. </goals>
  90. <configuration>
  91. <target>
  92. <echo file="${project.build.directory}/dist-layout-stitching.sh">
  93. run() {
  94. echo "\$ ${@}"
  95. "${@}"
  96. res=$?
  97. if [ $res != 0 ]; then
  98. echo
  99. echo "Failed!"
  100. echo
  101. exit $res
  102. fi
  103. }
  104. ROOT=`cd ${basedir}/..;pwd`
  105. echo
  106. echo "Current directory `pwd`"
  107. echo
  108. run rm -rf hadoop-${project.version}
  109. run mkdir hadoop-${project.version}
  110. run cd hadoop-${project.version}
  111. run cp -r $ROOT/hadoop-common-project/hadoop-common/target/hadoop-common-${project.version}/* .
  112. run cp -r $ROOT/hadoop-hdfs-project/hadoop-hdfs/target/hadoop-hdfs-${project.version}/* .
  113. run cp -r $ROOT/hadoop-hdfs-project/hadoop-hdfs-httpfs/target/hadoop-hdfs-httpfs-${project.version}/* .
  114. run cp -r $ROOT/hadoop-mapreduce-project/target/hadoop-mapreduce-${project.version}/* .
  115. run cp -r $ROOT/hadoop-tools/hadoop-tools-dist/target/hadoop-tools-dist-${project.version}/* .
  116. echo
  117. echo "Hadoop dist layout available at: ${project.build.directory}/hadoop-${project.version}"
  118. echo
  119. </echo>
  120. <exec executable="sh" dir="${project.build.directory}" failonerror="true">
  121. <arg line="./dist-layout-stitching.sh"/>
  122. </exec>
  123. </target>
  124. </configuration>
  125. </execution>
  126. <execution>
  127. <id>tar</id>
  128. <phase>package</phase>
  129. <goals>
  130. <goal>run</goal>
  131. </goals>
  132. <configuration>
  133. <target if="tar">
  134. <echo file="${project.build.directory}/dist-tar-stitching.sh">
  135. run() {
  136. echo "\$ ${@}"
  137. "${@}"
  138. res=$?
  139. if [ $res != 0 ]; then
  140. echo
  141. echo "Failed!"
  142. echo
  143. exit $res
  144. fi
  145. }
  146. run tar czf hadoop-${project.version}.tar.gz hadoop-${project.version}
  147. echo
  148. echo "Hadoop dist tar available at: ${project.build.directory}/hadoop-${project.version}.tar.gz"
  149. echo
  150. </echo>
  151. <exec executable="sh" dir="${project.build.directory}" failonerror="true">
  152. <arg line="./dist-tar-stitching.sh"/>
  153. </exec>
  154. </target>
  155. </configuration>
  156. </execution>
  157. </executions>
  158. </plugin>
  159. </plugins>
  160. </build>
  161. </profile>
  162. </profiles>
  163. </project>