pom.xml 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. <?xml version="1.0"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  3. <!--
  4. Licensed to the Apache Software Foundation (ASF) under one or more
  5. contributor license agreements. See the NOTICE file distributed with
  6. this work for additional information regarding copyright ownership.
  7. The ASF licenses this file to You under the Apache License, Version 2.0
  8. (the "License"); you may not use this file except in compliance with
  9. the License. You may obtain a copy of the License at
  10. http://www.apache.org/licenses/LICENSE-2.0
  11. Unless required by applicable law or agreed to in writing, software
  12. distributed under the License is distributed on an "AS IS" BASIS,
  13. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. See the Licenseam for the specific language governing permissions and
  15. limitations under the License.
  16. -->
  17. <parent>
  18. <groupId>org.apache.ambari</groupId>
  19. <artifactId>ambari-shell</artifactId>
  20. <version>2.5.0.0.0</version>
  21. <relativePath>../../ambari-shell</relativePath>
  22. </parent>
  23. <modelVersion>4.0.0</modelVersion>
  24. <groupId>org.apache.ambari</groupId>
  25. <artifactId>ambari-python-shell</artifactId>
  26. <packaging>pom</packaging>
  27. <version>2.5.0.0.0</version>
  28. <name>Ambari Python Shell</name>
  29. <description>Ambari Python Shell</description>
  30. <properties>
  31. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  32. <final.name>${project.artifactId}-${project.version}</final.name>
  33. <package.release>1</package.release>
  34. <package.prefix>/usr</package.prefix>
  35. <package.log.dir>/var/log/ambari-shell</package.log.dir>
  36. <package.pid.dir>/var/run/ambari-shell</package.pid.dir>
  37. <skipTests>false</skipTests>
  38. <install.dir>/usr/lib/python2.6/site-packages/ambari_shell</install.dir>
  39. <lib.dir>/usr/lib/ambari-shell/lib</lib.dir>
  40. <python.ver>python &gt;= 2.6</python.ver>
  41. <deb.python.ver>python (&gt;= 2.6)</deb.python.ver>
  42. <deb.architecture>amd64</deb.architecture>
  43. <deb.dependency.list>openssl, zlibc, ${deb.python.ver}</deb.dependency.list>
  44. </properties>
  45. <build>
  46. <plugins>
  47. <plugin>
  48. <artifactId>maven-compiler-plugin</artifactId>
  49. <version>3.0</version>
  50. </plugin>
  51. <plugin>
  52. <artifactId>maven-assembly-plugin</artifactId>
  53. <configuration>
  54. <tarLongFileMode>gnu</tarLongFileMode>
  55. <descriptors>
  56. <descriptor>src/packages/tarball/all.xml</descriptor>
  57. </descriptors>
  58. </configuration>
  59. <executions>
  60. <execution>
  61. <id>build-tarball</id>
  62. <phase>prepare-package</phase>
  63. <goals>
  64. <goal>single</goal>
  65. </goals>
  66. </execution>
  67. </executions>
  68. </plugin>
  69. <plugin>
  70. <groupId>org.codehaus.mojo</groupId>
  71. <artifactId>exec-maven-plugin</artifactId>
  72. <version>1.2.1</version>
  73. <executions>
  74. <execution>
  75. <configuration>
  76. <executable>${executable.python}</executable>
  77. <workingDirectory>target/ambari-python-shell-${project.version}</workingDirectory>
  78. <arguments>
  79. <argument>${project.basedir}/src/main/python/setup.py</argument>
  80. <argument>clean</argument>
  81. <argument>bdist_dumb</argument>
  82. </arguments>
  83. <environmentVariables>
  84. <PYTHONPATH>target/python-client-${project.version}:$PYTHONPATH</PYTHONPATH>
  85. </environmentVariables>
  86. </configuration>
  87. <id>python-package</id>
  88. <phase>package</phase>
  89. <goals>
  90. <goal>exec</goal>
  91. </goals>
  92. </execution>
  93. </executions>
  94. </plugin>
  95. <plugin>
  96. <groupId>org.codehaus.mojo</groupId>
  97. <artifactId>rpm-maven-plugin</artifactId>
  98. <version>2.0.1</version>
  99. <executions>
  100. <execution>
  101. <phase>none</phase>
  102. <goals>
  103. <goal>rpm</goal>
  104. </goals>
  105. </execution>
  106. </executions>
  107. <configuration>
  108. <copyright>2012, Apache Software Foundation</copyright>
  109. <group>Development</group>
  110. <description>Maven Recipe: RPM Package.</description>
  111. <requires>
  112. <require>openssl</require>
  113. <require>zlib</require>
  114. <require>${python.ver}</require>
  115. </requires>
  116. <needarch>x86_64</needarch>
  117. <autoRequires>false</autoRequires>
  118. <mappings>
  119. <mapping>
  120. <directory>/etc/ambari-shell/conf</directory>
  121. <filemode>755</filemode>
  122. <username>root</username>
  123. <groupname>root</groupname>
  124. <sources>
  125. <source>
  126. <location>conf/unix/ambari-shell.ini</location>
  127. </source>
  128. </sources>
  129. </mapping>
  130. <mapping>
  131. <directory>/usr/sbin</directory>
  132. <filemode>755</filemode>
  133. <username>root</username>
  134. <groupname>root</groupname>
  135. <directoryIncluded>false</directoryIncluded>
  136. <sources>
  137. <source>
  138. <location>conf/unix/ambari-shell</location>
  139. <filter>true</filter>
  140. </source>
  141. </sources>
  142. </mapping>
  143. <mapping>
  144. <directory>${package.log.dir}</directory>
  145. <filemode>755</filemode>
  146. <username>root</username>
  147. <groupname>root</groupname>
  148. </mapping>
  149. <mapping>
  150. <directory>${install.dir}</directory>
  151. <sources>
  152. <source>
  153. <location>${project.build.directory}/${project.artifactId}-${project.version}/ambari_shell</location>
  154. </source>
  155. </sources>
  156. </mapping>
  157. </mappings>
  158. </configuration>
  159. </plugin>
  160. <plugin>
  161. <groupId>org.apache.rat</groupId>
  162. <artifactId>apache-rat-plugin</artifactId>
  163. <configuration>
  164. <excludes>
  165. <exclude>src/examples/*</exclude>
  166. <exclude>src/test/python/dummy*.txt</exclude>
  167. <exclude>src/main/python/ambari_client/imports.txt</exclude>
  168. <exclude>src/main/puppet/modules/stdlib/**</exclude>
  169. <exclude>**/*.erb</exclude>
  170. <exclude>**/*.json</exclude>
  171. </excludes>
  172. </configuration>
  173. <executions>
  174. <execution>
  175. <phase>test</phase>
  176. <goals>
  177. <goal>check</goal>
  178. </goals>
  179. </execution>
  180. </executions>
  181. </plugin>
  182. <plugin>
  183. <groupId>org.vafer</groupId>
  184. <artifactId>jdeb</artifactId>
  185. <version>1.0.1</version>
  186. <executions>
  187. <execution>
  188. <phase>none</phase>
  189. <goals>
  190. <goal>jdeb</goal>
  191. </goals>
  192. </execution>
  193. </executions>
  194. <configuration>
  195. <controlDir>${basedir}/src/main/package/deb/control</controlDir>
  196. <deb>${basedir}/target/${project.artifactId}_${package-version}-${package-release}.deb</deb>
  197. <dataSet>
  198. <data>
  199. <src>${project.build.directory}/${project.artifactId}-${project.version}/ambari_shell</src>
  200. <type>directory</type>
  201. <mapper>
  202. <type>perm</type>
  203. <prefix>${install.dir}</prefix>
  204. </mapper>
  205. </data>
  206. </dataSet>
  207. </configuration>
  208. </plugin>
  209. </plugins>
  210. <extensions>
  211. <extension>
  212. <groupId>org.apache.maven.wagon</groupId>
  213. <artifactId>wagon-ssh-external</artifactId>
  214. </extension>
  215. </extensions>
  216. </build>
  217. <profiles>
  218. <profile>
  219. <id>windows</id>
  220. <activation>
  221. <os>
  222. <family>win</family>
  223. </os>
  224. </activation>
  225. <properties>
  226. <envClassifier>win</envClassifier>
  227. <executable.python>python</executable.python>
  228. </properties>
  229. </profile>
  230. <profile>
  231. <id>linux</id>
  232. <activation>
  233. <os>
  234. <family>unix</family>
  235. </os>
  236. </activation>
  237. <properties>
  238. <envClassifier>linux</envClassifier>
  239. <executable.python>${project.basedir}/../../ambari-common/src/main/unix/ambari-python-wrap</executable.python>
  240. </properties>
  241. </profile>
  242. </profiles>
  243. </project>