pom.xml 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. <!--
  2. Licensed to the Apache Software Foundation (ASF) under one or more
  3. contributor license agreements. See the NOTICE file distributed with
  4. this work for additional information regarding copyright ownership.
  5. The ASF licenses this file to You under the Apache License, Version 2.0
  6. (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. -->
  15. <project xmlns="http://maven.apache.org/POM/4.0.0"
  16. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  17. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
  18. http://maven.apache.org/xsd/maven-4.0.0.xsd">
  19. <parent>
  20. <artifactId>ambari-metrics</artifactId>
  21. <groupId>org.apache.ambari</groupId>
  22. <version>2.5.0.0.0</version>
  23. </parent>
  24. <modelVersion>4.0.0</modelVersion>
  25. <packaging>pom</packaging>
  26. <version>2.5.0.0.0</version>
  27. <artifactId>ambari-metrics-host-monitoring</artifactId>
  28. <name>Ambari Metrics Monitor</name>
  29. <properties>
  30. <resmonitor.install.dir>
  31. /usr/lib/python2.6/site-packages/resource_monitoring
  32. </resmonitor.install.dir>
  33. <final.name>${project.artifactId}-${project.version}</final.name>
  34. </properties>
  35. <build>
  36. <plugins>
  37. <plugin>
  38. <artifactId>maven-clean-plugin</artifactId>
  39. <version>2.6</version>
  40. <configuration>
  41. <filesets>
  42. <fileset>
  43. <directory>${project.basedir}/src/main/python/psutil/build/</directory>
  44. <includes>
  45. <include>**/*</include>
  46. </includes>
  47. <followSymlinks>false</followSymlinks>
  48. </fileset>
  49. </filesets>
  50. </configuration>
  51. </plugin>
  52. <plugin>
  53. <groupId>org.codehaus.mojo</groupId>
  54. <artifactId>build-helper-maven-plugin</artifactId>
  55. <version>1.8</version>
  56. <executions>
  57. <execution>
  58. <id>parse-version</id>
  59. <phase>validate</phase>
  60. <goals>
  61. <goal>parse-version</goal>
  62. </goals>
  63. </execution>
  64. <execution>
  65. <id>regex-property</id>
  66. <goals>
  67. <goal>regex-property</goal>
  68. </goals>
  69. <configuration>
  70. <name>ambariVersion</name>
  71. <value>${project.version}</value>
  72. <regex>^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).*</regex>
  73. <replacement>$1.$2.$3.$4</replacement>
  74. <failIfNoMatch>false</failIfNoMatch>
  75. </configuration>
  76. </execution>
  77. </executions>
  78. </plugin>
  79. <plugin>
  80. <artifactId>maven-compiler-plugin</artifactId>
  81. <version>3.0</version>
  82. </plugin>
  83. <plugin>
  84. <groupId>org.codehaus.mojo</groupId>
  85. <artifactId>exec-maven-plugin</artifactId>
  86. <executions>
  87. <execution>
  88. <configuration>
  89. <executable>${executable.python}</executable>
  90. <workingDirectory>src/test/python</workingDirectory>
  91. <arguments>
  92. <argument>unitTests.py</argument>
  93. </arguments>
  94. <environmentVariables>
  95. <PYTHONPATH>../../main/python:$PYTHONPATH</PYTHONPATH>
  96. </environmentVariables>
  97. <skip>${skipTests}</skip>
  98. </configuration>
  99. <id>python-test</id>
  100. <phase>test</phase>
  101. <goals>
  102. <goal>exec</goal>
  103. </goals>
  104. </execution>
  105. </executions>
  106. </plugin>
  107. <plugin>
  108. <groupId>org.apache.rat</groupId>
  109. <artifactId>apache-rat-plugin</artifactId>
  110. <configuration>
  111. <excludes>
  112. <exclude>conf/unix/metric_groups.conf</exclude>
  113. <exclude>conf/windows/metric_groups.conf</exclude>
  114. <exclude>src/main/python/psutil/**</exclude>
  115. <exclude>.pydevproject</exclude>
  116. </excludes>
  117. </configuration>
  118. <executions>
  119. <execution>
  120. <phase>test</phase>
  121. <goals>
  122. <goal>check</goal>
  123. </goals>
  124. </execution>
  125. </executions>
  126. </plugin>
  127. <plugin>
  128. <groupId>org.vafer</groupId>
  129. <artifactId>jdeb</artifactId>
  130. <version>1.0.1</version>
  131. <executions>
  132. <execution>
  133. <!--Stub execution on direct plugin call - workaround for ambari deb build process-->
  134. <id>stub-execution</id>
  135. <phase>none</phase>
  136. <goals>
  137. <goal>jdeb</goal>
  138. </goals>
  139. </execution>
  140. </executions>
  141. <configuration>
  142. <skip>true</skip>
  143. <attach>false</attach>
  144. <submodules>false</submodules>
  145. <controlDir>${project.basedir}/../src/main/package/deb/control</controlDir>
  146. </configuration>
  147. </plugin>
  148. </plugins>
  149. </build>
  150. <profiles>
  151. <profile>
  152. <id>windows</id>
  153. <activation>
  154. <os>
  155. <family>win</family>
  156. </os>
  157. </activation>
  158. <properties>
  159. <envClassifier>win</envClassifier>
  160. <dirsep>\</dirsep>
  161. <pathsep>;</pathsep>
  162. <executable.python>python</executable.python>
  163. <executable.shell>cmd</executable.shell>
  164. <fileextension.shell>cmd</fileextension.shell>
  165. <fileextension.dot.shell-default>.cmd</fileextension.dot.shell-default>
  166. <assemblydescriptor>src/main/assemblies/amhm-windows.xml</assemblydescriptor>
  167. <packagingFormat>jar</packagingFormat>
  168. </properties>
  169. <build>
  170. <plugins>
  171. <plugin>
  172. <groupId>org.apache.maven.plugins</groupId>
  173. <artifactId>maven-antrun-plugin</artifactId>
  174. <version>1.7</version>
  175. <executions>
  176. <execution>
  177. <id>psutils-compile</id>
  178. <phase>process-test-classes</phase>
  179. <goals>
  180. <goal>run</goal>
  181. </goals>
  182. <configuration>
  183. <target name="psutils-compile">
  184. <exec dir="${basedir}/src/main/python/psutil" executable="${executable.python}" failonerror="true">
  185. <arg value="setup.py" />
  186. <arg value="build" />
  187. <arg value="--build-temp" />
  188. <arg value="${basedir}\target\psutil_build_temp" />
  189. <arg value="--build-base" />
  190. <arg value="${basedir}/target/psutil_build" />
  191. </exec>
  192. </target>
  193. </configuration>
  194. </execution>
  195. </executions>
  196. </plugin>
  197. </plugins>
  198. </build>
  199. </profile>
  200. <profile>
  201. <id>linux</id>
  202. <activation>
  203. <os>
  204. <family>unix</family>
  205. </os>
  206. </activation>
  207. <properties>
  208. <envClassifier>linux</envClassifier>
  209. <dirsep>/</dirsep>
  210. <pathsep>:</pathsep>
  211. <executable.python>${project.basedir}/../../ambari-common/src/main/unix/ambari-python-wrap</executable.python>
  212. <executable.shell>sh</executable.shell>
  213. <fileextension.shell>sh</fileextension.shell>
  214. <fileextension.dot.shell-default></fileextension.dot.shell-default>
  215. <assemblydescriptor>src/main/assemblies/empty.xml</assemblydescriptor>
  216. <packagingFormat>jar</packagingFormat>
  217. </properties>
  218. <build>
  219. <plugins>
  220. <plugin>
  221. <groupId>org.apache.maven.plugins</groupId>
  222. <artifactId>maven-antrun-plugin</artifactId>
  223. <version>1.7</version>
  224. <executions>
  225. <execution>
  226. <id>psutils-compile</id>
  227. <phase>process-test-classes</phase>
  228. <goals>
  229. <goal>run</goal>
  230. </goals>
  231. <configuration>
  232. <target name="psutils-compile">
  233. <exec dir="${basedir}/src/main/python/psutil" executable="${executable.python}" failonerror="true">
  234. <arg value="setup.py" />
  235. <arg value="build" />
  236. <arg value="--build-platlib" />
  237. <arg value="${basedir}/target/psutil_build" />
  238. </exec>
  239. </target>
  240. </configuration>
  241. </execution>
  242. </executions>
  243. </plugin>
  244. </plugins>
  245. </build>
  246. </profile>
  247. </profiles>
  248. </project>