pom.xml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  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. https://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>3.5.0-SNAPSHOT</version>
  22. <relativePath>../hadoop-project</relativePath>
  23. </parent>
  24. <artifactId>hadoop-dist</artifactId>
  25. <version>3.5.0-SNAPSHOT</version>
  26. <description>Apache Hadoop Distribution</description>
  27. <name>Apache Hadoop Distribution</name>
  28. <packaging>jar</packaging>
  29. <properties>
  30. <file.encoding>UTF-8</file.encoding>
  31. <downloadSources>true</downloadSources>
  32. <docker.hadoop-runner.version>docker-hadoop-runner</docker.hadoop-runner.version>
  33. <maven.test.skip>true</maven.test.skip>
  34. </properties>
  35. <!-- Using dependencies to ensure this module is the last one -->
  36. <dependencies>
  37. <dependency>
  38. <groupId>org.apache.hadoop</groupId>
  39. <artifactId>hadoop-common</artifactId>
  40. <scope>provided</scope>
  41. </dependency>
  42. <dependency>
  43. <groupId>org.apache.hadoop</groupId>
  44. <artifactId>hadoop-hdfs-client</artifactId>
  45. <scope>provided</scope>
  46. </dependency>
  47. <dependency>
  48. <groupId>org.apache.hadoop</groupId>
  49. <artifactId>hadoop-hdfs-native-client</artifactId>
  50. <scope>provided</scope>
  51. </dependency>
  52. <dependency>
  53. <groupId>org.apache.hadoop</groupId>
  54. <artifactId>hadoop-mapreduce-client-app</artifactId>
  55. <scope>provided</scope>
  56. </dependency>
  57. <dependency>
  58. <groupId>org.apache.hadoop</groupId>
  59. <artifactId>hadoop-mapreduce-client-nativetask</artifactId>
  60. <scope>provided</scope>
  61. </dependency>
  62. <dependency>
  63. <groupId>org.apache.hadoop</groupId>
  64. <artifactId>hadoop-yarn-api</artifactId>
  65. <scope>provided</scope>
  66. </dependency>
  67. <dependency>
  68. <groupId>org.apache.hadoop</groupId>
  69. <artifactId>hadoop-client-check-invariants</artifactId>
  70. <type>pom</type>
  71. <scope>provided</scope>
  72. </dependency>
  73. <dependency>
  74. <groupId>org.apache.hadoop</groupId>
  75. <artifactId>hadoop-client-check-test-invariants</artifactId>
  76. <type>pom</type>
  77. <scope>provided</scope>
  78. </dependency>
  79. <dependency>
  80. <groupId>org.apache.hadoop</groupId>
  81. <artifactId>hadoop-client-integration-tests</artifactId>
  82. <scope>provided</scope>
  83. </dependency>
  84. </dependencies>
  85. <build>
  86. <plugins>
  87. <plugin>
  88. <artifactId>maven-deploy-plugin</artifactId>
  89. <configuration>
  90. <skip>true</skip>
  91. </configuration>
  92. </plugin>
  93. <plugin>
  94. <groupId>org.apache.rat</groupId>
  95. <artifactId>apache-rat-plugin</artifactId>
  96. <configuration>
  97. </configuration>
  98. </plugin>
  99. <!--
  100. The "dist" profile automatically attaches many artifacts
  101. to the module.
  102. Disable these, since we are only concerned with assembling
  103. the dist layout.
  104. -->
  105. <plugin>
  106. <artifactId>maven-jar-plugin</artifactId>
  107. <executions>
  108. <execution>
  109. <id>default-jar</id>
  110. <phase>never</phase>
  111. </execution>
  112. </executions>
  113. </plugin>
  114. <plugin>
  115. <artifactId>maven-source-plugin</artifactId>
  116. <executions>
  117. <execution>
  118. <id>hadoop-java-sources</id>
  119. <phase>never</phase>
  120. </execution>
  121. </executions>
  122. </plugin>
  123. <plugin>
  124. <artifactId>maven-javadoc-plugin</artifactId>
  125. <executions>
  126. <execution>
  127. <id>module-javadocs</id>
  128. <phase>never</phase>
  129. </execution>
  130. </executions>
  131. </plugin>
  132. <!-- Disable install plugin too, since we disabled all the artifacts -->
  133. <plugin>
  134. <artifactId>maven-install-plugin</artifactId>
  135. <executions>
  136. <execution>
  137. <id>default-install</id>
  138. <phase>never</phase>
  139. </execution>
  140. </executions>
  141. </plugin>
  142. <!-- Disable the sign plugin, since there isn't anything to sign -->
  143. <plugin>
  144. <artifactId>maven-gpg-plugin</artifactId>
  145. <version>${maven-gpg-plugin.version}</version>
  146. <executions>
  147. <execution>
  148. <id>sign-artifacts</id>
  149. <phase>never</phase>
  150. </execution>
  151. </executions>
  152. </plugin>
  153. <plugin>
  154. <artifactId>maven-resources-plugin</artifactId>
  155. <executions>
  156. <execution>
  157. <id>copy-compose-files</id>
  158. <phase>package</phase>
  159. <goals>
  160. <goal>copy-resources</goal>
  161. </goals>
  162. <configuration>
  163. <outputDirectory>${project.build.directory}/hadoop-${project.version}/compose</outputDirectory>
  164. <resources>
  165. <resource>
  166. <directory>src/main/compose</directory>
  167. <filtering>true</filtering>
  168. </resource>
  169. </resources>
  170. </configuration>
  171. </execution>
  172. <execution>
  173. <id>copy-and-filter-dockerfile</id>
  174. <phase>package</phase>
  175. <goals>
  176. <goal>copy-resources</goal>
  177. </goals>
  178. <configuration>
  179. <outputDirectory>${project.build.directory}/hadoop-${project.version}</outputDirectory>
  180. <resources>
  181. <resource>
  182. <directory>src/main/docker</directory>
  183. <filtering>true</filtering>
  184. </resource>
  185. </resources>
  186. </configuration>
  187. </execution>
  188. </executions>
  189. </plugin>
  190. </plugins>
  191. </build>
  192. <profiles>
  193. <profile>
  194. <id>dist</id>
  195. <activation>
  196. <activeByDefault>false</activeByDefault>
  197. <property>
  198. <name>tar</name>
  199. </property>
  200. </activation>
  201. <build>
  202. <plugins>
  203. <plugin>
  204. <groupId>org.codehaus.mojo</groupId>
  205. <artifactId>exec-maven-plugin</artifactId>
  206. <executions>
  207. <execution>
  208. <id>dist</id>
  209. <phase>prepare-package</phase>
  210. <goals>
  211. <goal>exec</goal>
  212. </goals>
  213. <configuration>
  214. <executable>${shell-executable}</executable>
  215. <workingDirectory>${project.build.directory}
  216. </workingDirectory>
  217. <arguments>
  218. <argument>
  219. ${basedir}/../dev-support/bin/dist-layout-stitching
  220. </argument>
  221. <argument>${project.version}</argument>
  222. <argument>${project.build.directory}</argument>
  223. </arguments>
  224. </configuration>
  225. </execution>
  226. <execution>
  227. <id>toolshooks</id>
  228. <phase>prepare-package</phase>
  229. <goals>
  230. <goal>exec</goal>
  231. </goals>
  232. <configuration>
  233. <executable>${shell-executable}</executable>
  234. <workingDirectory>${basedir}</workingDirectory>
  235. <arguments>
  236. <argument>
  237. ${basedir}/../dev-support/bin/dist-tools-hooks-maker
  238. </argument>
  239. <argument>${project.version}</argument>
  240. <argument>${project.build.directory}</argument>
  241. <argument>${basedir}/../hadoop-tools</argument>
  242. </arguments>
  243. </configuration>
  244. </execution>
  245. <execution>
  246. <id>tar</id>
  247. <phase>package</phase>
  248. <goals>
  249. <goal>exec</goal>
  250. </goals>
  251. <configuration>
  252. <executable>${shell-executable}</executable>
  253. <workingDirectory>${project.build.directory}
  254. </workingDirectory>
  255. <arguments>
  256. <argument>${basedir}/../dev-support/bin/dist-tar-stitching
  257. </argument>
  258. <argument>${project.version}</argument>
  259. <argument>${project.build.directory}</argument>
  260. </arguments>
  261. </configuration>
  262. </execution>
  263. </executions>
  264. </plugin>
  265. </plugins>
  266. </build>
  267. </profile>
  268. <profile>
  269. <id>docker-build</id>
  270. <build>
  271. <plugins>
  272. <plugin>
  273. <groupId>io.fabric8</groupId>
  274. <artifactId>docker-maven-plugin</artifactId>
  275. <executions>
  276. <execution>
  277. <goals>
  278. <goal>build</goal>
  279. </goals>
  280. <phase>package</phase>
  281. </execution>
  282. </executions>
  283. <configuration>
  284. <images>
  285. <image>
  286. <name>${docker.image}</name>
  287. <build>
  288. <dockerFileDir>
  289. ${project.build.directory}/hadoop-${project.version}
  290. </dockerFileDir>
  291. </build>
  292. </image>
  293. </images>
  294. </configuration>
  295. </plugin>
  296. </plugins>
  297. </build>
  298. </profile>
  299. <profile>
  300. <id>docker-push</id>
  301. <build>
  302. <plugins>
  303. <plugin>
  304. <groupId>io.fabric8</groupId>
  305. <artifactId>docker-maven-plugin</artifactId>
  306. <executions>
  307. <execution>
  308. <goals>
  309. <goal>push</goal>
  310. </goals>
  311. <phase>package</phase>
  312. </execution>
  313. </executions>
  314. </plugin>
  315. </plugins>
  316. </build>
  317. </profile>
  318. </profiles>
  319. </project>